blob: 8fcc36f8ef689056d780ef9868d2495940165c24 [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.
Yury Selivanov7aa53412015-05-30 10:57:56 -04003# Generated by GNU Autoconf 2.69 for python 3.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://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
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$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'
Yury Selivanov7aa53412015-05-30 10:57:56 -0400583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://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
Gregory P. Smith799520c2016-09-07 16:10:00 -0700671target_os
672target_vendor
673target_cpu
674target
675LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_ERR
677LLVM_PROF_FILE
678LLVM_PROF_MERGER
679PGO_PROF_USE_FLAG
680PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700681LTOFLAGS
Brett Cannon8c94f972016-09-06 17:15:21 -0700682DEF_MAKE_RULE
683DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000684ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000685LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100686MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000687INSTALL_DATA
688INSTALL_SCRIPT
689INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200690ac_ct_READELF
691READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000692ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200693ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000694AR
695RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000696USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000697GNULD
698LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000699LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000700RUNSHARED
701INSTSONAME
702LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000703PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000704BLDLIBRARY
705DLLLIBRARY
706LDLIBRARY
707LIBRARY
708BUILDEXEEXT
709EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200710NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200712PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200714ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000715MAINCC
716CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717GREP
718CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000719OBJEXT
720EXEEXT
721ac_ct_CC
722CPPFLAGS
723LDFLAGS
724CFLAGS
725CC
726EXPORT_MACOSX_DEPLOYMENT_TARGET
727CONFIGURE_MACOSX_DEPLOYMENT_TARGET
728SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200729_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000730MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000731FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000732FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800733FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKALTINSTALLLAST
735FRAMEWORKALTINSTALLFIRST
736FRAMEWORKINSTALLLAST
737FRAMEWORKINSTALLFIRST
738PYTHONFRAMEWORKINSTALLDIR
739PYTHONFRAMEWORKPREFIX
740PYTHONFRAMEWORKDIR
741PYTHONFRAMEWORKIDENTIFIER
742PYTHONFRAMEWORK
743LIPO_32BIT_FLAGS
744ARCH_RUN_32BIT
745UNIVERSALSDK
746CONFIG_ARGS
747SOVERSION
748VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000749GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200751PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500760HAS_HG
761HGBRANCH
762HGTAG
763HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
Gregory P. Smith799520c2016-09-07 16:10:00 -0700784runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
811with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600812with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_libs
823with_system_expat
824with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100825with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000826enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700827with_tcltk_includes
828with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_dbmliborder
830with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_threads
832with_thread
833enable_ipv6
834with_doc_strings
835with_tsc
836with_pymalloc
837with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_fpectl
839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000844'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 ac_precious_vars='build_alias
846host_alias
847target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100848MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849CC
850CFLAGS
851LDFLAGS
852LIBS
853CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100854CPP
855PKG_CONFIG
856PKG_CONFIG_PATH
857PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858
Guido van Rossum627b2d71993-12-24 10:39:16 +0000859
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000861ac_init_help=
862ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000863ac_unrecognized_opts=
864ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865# The variables have the same names as the options, with
866# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000867cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870no_recursion=
871prefix=NONE
872program_prefix=NONE
873program_suffix=NONE
874program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879x_includes=NONE
880x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000881
882# Installation directory options.
883# These are left unexpanded so users can "make install exec_prefix=/foo"
884# and all the variables that are supposed to be based on exec_prefix
885# by default will actually change.
886# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888bindir='${exec_prefix}/bin'
889sbindir='${exec_prefix}/sbin'
890libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891datarootdir='${prefix}/share'
892datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893sysconfdir='${prefix}/etc'
894sharedstatedir='${prefix}/com'
895localstatedir='${prefix}/var'
Gregory P. Smith799520c2016-09-07 16:10:00 -0700896runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Gregory P. Smith799520c2016-09-07 16:10:00 -07001149 -runstatedir | --runstatedir | --runstatedi | --runstated \
1150 | --runstate | --runstat | --runsta | --runst | --runs \
1151 | --run | --ru | --r)
1152 ac_prev=runstatedir ;;
1153 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1154 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1155 | --run=* | --ru=* | --r=*)
1156 runstatedir=$ac_optarg ;;
1157
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1159 ac_prev=sbindir ;;
1160 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1161 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
1164 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1165 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1166 | --sharedst | --shareds | --shared | --share | --shar \
1167 | --sha | --sh)
1168 ac_prev=sharedstatedir ;;
1169 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1170 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1171 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1172 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 -site | --site | --sit)
1176 ac_prev=site ;;
1177 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1181 ac_prev=srcdir ;;
1182 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1186 | --syscon | --sysco | --sysc | --sys | --sy)
1187 ac_prev=sysconfdir ;;
1188 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1189 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1198 verbose=yes ;;
1199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 -version | --version | --versio | --versi | --vers | -V)
1201 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001207 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt_orig=$ac_useropt
1209 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1210 case $ac_user_opts in
1211 *"
1212"with_$ac_useropt"
1213"*) ;;
1214 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1215 ac_unrecognized_sep=', ';;
1216 esac
1217 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
1219 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 ac_useropt_orig=$ac_useropt
1225 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1226 case $ac_user_opts in
1227 *"
1228"with_$ac_useropt"
1229"*) ;;
1230 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1231 ac_unrecognized_sep=', ';;
1232 esac
1233 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 --x)
1236 # Obsolete; use --with-x.
1237 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1240 | --x-incl | --x-inc | --x-in | --x-i)
1241 ac_prev=x_includes ;;
1242 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1243 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
1246 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1247 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1248 ac_prev=x_libraries ;;
1249 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1250 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1254Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ;;
1256
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 *=*)
1258 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1259 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 case $ac_envvar in #(
1261 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 export $ac_envvar ;;
1266
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001267 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001272 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 ;;
1274
1275 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276done
1277
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001279 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281fi
1282
Matthias Kloseb9621712010-04-24 17:59:49 +00001283if test -n "$ac_unrecognized_opts"; then
1284 case $enable_option_checking in
1285 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001286 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001287 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1288 esac
1289fi
1290
1291# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1293 datadir sysconfdir sharedstatedir localstatedir includedir \
1294 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Gregory P. Smith799520c2016-09-07 16:10:00 -07001295 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001298 # Remove trailing slashes.
1299 case $ac_val in
1300 */ )
1301 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1302 eval $ac_var=\$ac_val;;
1303 esac
1304 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306 [\\/$]* | ?:[\\/]* ) continue;;
1307 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001310done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# There might be people who depend on the old broken behavior: `$host'
1313# used to hold the argument of --host etc.
1314# FIXME: To remove some day.
1315build=$build_alias
1316host=$host_alias
1317target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Martin v. Löwis11437992002-04-12 09:54:03 +00001319# FIXME: To remove some day.
1320if test "x$host_alias" != x; then
1321 if test "x$build_alias" = x; then
1322 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001323 elif test "x$build_alias" != "x$host_alias"; then
1324 cross_compiling=yes
1325 fi
1326fi
1327
1328ac_tool_prefix=
1329test -n "$host_alias" && ac_tool_prefix=$host_alias-
1330
1331test "$silent" = yes && exec 6>/dev/null
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334ac_pwd=`pwd` && test -n "$ac_pwd" &&
1335ac_ls_di=`ls -di .` &&
1336ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340
1341
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342# Find the source files, if location was not specified.
1343if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001344 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 ac_confdir=`$as_dirname -- "$as_myself" ||
1347$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1348 X"$as_myself" : 'X\(//\)[^/]' \| \
1349 X"$as_myself" : 'X\(//\)$' \| \
1350 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1351$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)[^/].*/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)$/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\).*/{
1365 s//\1/
1366 q
1367 }
1368 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001369 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371 srcdir=..
1372 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373else
1374 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376if test ! -r "$srcdir/$ac_unique_file"; then
1377 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1381ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383 pwd)`
1384# When building in place, set srcdir=.
1385if test "$ac_abs_confdir" = "$ac_pwd"; then
1386 srcdir=.
1387fi
1388# Remove unnecessary trailing slashes from srcdir.
1389# Double slashes in file names in object file debugging info
1390# mess up M-x gdb in Emacs.
1391case $srcdir in
1392*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1393esac
1394for ac_var in $ac_precious_vars; do
1395 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1396 eval ac_env_${ac_var}_value=\$${ac_var}
1397 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1399done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001400
Martin v. Löwis11437992002-04-12 09:54:03 +00001401#
1402# Report the --help message.
1403#
1404if test "$ac_init_help" = "long"; then
1405 # Omit some internal or obsolete options to make the list less imposing.
1406 # This message is too long to be a string in the A/UX 3.1 sh.
1407 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001408\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410Usage: $0 [OPTION]... [VAR=VALUE]...
1411
1412To assign environment variables (e.g., CC, CFLAGS...), specify them as
1413VAR=VALUE. See below for descriptions of some of the useful variables.
1414
1415Defaults for the options are specified in brackets.
1416
1417Configuration:
1418 -h, --help display this help and exit
1419 --help=short display options specific to this package
1420 --help=recursive display the short help of all the included packages
1421 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001422 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --cache-file=FILE cache test results in FILE [disabled]
1424 -C, --config-cache alias for \`--cache-file=config.cache'
1425 -n, --no-create do not create output files
1426 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1427
Martin v. Löwis11437992002-04-12 09:54:03 +00001428Installation directories:
1429 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
1434By default, \`make install' will install all the files in
1435\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1436an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1437for instance \`--prefix=\$HOME'.
1438
1439For better control, use the options below.
1440
1441Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --bindir=DIR user executables [EPREFIX/bin]
1443 --sbindir=DIR system admin executables [EPREFIX/sbin]
1444 --libexecdir=DIR program executables [EPREFIX/libexec]
1445 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1446 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1447 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001448 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 --libdir=DIR object code libraries [EPREFIX/lib]
1450 --includedir=DIR C header files [PREFIX/include]
1451 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1452 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1453 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1454 --infodir=DIR info documentation [DATAROOTDIR/info]
1455 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1456 --mandir=DIR man documentation [DATAROOTDIR/man]
1457 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1458 --htmldir=DIR html documentation [DOCDIR]
1459 --dvidir=DIR dvi documentation [DOCDIR]
1460 --pdfdir=DIR pdf documentation [DOCDIR]
1461 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463
1464 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001465
1466System types:
1467 --build=BUILD configure for building on BUILD [guessed]
1468 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001469 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001470_ACEOF
1471fi
1472
1473if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001475 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 cat <<\_ACEOF
1478
1479Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001480 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1482 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001483 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001484 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-framework[=INSTALLDIR]
1486 Build (MacOSX|Darwin) framework
1487 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001488 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00001489 --enable-optimizations Enable expensive optimizations (PGO, maybe LTO,
1490 etc). Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001491 --enable-loadable-sqlite-extensions
1492 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --enable-ipv6 Enable ipv6 (with ipv4) support
1494 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001495 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001496 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498Optional Packages:
1499 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1500 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001501 --with-universal-archs=ARCH
1502 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001503 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001504 --with-framework-name=FRAMEWORK
1505 specify an alternate name of the framework built
1506 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001508 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001509 --with-cxx-main=<compiler>
1510 compile main() and link python executable with C++
1511 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-suffix=.exe set executable suffix
1513 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001514 --with-lto Enable Link Time Optimization in PGO builds.
1515 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001516 --with-hash-algorithm=[fnv|siphash24]
1517 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001518 --with-address-sanitizer
1519 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001521 --with-system-expat build pyexpat module using an installed expat
1522 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001523 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001524 --with-system-libmpdec build _decimal module using an installed libmpdec
1525 library
Ned Deilyd819b932013-09-06 01:07:05 -07001526 --with-tcltk-includes='-I...'
1527 override search for Tcl and Tk include files
1528 --with-tcltk-libs='-L...'
1529 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001530 --with-dbmliborder=db1:db2:...
1531 order to check db backends for dbm. Valid value is a
1532 colon separated string with the backend names
1533 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with(out)-threads[=DIRECTORY]
1536 disable/enable thread support
1537 --with(out)-thread[=DIRECTORY]
1538 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001540 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001541 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001542 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001543 --with-fpectl enable SIGFPE catching
1544 --with-libm=STRING math library
1545 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001546 --with(out)-computed-gotos
1547 Use computed gotos in evaluation loop (enabled by
1548 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001549 --with(out)-ensurepip=[=upgrade]
1550 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001634python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
1987# ac_fn_c_find_uintX_t LINENO BITS VAR
1988# ------------------------------------
1989# Finds an unsigned integer type with width BITS, setting cache variable VAR
1990# accordingly.
1991ac_fn_c_find_uintX_t ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1995$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001996if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001997 $as_echo_n "(cached) " >&6
1998else
1999 eval "$3=no"
2000 # Order is important - never check a type that is potentially smaller
2001 # than half of the expected target width.
2002 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2003 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$ac_includes_default
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 case $ac_type in #(
2020 uint$2_t) :
2021 eval "$3=yes" ;; #(
2022 *) :
2023 eval "$3=\$ac_type" ;;
2024esac
2025fi
2026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002027 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029else
2030 break
2031fi
2032 done
2033fi
2034eval ac_res=\$$3
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2036$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002037 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002038
2039} # ac_fn_c_find_uintX_t
2040
2041# ac_fn_c_find_intX_t LINENO BITS VAR
2042# -----------------------------------
2043# Finds a signed integer type with width BITS, setting cache variable VAR
2044# accordingly.
2045ac_fn_c_find_intX_t ()
2046{
2047 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2049$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002050if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002051 $as_echo_n "(cached) " >&6
2052else
2053 eval "$3=no"
2054 # Order is important - never check a type that is potentially smaller
2055 # than half of the expected target width.
2056 for ac_type in int$2_t 'int' 'long int' \
2057 'long long int' 'short int' 'signed char'; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002061 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002062int
2063main ()
2064{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002065static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002077 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002078int
2079main ()
2080{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002081static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002082 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002083test_array [0] = 0;
2084return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091
2092else
2093 case $ac_type in #(
2094 int$2_t) :
2095 eval "$3=yes" ;; #(
2096 *) :
2097 eval "$3=\$ac_type" ;;
2098esac
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002103 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105else
2106 break
2107fi
2108 done
2109fi
2110eval ac_res=\$$3
2111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2112$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002113 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002114
2115} # ac_fn_c_find_intX_t
2116
2117# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2118# --------------------------------------------
2119# Tries to find the compile-time value of EXPR in a program that includes
2120# INCLUDES, setting VAR accordingly. Returns whether the value could be
2121# computed
2122ac_fn_c_compute_int ()
2123{
2124 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2125 if test "$cross_compiling" = yes; then
2126 # Depending upon the size, compute the lo and hi bounds.
2127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130int
2131main ()
2132{
2133static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002134test_array [0] = 0;
2135return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002136
2137 ;
2138 return 0;
2139}
2140_ACEOF
2141if ac_fn_c_try_compile "$LINENO"; then :
2142 ac_lo=0 ac_mid=0
2143 while :; do
2144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145/* end confdefs.h. */
2146$4
2147int
2148main ()
2149{
2150static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002151test_array [0] = 0;
2152return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002153
2154 ;
2155 return 0;
2156}
2157_ACEOF
2158if ac_fn_c_try_compile "$LINENO"; then :
2159 ac_hi=$ac_mid; break
2160else
2161 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2162 if test $ac_lo -le $ac_mid; then
2163 ac_lo= ac_hi=
2164 break
2165 fi
2166 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2167fi
2168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169 done
2170else
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173$4
2174int
2175main ()
2176{
2177static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002178test_array [0] = 0;
2179return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002180
2181 ;
2182 return 0;
2183}
2184_ACEOF
2185if ac_fn_c_try_compile "$LINENO"; then :
2186 ac_hi=-1 ac_mid=-1
2187 while :; do
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
2191int
2192main ()
2193{
2194static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002195test_array [0] = 0;
2196return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002197
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_lo=$ac_mid; break
2204else
2205 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2206 if test $ac_mid -le $ac_hi; then
2207 ac_lo= ac_hi=
2208 break
2209 fi
2210 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2211fi
2212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 done
2214else
2215 ac_lo= ac_hi=
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218fi
2219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2220# Binary search between lo and hi bounds.
2221while test "x$ac_lo" != "x$ac_hi"; do
2222 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225$4
2226int
2227main ()
2228{
2229static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002230test_array [0] = 0;
2231return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_compile "$LINENO"; then :
2238 ac_hi=$ac_mid
2239else
2240 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2241fi
2242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2243done
2244case $ac_lo in #((
2245?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2246'') ac_retval=1 ;;
2247esac
2248 else
2249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250/* end confdefs.h. */
2251$4
2252static long int longval () { return $2; }
2253static unsigned long int ulongval () { return $2; }
2254#include <stdio.h>
2255#include <stdlib.h>
2256int
2257main ()
2258{
2259
2260 FILE *f = fopen ("conftest.val", "w");
2261 if (! f)
2262 return 1;
2263 if (($2) < 0)
2264 {
2265 long int i = longval ();
2266 if (i != ($2))
2267 return 1;
2268 fprintf (f, "%ld", i);
2269 }
2270 else
2271 {
2272 unsigned long int i = ulongval ();
2273 if (i != ($2))
2274 return 1;
2275 fprintf (f, "%lu", i);
2276 }
2277 /* Do not output a trailing newline, as this causes \r\n confusion
2278 on some platforms. */
2279 return ferror (f) || fclose (f) != 0;
2280
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_run "$LINENO"; then :
2286 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2287else
2288 ac_retval=1
2289fi
2290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2291 conftest.$ac_objext conftest.beam conftest.$ac_ext
2292rm -f conftest.val
2293
2294 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002296 as_fn_set_status $ac_retval
2297
2298} # ac_fn_c_compute_int
2299
2300# ac_fn_c_check_func LINENO FUNC VAR
2301# ----------------------------------
2302# Tests whether FUNC exists, setting the cache variable VAR accordingly
2303ac_fn_c_check_func ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2307$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002308if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2314 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2315#define $2 innocuous_$2
2316
2317/* System header to define __stub macros and hopefully few prototypes,
2318 which can conflict with char $2 (); below.
2319 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2320 <limits.h> exists even on freestanding compilers. */
2321
2322#ifdef __STDC__
2323# include <limits.h>
2324#else
2325# include <assert.h>
2326#endif
2327
2328#undef $2
2329
2330/* Override any GCC internal prototype to avoid an error.
2331 Use char because int might match the return type of a GCC
2332 builtin and then its argument prototype would still apply. */
2333#ifdef __cplusplus
2334extern "C"
2335#endif
2336char $2 ();
2337/* The GNU C library defines this for functions which it implements
2338 to always fail with ENOSYS. Some functions are actually named
2339 something starting with __ and the normal name is an alias. */
2340#if defined __stub_$2 || defined __stub___$2
2341choke me
2342#endif
2343
2344int
2345main ()
2346{
2347return $2 ();
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_link "$LINENO"; then :
2353 eval "$3=yes"
2354else
2355 eval "$3=no"
2356fi
2357rm -f core conftest.err conftest.$ac_objext \
2358 conftest$ac_exeext conftest.$ac_ext
2359fi
2360eval ac_res=\$$3
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2362$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002363 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002364
2365} # ac_fn_c_check_func
2366
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002367# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2368# ---------------------------------------------
2369# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2370# accordingly.
2371ac_fn_c_check_decl ()
2372{
2373 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374 as_decl_name=`echo $2|sed 's/ *(.*//'`
2375 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2377$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2378if eval \${$3+:} false; then :
2379 $as_echo_n "(cached) " >&6
2380else
2381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2382/* end confdefs.h. */
2383$4
2384int
2385main ()
2386{
2387#ifndef $as_decl_name
2388#ifdef __cplusplus
2389 (void) $as_decl_use;
2390#else
2391 (void) $as_decl_name;
2392#endif
2393#endif
2394
2395 ;
2396 return 0;
2397}
2398_ACEOF
2399if ac_fn_c_try_compile "$LINENO"; then :
2400 eval "$3=yes"
2401else
2402 eval "$3=no"
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405fi
2406eval ac_res=\$$3
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2408$as_echo "$ac_res" >&6; }
2409 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2410
2411} # ac_fn_c_check_decl
2412
Matthias Kloseb9621712010-04-24 17:59:49 +00002413# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2414# ----------------------------------------------------
2415# Tries to find if the field MEMBER exists in type AGGR, after including
2416# INCLUDES, setting cache variable VAR accordingly.
2417ac_fn_c_check_member ()
2418{
2419 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2421$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002422if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 $as_echo_n "(cached) " >&6
2424else
2425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h. */
2427$5
2428int
2429main ()
2430{
2431static $2 ac_aggr;
2432if (ac_aggr.$3)
2433return 0;
2434 ;
2435 return 0;
2436}
2437_ACEOF
2438if ac_fn_c_try_compile "$LINENO"; then :
2439 eval "$4=yes"
2440else
2441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2442/* end confdefs.h. */
2443$5
2444int
2445main ()
2446{
2447static $2 ac_aggr;
2448if (sizeof ac_aggr.$3)
2449return 0;
2450 ;
2451 return 0;
2452}
2453_ACEOF
2454if ac_fn_c_try_compile "$LINENO"; then :
2455 eval "$4=yes"
2456else
2457 eval "$4=no"
2458fi
2459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2460fi
2461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2462fi
2463eval ac_res=\$$4
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2465$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002466 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002467
2468} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002470This file contains any messages produced by compilers while
2471running configure, to aid debugging if configure makes a mistake.
2472
Yury Selivanov7aa53412015-05-30 10:57:56 -04002473It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002474generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002475
2476 $ $0 $@
2477
2478_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002480{
2481cat <<_ASUNAME
2482## --------- ##
2483## Platform. ##
2484## --------- ##
2485
2486hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2487uname -m = `(uname -m) 2>/dev/null || echo unknown`
2488uname -r = `(uname -r) 2>/dev/null || echo unknown`
2489uname -s = `(uname -s) 2>/dev/null || echo unknown`
2490uname -v = `(uname -v) 2>/dev/null || echo unknown`
2491
2492/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2493/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2494
2495/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2496/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2497/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002499/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2500/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2501/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2502
2503_ASUNAME
2504
2505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2506for as_dir in $PATH
2507do
2508 IFS=$as_save_IFS
2509 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "PATH: $as_dir"
2511 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002513
2514} >&5
2515
2516cat >&5 <<_ACEOF
2517
2518
2519## ----------- ##
2520## Core tests. ##
2521## ----------- ##
2522
2523_ACEOF
2524
2525
2526# Keep a trace of the command line.
2527# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002528# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002529# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002530# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002531ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002532ac_configure_args0=
2533ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002534ac_must_keep_next=false
2535for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002536do
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 for ac_arg
2538 do
2539 case $ac_arg in
2540 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2541 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2542 | -silent | --silent | --silen | --sile | --sil)
2543 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 esac
2547 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002551 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002552 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002554 case $ac_arg in
2555 *=* | --config-cache | -C | -disable-* | --disable-* \
2556 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2557 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2558 | -with-* | --with-* | -without-* | --without-* | --x)
2559 case "$ac_configure_args0 " in
2560 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2561 esac
2562 ;;
2563 -* ) ac_must_keep_next=true ;;
2564 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002565 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002567 ;;
2568 esac
2569 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002570done
Matthias Kloseb9621712010-04-24 17:59:49 +00002571{ ac_configure_args0=; unset ac_configure_args0;}
2572{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# When interrupted or exit'd, cleanup temporary files, and complete
2575# config.log. We remove comments because anyway the quotes in there
2576# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577# WARNING: Use '\'' to represent an apostrophe within the trap.
2578# 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 +00002579trap 'exit_status=$?
2580 # Save into config.log some information that might help in debugging.
2581 {
2582 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002583
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002585## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 echo
2588 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589(
2590 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2591 eval ac_val=\$$ac_var
2592 case $ac_val in #(
2593 *${as_nl}*)
2594 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2596$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 esac
2598 case $ac_var in #(
2599 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2601 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 esac ;;
2603 esac
2604 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2607 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 "s/'\''/'\''\\\\'\'''\''/g;
2610 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2611 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002612 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002614 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 esac |
2616 sort
2617)
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002619
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002620 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002621## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002622## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002623 echo
2624 for ac_var in $ac_subst_vars
2625 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 eval ac_val=\$$ac_var
2627 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002631 done | sort
2632 echo
2633
2634 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002635 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002637## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002638 echo
2639 for ac_var in $ac_subst_files
2640 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641 eval ac_val=\$$ac_var
2642 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002646 done | sort
2647 echo
2648 fi
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002651 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002652## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002653## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 echo
2657 fi
2658 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 $as_echo "$as_me: caught signal $ac_signal"
2660 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662 rm -f core *.core core.conftest.* &&
2663 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002665' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002666for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002668done
2669ac_signal=0
2670
2671# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002673
Matthias Kloseb9621712010-04-24 17:59:49 +00002674$as_echo "/* confdefs.h */" > confdefs.h
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676# Predefined preprocessor variables.
2677
2678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_NAME "$PACKAGE_NAME"
2680_ACEOF
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2684_ACEOF
2685
Martin v. Löwis11437992002-04-12 09:54:03 +00002686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_VERSION "$PACKAGE_VERSION"
2688_ACEOF
2689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690cat >>confdefs.h <<_ACEOF
2691#define PACKAGE_STRING "$PACKAGE_STRING"
2692_ACEOF
2693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694cat >>confdefs.h <<_ACEOF
2695#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2696_ACEOF
2697
Matthias Kloseb9621712010-04-24 17:59:49 +00002698cat >>confdefs.h <<_ACEOF
2699#define PACKAGE_URL "$PACKAGE_URL"
2700_ACEOF
2701
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
2703# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002704# Prefer an explicitly selected file to automatically selected ones.
2705ac_site_file1=NONE
2706ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002708 # We do not want a PATH search for config.site.
2709 case $CONFIG_SITE in #((
2710 -*) ac_site_file1=./$CONFIG_SITE;;
2711 */*) ac_site_file1=$CONFIG_SITE;;
2712 *) ac_site_file1=./$CONFIG_SITE;;
2713 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002714elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 ac_site_file1=$prefix/share/config.site
2716 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002717else
Matthias Kloseb9621712010-04-24 17:59:49 +00002718 ac_site_file1=$ac_default_prefix/share/config.site
2719 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002721for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722do
Matthias Kloseb9621712010-04-24 17:59:49 +00002723 test "x$ac_site_file" = xNONE && continue
2724 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2726$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002728 . "$ac_site_file" \
2729 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2731as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002732See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002733 fi
2734done
2735
2736if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002737 # Some versions of bash will fail to source /dev/null (special files
2738 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2739 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2741$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2744 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 esac
2746 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747else
Matthias Kloseb9621712010-04-24 17:59:49 +00002748 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2749$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 >$cache_file
2751fi
2752
2753# Check that the precious variables saved in the cache have kept the same
2754# value.
2755ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002757 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2758 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002759 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2760 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 case $ac_old_set,$ac_new_set in
2762 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002763 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2764$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 +00002765 ac_cache_corrupted=: ;;
2766 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2768$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 ac_cache_corrupted=: ;;
2770 ,);;
2771 *)
2772 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002773 # differences in whitespace do not lead to failure.
2774 ac_old_val_w=`echo x $ac_old_val`
2775 ac_new_val_w=`echo x $ac_new_val`
2776 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2778$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2779 ac_cache_corrupted=:
2780 else
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2782$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2783 eval $ac_var=\$ac_old_val
2784 fi
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2786$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2788$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 fi;;
2790 esac
2791 # Pass precious variables to config.status.
2792 if test "$ac_new_set" = set; then
2793 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002794 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 *) ac_arg=$ac_var=$ac_new_val ;;
2796 esac
2797 case " $ac_configure_args " in
2798 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002799 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002800 esac
2801 fi
2802done
2803if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2807$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002808 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002810## -------------------- ##
2811## Main body of script. ##
2812## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002813
Guido van Rossum7f43da71994-08-01 12:15:30 +00002814ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2818ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819
Guido van Rossum627b2d71993-12-24 10:39:16 +00002820
Michael W. Hudson54241132001-12-07 15:38:26 +00002821
Trent Nelson4d4ec652012-10-16 08:51:24 -04002822
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002823if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002824 # If we're building out-of-tree, we need to make sure the following
2825 # resources get picked up before their $srcdir counterparts.
2826 # Objects/ -> typeslots.inc
2827 # Include/ -> Python-ast.h, graminit.h
2828 # Python/ -> importlib.h
2829 # (A side effect of this is that these resources will automatically be
2830 # regenerated when building out-of-tree, regardless of whether or not
2831 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2832 # off.)
2833 BASECPPFLAGS="-IObjects -IInclude -IPython"
2834else
2835 BASECPPFLAGS=""
2836fi
2837
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002838
2839
2840
2841
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002842if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002843then
2844# Extract the first word of "hg", so it can be a program name with args.
2845set dummy hg; ac_word=$2
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2847$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002848if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002849 $as_echo_n "(cached) " >&6
2850else
2851 if test -n "$HAS_HG"; then
2852 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2853else
2854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2855for as_dir in $PATH
2856do
2857 IFS=$as_save_IFS
2858 test -z "$as_dir" && as_dir=.
2859 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002861 ac_cv_prog_HAS_HG="found"
2862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2863 break 2
2864 fi
2865done
2866 done
2867IFS=$as_save_IFS
2868
2869 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2870fi
2871fi
2872HAS_HG=$ac_cv_prog_HAS_HG
2873if test -n "$HAS_HG"; then
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2875$as_echo "$HAS_HG" >&6; }
2876else
2877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2878$as_echo "no" >&6; }
2879fi
2880
2881
2882else
2883HAS_HG=no-repository
2884fi
2885if test $HAS_HG = found
2886then
2887 HGVERSION="hg id -i \$(srcdir)"
2888 HGTAG="hg id -t \$(srcdir)"
2889 HGBRANCH="hg id -b \$(srcdir)"
2890else
2891 HGVERSION=""
2892 HGTAG=""
2893 HGBRANCH=""
2894fi
2895
2896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002897ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002898
2899
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002900ac_aux_dir=
2901for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2902 if test -f "$ac_dir/install-sh"; then
2903 ac_aux_dir=$ac_dir
2904 ac_install_sh="$ac_aux_dir/install-sh -c"
2905 break
2906 elif test -f "$ac_dir/install.sh"; then
2907 ac_aux_dir=$ac_dir
2908 ac_install_sh="$ac_aux_dir/install.sh -c"
2909 break
2910 elif test -f "$ac_dir/shtool"; then
2911 ac_aux_dir=$ac_dir
2912 ac_install_sh="$ac_aux_dir/shtool install -c"
2913 break
2914 fi
2915done
2916if test -z "$ac_aux_dir"; then
2917 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2918fi
2919
2920# These three variables are undocumented and unsupported,
2921# and are intended to be withdrawn in a future Autoconf release.
2922# They can cause serious problems if a builder's source tree is in a directory
2923# whose full name contains unusual characters.
2924ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2925ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2926ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2927
2928
2929# Make sure we can run config.sub.
2930$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2931 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2932
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2934$as_echo_n "checking build system type... " >&6; }
2935if ${ac_cv_build+:} false; then :
2936 $as_echo_n "(cached) " >&6
2937else
2938 ac_build_alias=$build_alias
2939test "x$ac_build_alias" = x &&
2940 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2941test "x$ac_build_alias" = x &&
2942 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2943ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2944 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2945
2946fi
2947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2948$as_echo "$ac_cv_build" >&6; }
2949case $ac_cv_build in
2950*-*-*) ;;
2951*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2952esac
2953build=$ac_cv_build
2954ac_save_IFS=$IFS; IFS='-'
2955set x $ac_cv_build
2956shift
2957build_cpu=$1
2958build_vendor=$2
2959shift; shift
2960# Remember, the first character of IFS is used to create $*,
2961# except with old shells:
2962build_os=$*
2963IFS=$ac_save_IFS
2964case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2965
2966
2967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2968$as_echo_n "checking host system type... " >&6; }
2969if ${ac_cv_host+:} false; then :
2970 $as_echo_n "(cached) " >&6
2971else
2972 if test "x$host_alias" = x; then
2973 ac_cv_host=$ac_cv_build
2974else
2975 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2976 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2977fi
2978
2979fi
2980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2981$as_echo "$ac_cv_host" >&6; }
2982case $ac_cv_host in
2983*-*-*) ;;
2984*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2985esac
2986host=$ac_cv_host
2987ac_save_IFS=$IFS; IFS='-'
2988set x $ac_cv_host
2989shift
2990host_cpu=$1
2991host_vendor=$2
2992shift; shift
2993# Remember, the first character of IFS is used to create $*,
2994# except with old shells:
2995host_os=$*
2996IFS=$ac_save_IFS
2997case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2998
2999
3000
doko@python.orga10e4a92013-01-25 18:45:12 +01003001
3002
Ned Deilyfcbc2462014-08-22 13:32:49 -07003003# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
3004rm -f pybuilddir.txt
3005
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003006for ac_prog in python$PACKAGE_VERSION python3 python
3007do
3008 # Extract the first word of "$ac_prog", so it can be a program name with args.
3009set dummy $ac_prog; ac_word=$2
3010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3011$as_echo_n "checking for $ac_word... " >&6; }
3012if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
3013 $as_echo_n "(cached) " >&6
3014else
3015 if test -n "$PYTHON_FOR_GEN"; then
3016 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
3017else
3018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3019for as_dir in $PATH
3020do
3021 IFS=$as_save_IFS
3022 test -z "$as_dir" && as_dir=.
3023 for ac_exec_ext in '' $ac_executable_extensions; do
3024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3025 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3027 break 2
3028 fi
3029done
3030 done
3031IFS=$as_save_IFS
3032
3033fi
3034fi
3035PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3036if test -n "$PYTHON_FOR_GEN"; then
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3038$as_echo "$PYTHON_FOR_GEN" >&6; }
3039else
3040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3041$as_echo "no" >&6; }
3042fi
3043
3044
3045 test -n "$PYTHON_FOR_GEN" && break
3046done
3047test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3048
3049if test "$PYTHON_FOR_GEN" = not-found; then
3050 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3051 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3052 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3053fi
3054
3055
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003056if test "$cross_compiling" = yes; then
3057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3058$as_echo_n "checking for python interpreter for cross build... " >&6; }
3059 if test -z "$PYTHON_FOR_BUILD"; then
3060 for interp in python$PACKAGE_VERSION python3 python; do
3061 which $interp >/dev/null 2>&1 || continue
3062 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3063 break
3064 fi
3065 interp=
3066 done
3067 if test x$interp = x; then
3068 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3069 fi
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3071$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003072 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 +02003073 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003074 # Used to comment out stuff for rebuilding generated files
3075 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003076elif test "$cross_compiling" = maybe; then
3077 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003078else
3079 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003080 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003081fi
3082
3083
Martin v. Löwis11437992002-04-12 09:54:03 +00003084
Martin Pantereac67be2016-07-28 01:28:27 +00003085
Benjamin Petersond23f8222009-04-05 19:13:16 +00003086if test "$prefix" != "/"; then
3087 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3088fi
3089
3090
Martin v. Löwis11437992002-04-12 09:54:03 +00003091
3092
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003093# We don't use PACKAGE_ variables, and they cause conflicts
3094# with other autoconf-based packages that include Python.h
3095grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3096rm confdefs.h
3097mv confdefs.h.new confdefs.h
3098
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003099
Yury Selivanov7aa53412015-05-30 10:57:56 -04003100VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003101
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003102# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003103
3104SOVERSION=1.0
3105
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003106# The later defininition of _XOPEN_SOURCE disables certain features
3107# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3108
Matthias Kloseb9621712010-04-24 17:59:49 +00003109$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003110
3111
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003112# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3113# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3114# them.
3115
Matthias Kloseb9621712010-04-24 17:59:49 +00003116$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003117
3118
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003119# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3120# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3121# them.
3122
Matthias Kloseb9621712010-04-24 17:59:49 +00003123$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003124
3125
Martin v. Löwisd6320502004-08-12 13:45:08 +00003126# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3127# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3128
Matthias Kloseb9621712010-04-24 17:59:49 +00003129$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003130
3131
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3133# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3134# them.
3135
Matthias Kloseb9621712010-04-24 17:59:49 +00003136$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003137
3138
3139
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003140define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003141
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003142# Arguments passed to configure.
3143
3144CONFIG_ARGS="$ac_configure_args"
3145
Matthias Kloseb9621712010-04-24 17:59:49 +00003146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3147$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003149if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003150 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003151 case $enableval in
3152 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003153 # Locate the best usable SDK, see Mac/README.txt for more
3154 # information
3155 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003156 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003157 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003158 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3159 if test ! -d "${enableval}"
3160 then
3161 enableval=/
3162 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003163 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003164 ;;
3165 esac
3166 case $enableval in
3167 no)
3168 UNIVERSALSDK=
3169 enable_universalsdk=
3170 ;;
3171 *)
3172 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003173 if test ! -d "${UNIVERSALSDK}"
3174 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003175 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003176 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177 ;;
3178 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003179
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003180
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181else
3182
3183 UNIVERSALSDK=
3184 enable_universalsdk=
3185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003188if test -n "${UNIVERSALSDK}"
3189then
Matthias Kloseb9621712010-04-24 17:59:49 +00003190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3191$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003192else
Matthias Kloseb9621712010-04-24 17:59:49 +00003193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3194$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003195fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003198
Ned Deily87adb6e2013-10-18 21:09:56 -07003199ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003200
Ned Deilycbfb9a52012-06-23 16:02:19 -07003201# For backward compatibility reasons we prefer to select '32-bit' if available,
3202# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003203UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003204if test "`uname -s`" = "Darwin"
3205then
3206 if test -n "${UNIVERSALSDK}"
3207 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003208 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003209 then
3210 UNIVERSAL_ARCHS="intel"
3211 fi
3212 fi
3213fi
3214
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003215
Matthias Kloseb9621712010-04-24 17:59:49 +00003216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3217$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003218
3219# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003220if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003221 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003222 UNIVERSAL_ARCHS="$withval"
3223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224fi
3225
Ned Deily87adb6e2013-10-18 21:09:56 -07003226if test -n "${UNIVERSALSDK}"
3227then
3228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3229$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3230else
3231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3232$as_echo "no" >&6; }
3233fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235
3236# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003237if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003238 withval=$with_framework_name;
3239 PYTHONFRAMEWORK=${withval}
3240 PYTHONFRAMEWORKDIR=${withval}.framework
3241 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3242
3243else
3244
3245 PYTHONFRAMEWORK=Python
3246 PYTHONFRAMEWORKDIR=Python.framework
3247 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3248
3249fi
3250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003252if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003254 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003255 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003256 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003257 esac
3258 case $enableval in
3259 no)
3260 PYTHONFRAMEWORK=
3261 PYTHONFRAMEWORKDIR=no-framework
3262 PYTHONFRAMEWORKPREFIX=
3263 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003264 FRAMEWORKINSTALLFIRST=
3265 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003266 FRAMEWORKALTINSTALLFIRST=
3267 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003268 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003269 if test "x${prefix}" = "xNONE"; then
3270 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3271 else
3272 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3273 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003274 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003275 ;;
3276 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003277 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003278 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003279 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003280 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003281 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3282 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003283 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003284 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003285
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003286 if test "x${prefix}" = "xNONE" ; then
3287 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003288
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003289 else
3290 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3291 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003292
3293 case "${enableval}" in
3294 /System*)
3295 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3296 if test "${prefix}" = "NONE" ; then
3297 # See below
3298 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3299 fi
3300 ;;
3301
3302 /Library*)
3303 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3304 ;;
3305
3306 */Library/Frameworks)
3307 MDIR="`dirname "${enableval}"`"
3308 MDIR="`dirname "${MDIR}"`"
3309 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3310
3311 if test "${prefix}" = "NONE"; then
3312 # User hasn't specified the
3313 # --prefix option, but wants to install
3314 # the framework in a non-default location,
3315 # ensure that the compatibility links get
3316 # installed relative to that prefix as well
3317 # instead of in /usr/local.
3318 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3319 fi
3320 ;;
3321
3322 *)
3323 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3324 ;;
3325 esac
3326
Jack Jansen127e56e2001-09-11 14:41:54 +00003327 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003328
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003329 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003330 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003334
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003335 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3336
3337 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3338
Jack Jansene578a632001-08-15 01:27:14 +00003339 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003340
Guido van Rossum563e7081996-09-10 18:20:48 +00003341else
Martin v. Löwis11437992002-04-12 09:54:03 +00003342
Jack Jansene578a632001-08-15 01:27:14 +00003343 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003344 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003345 PYTHONFRAMEWORKPREFIX=
3346 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003347 FRAMEWORKINSTALLFIRST=
3348 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003349 FRAMEWORKALTINSTALLFIRST=
3350 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003351 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003352 if test "x${prefix}" = "xNONE" ; then
3353 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3354 else
3355 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3356 fi
Jack Jansene578a632001-08-15 01:27:14 +00003357 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003358
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003359
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003360fi
3361
Thomas Wouters477c8d52006-05-27 19:21:47 +00003362
3363
Michael W. Hudson54241132001-12-07 15:38:26 +00003364
3365
3366
3367
Jack Jansene578a632001-08-15 01:27:14 +00003368
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003369
3370
3371
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003372
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003373
Ned Deilyb8f944f2013-11-21 22:42:25 -08003374
Jack Jansene578a632001-08-15 01:27:14 +00003375##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003376## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003377## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003378##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003379# Set name for machine-dependent library files
3380
Matthias Kloseb9621712010-04-24 17:59:49 +00003381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3382$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003383if test -z "$MACHDEP"
3384then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003385 # avoid using uname for cross builds
3386 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003387 # ac_sys_system and ac_sys_release are used for setting
3388 # a lot of different things including 'define_xopen_source'
3389 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003390 case "$host" in
3391 *-*-linux*)
3392 ac_sys_system=Linux
3393 ;;
3394 *-*-cygwin*)
3395 ac_sys_system=Cygwin
3396 ;;
3397 *)
3398 # for now, limit cross builds to known configurations
3399 MACHDEP="unknown"
3400 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3401 esac
3402 ac_sys_release=
3403 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003404 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003405 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003406 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003407 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003408 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003409 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003410 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003411 fi
3412 ac_md_system=`echo $ac_sys_system |
3413 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3414 ac_md_release=`echo $ac_sys_release |
3415 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3416 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003417
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003418 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003419 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003420 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003421 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003422 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003423 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003424 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003425fi
Guido van Rossum91922671997-10-09 20:24:13 +00003426
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003427
3428if test "$cross_compiling" = yes; then
3429 case "$host" in
3430 *-*-linux*)
3431 case "$host_cpu" in
3432 arm*)
3433 _host_cpu=arm
3434 ;;
3435 *)
3436 _host_cpu=$host_cpu
3437 esac
3438 ;;
3439 *-*-cygwin*)
3440 _host_cpu=
3441 ;;
3442 *)
3443 # for now, limit cross builds to known configurations
3444 MACHDEP="unknown"
3445 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3446 esac
3447 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3448fi
3449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3451# disable features if it is defined, without any means to access these
3452# features as extensions. For these systems, we skip the definition of
3453# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3454# some feature, make sure there is no alternative way to access this
3455# feature. Also, when using wildcards, make sure you have verified the
3456# need for not defining _XOPEN_SOURCE on all systems matching the
3457# wildcard, and that the wildcard does not include future systems
3458# (which may remove their limitations).
3459case $ac_sys_system/$ac_sys_release in
3460 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3461 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003462 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003463 # In addition, Stefan Krah confirms that issue #1244610 exists through
3464 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003465 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003466 define_xopen_source=no
3467 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3468 # also defined. This can be overridden by defining _BSD_SOURCE
3469 # As this has a different meaning on Linux, only define it on OpenBSD
3470
Matthias Kloseb9621712010-04-24 17:59:49 +00003471$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003472
3473 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003474 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003475 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3476 # also defined. This can be overridden by defining _BSD_SOURCE
3477 # As this has a different meaning on Linux, only define it on OpenBSD
3478
Matthias Kloseb9621712010-04-24 17:59:49 +00003479$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003480
3481 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003482 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3483 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3484 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003485 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 +00003486 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003487 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3488 # request to enable features supported by the standard as a request
3489 # to disable features not supported by the standard. The best way
3490 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3491 # entirely and define __EXTENSIONS__ instead.
3492 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003493 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003494 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3495 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003496 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003497 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003498 define_xopen_source=no;;
3499 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003500 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003501 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003502 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003503 # On FreeBSD 4, the math functions C89 does not cover are never defined
3504 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3505 FreeBSD/4.*)
3506 define_xopen_source=no;;
3507 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3508 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3509 # identifies itself as Darwin/7.*
3510 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3511 # disables platform specific features beyond repair.
3512 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3513 # has no effect, don't bother defining them
3514 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003515 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003516 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003517 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003518 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3519 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3520 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003521 AIX/4)
3522 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003523 AIX/5)
3524 if test `uname -r` -eq 1; then
3525 define_xopen_source=no
3526 fi
3527 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003528 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3529 # defining NI_NUMERICHOST.
3530 QNX/6.3.2)
3531 define_xopen_source=no
3532 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003533
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003534esac
3535
3536if test $define_xopen_source = yes
3537then
Victor Stinner14d098d2011-09-07 22:29:43 +02003538 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003539
Victor Stinner14d098d2011-09-07 22:29:43 +02003540$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003541
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003542
3543 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3544 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3545 # several APIs are not declared. Since this is also needed in some
3546 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003547
Matthias Kloseb9621712010-04-24 17:59:49 +00003548$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003549
3550
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003551
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003552$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003553
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003554fi
3555
Christian Heimes647cd872013-12-07 23:39:33 +01003556# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3557case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003558 hp*|HP*)
3559 define_stdc_a1=yes;;
3560 *)
3561 define_stdc_a1=no;;
3562esac
3563
3564if test $define_stdc_a1 = yes
3565then
Christian Heimes647cd872013-12-07 23:39:33 +01003566
3567$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3568
Christian Heimesb02bcae2013-12-08 15:21:08 +01003569fi
Christian Heimes647cd872013-12-07 23:39:33 +01003570
Guido van Rossum91922671997-10-09 20:24:13 +00003571#
3572# SGI compilers allow the specification of the both the ABI and the
3573# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003574# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003575#
3576# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3577# thus supply support for various ABI/ISA combinations. The MACHDEP
3578# variable is also adjusted.
3579#
3580
3581if test ! -z "$SGI_ABI"
3582then
3583 CC="cc $SGI_ABI"
3584 LDFLAGS="$SGI_ABI $LDFLAGS"
3585 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3588$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003589
Jack Jansen6b08a402004-06-03 12:41:45 +00003590# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3591# it may influence the way we can build extensions, so distutils
3592# needs to check it
3593
Thomas Wouters477c8d52006-05-27 19:21:47 +00003594
Jack Jansen6b08a402004-06-03 12:41:45 +00003595CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003596EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003597
Guido van Rossum627b2d71993-12-24 10:39:16 +00003598# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003599
3600# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3601# for debug/optimization stuff. BASECFLAGS is for flags that are required
3602# just to get things to compile and link. Users are free to override OPT
3603# when running configure or make. The build should not break if they do.
3604# BASECFLAGS should generally not be messed with, however.
3605
3606# XXX shouldn't some/most/all of this code be merged with the stuff later
3607# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3609$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003612if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003614 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003615 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003616 without_gcc=yes;;
3617 yes) CC=gcc
3618 without_gcc=no;;
3619 *) CC=$withval
3620 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003621 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003622else
Martin v. Löwis11437992002-04-12 09:54:03 +00003623
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003624 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003625 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003626 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003627 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003628 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629fi
3630
Matthias Kloseb9621712010-04-24 17:59:49 +00003631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3632$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003633
Zachary Ware5af85642015-12-21 12:09:17 -06003634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3635$as_echo_n "checking for --with-icc... " >&6; }
3636
3637# Check whether --with-icc was given.
3638if test "${with_icc+set}" = set; then :
3639 withval=$with_icc;
3640 case $withval in
3641 no) CC=${CC:-cc}
3642 with_icc=no;;
3643 yes) CC=icc
3644 CXX=icpc
3645 with_icc=yes;;
3646 *) CC=$withval
3647 with_icc=$withval;;
3648 esac
3649else
3650
3651 with_icc=no
3652fi
3653
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3655$as_echo "$with_icc" >&6; }
3656
Guido van Rossum8b131c51995-03-09 14:10:13 +00003657# If the user switches compilers, we can't believe the cache
3658if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3659then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003660 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003661(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003662fi
3663
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003664# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3665# when the compiler supports them, but we don't always want -O2, and
3666# we set -g later.
3667if test -z "$CFLAGS"; then
3668 CFLAGS=
3669fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003670
3671if test "$ac_sys_system" = "Darwin"
3672then
3673 # Compiler selection on MacOSX is more complicated than
3674 # AC_PROG_CC can handle, see Mac/README.txt for more
3675 # information
3676 if test -z "${CC}"
3677 then
3678 found_gcc=
3679 found_clang=
3680 as_save_IFS=$IFS; IFS=:
3681 for as_dir in $PATH
3682 do
3683 IFS=$as_save_IFS
3684 if test -x $as_dir/gcc; then
3685 if test -z "${found_gcc}"; then
3686 found_gcc=$as_dir/gcc
3687 fi
3688 fi
3689 if test -x $as_dir/clang; then
3690 if test -z "${found_clang}"; then
3691 found_clang=$as_dir/clang
3692 fi
3693 fi
3694 done
3695 IFS=$as_save_IFS
3696
3697 if test -n "$found_gcc" -a -n "$found_clang"
3698 then
3699 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3700 then
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3702$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3703 CC="$found_clang"
3704 CXX="$found_clang++"
3705 fi
3706
3707
3708 elif test -z "$found_gcc" -a -n "$found_clang"
3709 then
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3711$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3712 CC="$found_clang"
3713 CXX="$found_clang++"
3714
3715 elif test -z "$found_gcc" -a -z "$found_clang"
3716 then
3717 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3718 if test -n "${found_clang}"
3719 then
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3721$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3722 CC="${found_clang}"
3723 CXX="`/usr/bin/xcrun -find clang++`"
3724
3725 # else: use default behaviour
3726 fi
3727 fi
3728 fi
3729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003730ac_ext=c
3731ac_cpp='$CPP $CPPFLAGS'
3732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3734ac_compiler_gnu=$ac_cv_c_compiler_gnu
3735if test -n "$ac_tool_prefix"; then
3736 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3737set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3739$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003740if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742else
3743 if test -n "$CC"; then
3744 ac_cv_prog_CC="$CC" # Let the user override the test.
3745else
Martin v. Löwis11437992002-04-12 09:54:03 +00003746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $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 +00003755 break 2
3756 fi
3757done
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003760
Jack Jansendd19cf82001-12-06 22:36:17 +00003761fi
3762fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003763CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003764if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3766$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003767else
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003770fi
3771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773fi
3774if test -z "$ac_cv_prog_CC"; then
3775 ac_ct_CC=$CC
3776 # Extract the first word of "gcc", so it can be a program name with args.
3777set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3779$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003780if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003782else
3783 if test -n "$ac_ct_CC"; then
3784 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3785else
3786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3787for as_dir in $PATH
3788do
3789 IFS=$as_save_IFS
3790 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $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 +00003795 break 2
3796 fi
3797done
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003800
3801fi
3802fi
3803ac_ct_CC=$ac_cv_prog_ac_ct_CC
3804if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3806$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3809$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003810fi
3811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812 if test "x$ac_ct_CC" = x; then
3813 CC=""
3814 else
3815 case $cross_compiling:$ac_tool_warned in
3816yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819ac_tool_warned=yes ;;
3820esac
3821 CC=$ac_ct_CC
3822 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003823else
3824 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003825fi
3826
Jack Jansendd19cf82001-12-06 22:36:17 +00003827if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828 if test -n "$ac_tool_prefix"; then
3829 # 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 +00003830set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3832$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003833if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003835else
3836 if test -n "$CC"; then
3837 ac_cv_prog_CC="$CC" # Let the user override the test.
3838else
Martin v. Löwis11437992002-04-12 09:54:03 +00003839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH
3841do
3842 IFS=$as_save_IFS
3843 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003846 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 $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 +00003848 break 2
3849 fi
3850done
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003853
3854fi
3855fi
3856CC=$ac_cv_prog_CC
3857if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3859$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003860else
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3862$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863fi
3864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868if test -z "$CC"; then
3869 # Extract the first word of "cc", so it can be a program name with args.
3870set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3872$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003873if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003875else
3876 if test -n "$CC"; then
3877 ac_cv_prog_CC="$CC" # Let the user override the test.
3878else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003879 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3881for as_dir in $PATH
3882do
3883 IFS=$as_save_IFS
3884 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003887 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3888 ac_prog_rejected=yes
3889 continue
3890 fi
3891 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 $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 +00003893 break 2
3894 fi
3895done
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003898
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003899if test $ac_prog_rejected = yes; then
3900 # We found a bogon in the path, so make sure we never use it.
3901 set dummy $ac_cv_prog_CC
3902 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003904 # We chose a different compiler from the bogus one.
3905 # However, it has the same basename, so the bogon will be chosen
3906 # first if we set CC to just the basename; use the full file name.
3907 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003908 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003909 fi
3910fi
3911fi
3912fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003913CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003914if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3916$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003917else
Matthias Kloseb9621712010-04-24 17:59:49 +00003918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3919$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003920fi
3921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922
Martin v. Löwis11437992002-04-12 09:54:03 +00003923fi
3924if test -z "$CC"; then
3925 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003927 do
3928 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3929set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3931$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003932if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003934else
3935 if test -n "$CC"; then
3936 ac_cv_prog_CC="$CC" # Let the user override the test.
3937else
Martin v. Löwis11437992002-04-12 09:54:03 +00003938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3939for as_dir in $PATH
3940do
3941 IFS=$as_save_IFS
3942 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003945 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 $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 +00003947 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003948 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003949done
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003952
3953fi
3954fi
3955CC=$ac_cv_prog_CC
3956if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3958$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003959else
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3961$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003962fi
3963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964
Martin v. Löwis11437992002-04-12 09:54:03 +00003965 test -n "$CC" && break
3966 done
3967fi
3968if test -z "$CC"; then
3969 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003971do
3972 # Extract the first word of "$ac_prog", so it can be a program name with args.
3973set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3975$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003976if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003978else
3979 if test -n "$ac_ct_CC"; then
3980 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3981else
3982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3983for as_dir in $PATH
3984do
3985 IFS=$as_save_IFS
3986 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003988 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003989 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003990 $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 +00003991 break 2
3992 fi
3993done
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003996
Martin v. Löwis11437992002-04-12 09:54:03 +00003997fi
3998fi
3999ac_ct_CC=$ac_cv_prog_ac_ct_CC
4000if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4002$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004003else
Matthias Kloseb9621712010-04-24 17:59:49 +00004004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4005$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004006fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008
Martin v. Löwis11437992002-04-12 09:54:03 +00004009 test -n "$ac_ct_CC" && break
4010done
Michael W. Hudson54241132001-12-07 15:38:26 +00004011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 if test "x$ac_ct_CC" = x; then
4013 CC=""
4014 else
4015 case $cross_compiling:$ac_tool_warned in
4016yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019ac_tool_warned=yes ;;
4020esac
4021 CC=$ac_ct_CC
4022 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004023fi
4024
4025fi
4026
4027
Matthias Kloseb9621712010-04-24 17:59:49 +00004028test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004030as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004031See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004032
4033# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004034$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4035set X $ac_compile
4036ac_compiler=$2
4037for ac_option in --version -v -V -qversion; do
4038 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
4045 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004046 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 if test -s conftest.err; then
4048 sed '10a\
4049... rest of stderr output deleted ...
4050 10q' conftest.err >conftest.er1
4051 cat conftest.er1 >&5
4052 fi
4053 rm -f conftest.er1 conftest.err
4054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4055 test $ac_status = 0; }
4056done
Martin v. Löwis11437992002-04-12 09:54:03 +00004057
Matthias Kloseb9621712010-04-24 17:59:49 +00004058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004059/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004060
Martin v. Löwis11437992002-04-12 09:54:03 +00004061int
4062main ()
4063{
4064
4065 ;
4066 return 0;
4067}
4068_ACEOF
4069ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004070ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004071# Try to create an executable without -o first, disregard a.out.
4072# It will help us diagnose broken compilers, and finding out an intuition
4073# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4075$as_echo_n "checking whether the C compiler works... " >&6; }
4076ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4077
4078# The possible output files:
4079ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081ac_rmfiles=
4082for ac_file in $ac_files
4083do
4084 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4087 esac
4088done
4089rm -f $ac_rmfiles
4090
Matthias Kloseb9621712010-04-24 17:59:49 +00004091if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092case "(($ac_try" in
4093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4094 *) ac_try_echo=$ac_try;;
4095esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4097$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004098 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004099 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4101 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4103# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4104# in a Makefile. We should not override ac_cv_exeext if it was cached,
4105# so that the user can short-circuit this test for compilers unknown to
4106# Autoconf.
4107for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004108do
4109 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004110 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004112 ;;
4113 [ab].out )
4114 # We found the default executable, but exeext='' is most
4115 # certainly right.
4116 break;;
4117 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119 then :; else
4120 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4121 fi
4122 # We set ac_cv_exeext here because the later test for it is not
4123 # safe: cross compilers may not add the suffix if given an `-o'
4124 # argument, so we may need to know it at that point already.
4125 # Even if this section looks crufty: it has the advantage of
4126 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004127 break;;
4128 * )
4129 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 esac
4131done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132test "$ac_cv_exeext" = no && ac_cv_exeext=
4133
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004134else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 ac_file=''
4136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004137if test -z "$ac_file"; then :
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4139$as_echo "no" >&6; }
4140$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004141sed 's/^/| /' conftest.$ac_ext >&5
4142
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004145as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004146See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004147else
4148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4149$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4152$as_echo_n "checking for C compiler default output file name... " >&6; }
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4154$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004155ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004156
Matthias Kloseb9621712010-04-24 17:59:49 +00004157rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004158ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4160$as_echo_n "checking for suffix of executables... " >&6; }
4161if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162case "(($ac_try" in
4163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4164 *) ac_try_echo=$ac_try;;
4165esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4167$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4171 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004172 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4173# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4174# work properly (i.e., refer to `conftest.exe'), while it won't with
4175# `rm'.
4176for ac_file in conftest.exe conftest conftest.*; do
4177 test -f "$ac_file" || continue
4178 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004180 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4181 break;;
4182 * ) break;;
4183 esac
4184done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004188as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004189See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004191rm -f conftest conftest$ac_cv_exeext
4192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4193$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004194
4195rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004196EXEEXT=$ac_cv_exeext
4197ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4199/* end confdefs.h. */
4200#include <stdio.h>
4201int
4202main ()
4203{
4204FILE *f = fopen ("conftest.out", "w");
4205 return ferror (f) || fclose (f) != 0;
4206
4207 ;
4208 return 0;
4209}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004211ac_clean_files="$ac_clean_files conftest.out"
4212# Check that the compiler produces executables we can run. If not, either
4213# the compiler is broken, or we cross compile.
4214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4215$as_echo_n "checking whether we are cross compiling... " >&6; }
4216if test "$cross_compiling" != yes; then
4217 { { ac_try="$ac_link"
4218case "(($ac_try" in
4219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4220 *) ac_try_echo=$ac_try;;
4221esac
4222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4223$as_echo "$ac_try_echo"; } >&5
4224 (eval "$ac_link") 2>&5
4225 ac_status=$?
4226 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4227 test $ac_status = 0; }
4228 if { ac_try='./conftest$ac_cv_exeext'
4229 { { case "(($ac_try" in
4230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4231 *) ac_try_echo=$ac_try;;
4232esac
4233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4234$as_echo "$ac_try_echo"; } >&5
4235 (eval "$ac_try") 2>&5
4236 ac_status=$?
4237 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4238 test $ac_status = 0; }; }; then
4239 cross_compiling=no
4240 else
4241 if test "$cross_compiling" = maybe; then
4242 cross_compiling=yes
4243 else
4244 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004246as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004247If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004248See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 fi
4250 fi
4251fi
4252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4253$as_echo "$cross_compiling" >&6; }
4254
4255rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4256ac_clean_files=$ac_clean_files_save
4257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4258$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004259if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004260 $as_echo_n "(cached) " >&6
4261else
4262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004263/* end confdefs.h. */
4264
4265int
4266main ()
4267{
4268
4269 ;
4270 return 0;
4271}
4272_ACEOF
4273rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004274if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275case "(($ac_try" in
4276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4277 *) ac_try_echo=$ac_try;;
4278esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4280$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4284 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285 for ac_file in conftest.o conftest.obj conftest.*; do
4286 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004289 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4290 break;;
4291 esac
4292done
4293else
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004295sed 's/^/| /' conftest.$ac_ext >&5
4296
Matthias Kloseb9621712010-04-24 17:59:49 +00004297{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004299as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004300See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004301fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004302rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4305$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004306OBJEXT=$ac_cv_objext
4307ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4309$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004310if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004312else
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004315
Martin v. Löwis11437992002-04-12 09:54:03 +00004316int
4317main ()
4318{
4319#ifndef __GNUC__
4320 choke me
4321#endif
4322
4323 ;
4324 return 0;
4325}
4326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004328 ac_compiler_gnu=yes
4329else
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004333ac_cv_c_compiler_gnu=$ac_compiler_gnu
4334
4335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4337$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4338if test $ac_compiler_gnu = yes; then
4339 GCC=yes
4340else
4341 GCC=
4342fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004343ac_test_CFLAGS=${CFLAGS+set}
4344ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4346$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004347if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004349else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350 ac_save_c_werror_flag=$ac_c_werror_flag
4351 ac_c_werror_flag=yes
4352 ac_cv_prog_cc_g=no
4353 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004356
Martin v. Löwis11437992002-04-12 09:54:03 +00004357int
4358main ()
4359{
4360
4361 ;
4362 return 0;
4363}
4364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004365if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004366 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367else
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 CFLAGS=""
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370/* end confdefs.h. */
4371
4372int
4373main ()
4374{
4375
4376 ;
4377 return 0;
4378}
4379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004380if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381
Matthias Kloseb9621712010-04-24 17:59:49 +00004382else
4383 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386/* end confdefs.h. */
4387
4388int
4389main ()
4390{
4391
4392 ;
4393 return 0;
4394}
4395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004396if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4404 ac_c_werror_flag=$ac_save_c_werror_flag
4405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4407$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004408if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004409 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004410elif test $ac_cv_prog_cc_g = yes; then
4411 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004412 CFLAGS="-g -O2"
4413 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004414 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004415 fi
4416else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004417 if test "$GCC" = yes; then
4418 CFLAGS="-O2"
4419 else
4420 CFLAGS=
4421 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4424$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004425if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004427else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004429ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004431/* end confdefs.h. */
4432#include <stdarg.h>
4433#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004434struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004435/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4436struct buf { int x; };
4437FILE * (*rcsopen) (struct buf *, struct stat *, int);
4438static char *e (p, i)
4439 char **p;
4440 int i;
4441{
4442 return p[i];
4443}
4444static char *f (char * (*g) (char **, int), char **p, ...)
4445{
4446 char *s;
4447 va_list v;
4448 va_start (v,p);
4449 s = g (p, va_arg (v,int));
4450 va_end (v);
4451 return s;
4452}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004453
4454/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4455 function prototypes and stuff, but not '\xHH' hex character constants.
4456 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004457 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004458 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4459 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004461int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4464 inside strings and character constants. */
4465#define FOO(x) 'x'
4466int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4467
Skip Montanaro6dead952003-09-25 14:50:04 +00004468int test (int i, double x);
4469struct s1 {int (*f) (int a);};
4470struct s2 {int (*f) (double a);};
4471int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4472int argc;
4473char **argv;
4474int
4475main ()
4476{
4477return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4478 ;
4479 return 0;
4480}
4481_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4483 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004484do
4485 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004486 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004487 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004489rm -f core conftest.err conftest.$ac_objext
4490 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004491done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004492rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004493CC=$ac_save_CC
4494
4495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004496# AC_CACHE_VAL
4497case "x$ac_cv_prog_cc_c89" in
4498 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4500$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004501 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4503$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004504 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004505 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4507$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004508esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004509if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004510
Matthias Kloseb9621712010-04-24 17:59:49 +00004511fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004512
Martin v. Löwis11437992002-04-12 09:54:03 +00004513ac_ext=c
4514ac_cpp='$CPP $CPPFLAGS'
4515ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4516ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4517ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004518
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004519ac_ext=c
4520ac_cpp='$CPP $CPPFLAGS'
4521ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4522ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4523ac_compiler_gnu=$ac_cv_c_compiler_gnu
4524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4525$as_echo_n "checking how to run the C preprocessor... " >&6; }
4526# On Suns, sometimes $CPP names a directory.
4527if test -n "$CPP" && test -d "$CPP"; then
4528 CPP=
4529fi
4530if test -z "$CPP"; then
4531 if ${ac_cv_prog_CPP+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
4534 # Double quotes because CPP needs to be expanded
4535 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4536 do
4537 ac_preproc_ok=false
4538for ac_c_preproc_warn_flag in '' yes
4539do
4540 # Use a header file that comes with gcc, so configuring glibc
4541 # with a fresh cross-compiler works.
4542 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4543 # <limits.h> exists even on freestanding compilers.
4544 # On the NeXT, cc -E runs the code through the compiler's parser,
4545 # not just through cpp. "Syntax error" is here to catch this case.
4546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4547/* end confdefs.h. */
4548#ifdef __STDC__
4549# include <limits.h>
4550#else
4551# include <assert.h>
4552#endif
4553 Syntax error
4554_ACEOF
4555if ac_fn_c_try_cpp "$LINENO"; then :
4556
4557else
4558 # Broken: fails on valid input.
4559continue
4560fi
4561rm -f conftest.err conftest.i conftest.$ac_ext
4562
4563 # OK, works on sane cases. Now check whether nonexistent headers
4564 # can be detected and how.
4565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4566/* end confdefs.h. */
4567#include <ac_nonexistent.h>
4568_ACEOF
4569if ac_fn_c_try_cpp "$LINENO"; then :
4570 # Broken: success on invalid input.
4571continue
4572else
4573 # Passes both tests.
4574ac_preproc_ok=:
4575break
4576fi
4577rm -f conftest.err conftest.i conftest.$ac_ext
4578
4579done
4580# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4581rm -f conftest.i conftest.err conftest.$ac_ext
4582if $ac_preproc_ok; then :
4583 break
4584fi
4585
4586 done
4587 ac_cv_prog_CPP=$CPP
4588
4589fi
4590 CPP=$ac_cv_prog_CPP
4591else
4592 ac_cv_prog_CPP=$CPP
4593fi
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4595$as_echo "$CPP" >&6; }
4596ac_preproc_ok=false
4597for ac_c_preproc_warn_flag in '' yes
4598do
4599 # Use a header file that comes with gcc, so configuring glibc
4600 # with a fresh cross-compiler works.
4601 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4602 # <limits.h> exists even on freestanding compilers.
4603 # On the NeXT, cc -E runs the code through the compiler's parser,
4604 # not just through cpp. "Syntax error" is here to catch this case.
4605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4606/* end confdefs.h. */
4607#ifdef __STDC__
4608# include <limits.h>
4609#else
4610# include <assert.h>
4611#endif
4612 Syntax error
4613_ACEOF
4614if ac_fn_c_try_cpp "$LINENO"; then :
4615
4616else
4617 # Broken: fails on valid input.
4618continue
4619fi
4620rm -f conftest.err conftest.i conftest.$ac_ext
4621
4622 # OK, works on sane cases. Now check whether nonexistent headers
4623 # can be detected and how.
4624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4625/* end confdefs.h. */
4626#include <ac_nonexistent.h>
4627_ACEOF
4628if ac_fn_c_try_cpp "$LINENO"; then :
4629 # Broken: success on invalid input.
4630continue
4631else
4632 # Passes both tests.
4633ac_preproc_ok=:
4634break
4635fi
4636rm -f conftest.err conftest.i conftest.$ac_ext
4637
4638done
4639# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4640rm -f conftest.i conftest.err conftest.$ac_ext
4641if $ac_preproc_ok; then :
4642
4643else
4644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4646as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4647See \`config.log' for more details" "$LINENO" 5; }
4648fi
4649
4650ac_ext=c
4651ac_cpp='$CPP $CPPFLAGS'
4652ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4653ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4654ac_compiler_gnu=$ac_cv_c_compiler_gnu
4655
4656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4657$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4658if ${ac_cv_path_GREP+:} false; then :
4659 $as_echo_n "(cached) " >&6
4660else
4661 if test -z "$GREP"; then
4662 ac_path_GREP_found=false
4663 # Loop through the user's path and test for each of PROGNAME-LIST
4664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4665for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4666do
4667 IFS=$as_save_IFS
4668 test -z "$as_dir" && as_dir=.
4669 for ac_prog in grep ggrep; do
4670 for ac_exec_ext in '' $ac_executable_extensions; do
4671 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4672 as_fn_executable_p "$ac_path_GREP" || continue
4673# Check for GNU ac_path_GREP and select it if it is found.
4674 # Check for GNU $ac_path_GREP
4675case `"$ac_path_GREP" --version 2>&1` in
4676*GNU*)
4677 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4678*)
4679 ac_count=0
4680 $as_echo_n 0123456789 >"conftest.in"
4681 while :
4682 do
4683 cat "conftest.in" "conftest.in" >"conftest.tmp"
4684 mv "conftest.tmp" "conftest.in"
4685 cp "conftest.in" "conftest.nl"
4686 $as_echo 'GREP' >> "conftest.nl"
4687 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4688 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4689 as_fn_arith $ac_count + 1 && ac_count=$as_val
4690 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4691 # Best one so far, save it but keep looking for a better one
4692 ac_cv_path_GREP="$ac_path_GREP"
4693 ac_path_GREP_max=$ac_count
4694 fi
4695 # 10*(2^10) chars as input seems more than enough
4696 test $ac_count -gt 10 && break
4697 done
4698 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4699esac
4700
4701 $ac_path_GREP_found && break 3
4702 done
4703 done
4704 done
4705IFS=$as_save_IFS
4706 if test -z "$ac_cv_path_GREP"; then
4707 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4708 fi
4709else
4710 ac_cv_path_GREP=$GREP
4711fi
4712
4713fi
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4715$as_echo "$ac_cv_path_GREP" >&6; }
4716 GREP="$ac_cv_path_GREP"
4717
4718
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004719
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720
4721
Matthias Kloseb9621712010-04-24 17:59:49 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4723$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004725# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004726if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004727 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728
4729 case $withval in
4730 no) with_cxx_main=no
4731 MAINCC='$(CC)';;
4732 yes) with_cxx_main=yes
4733 MAINCC='$(CXX)';;
4734 *) with_cxx_main=yes
4735 MAINCC=$withval
4736 if test -z "$CXX"
4737 then
4738 CXX=$withval
4739 fi;;
4740 esac
4741else
4742
4743 with_cxx_main=no
4744 MAINCC='$(CC)'
4745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004746fi
4747
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4749$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004750
4751preset_cxx="$CXX"
4752if test -z "$CXX"
4753then
4754 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004755 gcc) if test -n "$ac_tool_prefix"; then
4756 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4757set dummy ${ac_tool_prefix}g++; ac_word=$2
4758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4759$as_echo_n "checking for $ac_word... " >&6; }
4760if ${ac_cv_path_CXX+:} false; then :
4761 $as_echo_n "(cached) " >&6
4762else
4763 case $CXX in
4764 [\\/]* | ?:[\\/]*)
4765 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4766 ;;
4767 *)
4768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4769for as_dir in notfound
4770do
4771 IFS=$as_save_IFS
4772 test -z "$as_dir" && as_dir=.
4773 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4777 break 2
4778 fi
4779done
4780 done
4781IFS=$as_save_IFS
4782
4783 ;;
4784esac
4785fi
4786CXX=$ac_cv_path_CXX
4787if test -n "$CXX"; then
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4789$as_echo "$CXX" >&6; }
4790else
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4792$as_echo "no" >&6; }
4793fi
4794
4795
4796fi
4797if test -z "$ac_cv_path_CXX"; then
4798 ac_pt_CXX=$CXX
4799 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803if ${ac_cv_path_ac_pt_CXX+:} false; then :
4804 $as_echo_n "(cached) " >&6
4805else
4806 case $ac_pt_CXX in
4807 [\\/]* | ?:[\\/]*)
4808 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4809 ;;
4810 *)
4811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812for as_dir in notfound
4813do
4814 IFS=$as_save_IFS
4815 test -z "$as_dir" && as_dir=.
4816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820 break 2
4821 fi
4822done
4823 done
4824IFS=$as_save_IFS
4825
4826 ;;
4827esac
4828fi
4829ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4830if test -n "$ac_pt_CXX"; then
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4832$as_echo "$ac_pt_CXX" >&6; }
4833else
4834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838 if test "x$ac_pt_CXX" = x; then
4839 CXX="g++"
4840 else
4841 case $cross_compiling:$ac_tool_warned in
4842yes:)
4843{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4844$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4845ac_tool_warned=yes ;;
4846esac
4847 CXX=$ac_pt_CXX
4848 fi
4849else
4850 CXX="$ac_cv_path_CXX"
4851fi
4852 ;;
4853 cc) if test -n "$ac_tool_prefix"; then
4854 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4855set dummy ${ac_tool_prefix}c++; ac_word=$2
4856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4857$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004858if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004859 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860else
4861 case $CXX in
4862 [\\/]* | ?:[\\/]*)
4863 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4864 ;;
4865 *)
4866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4867for as_dir in notfound
4868do
4869 IFS=$as_save_IFS
4870 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004871 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004873 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004875 break 2
4876 fi
4877done
Matthias Kloseb9621712010-04-24 17:59:49 +00004878 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004879IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004880
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004881 ;;
4882esac
4883fi
4884CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004885if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4887$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004888else
Matthias Kloseb9621712010-04-24 17:59:49 +00004889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4890$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004892
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893
4894fi
4895if test -z "$ac_cv_path_CXX"; then
4896 ac_pt_CXX=$CXX
4897 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004898set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4900$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004901if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004902 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004903else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004904 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004905 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004906 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 +00004907 ;;
4908 *)
4909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4910for as_dir in notfound
4911do
4912 IFS=$as_save_IFS
4913 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004914 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004916 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004918 break 2
4919 fi
4920done
Matthias Kloseb9621712010-04-24 17:59:49 +00004921 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004922IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004923
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004924 ;;
4925esac
4926fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004927ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4928if test -n "$ac_pt_CXX"; then
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4930$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004931else
Matthias Kloseb9621712010-04-24 17:59:49 +00004932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4933$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004935
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004936 if test "x$ac_pt_CXX" = x; then
4937 CXX="c++"
4938 else
4939 case $cross_compiling:$ac_tool_warned in
4940yes:)
4941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4943ac_tool_warned=yes ;;
4944esac
4945 CXX=$ac_pt_CXX
4946 fi
4947else
4948 CXX="$ac_cv_path_CXX"
4949fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004950 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004951 clang|*/clang) if test -n "$ac_tool_prefix"; then
4952 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4953set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4955$as_echo_n "checking for $ac_word... " >&6; }
4956if ${ac_cv_path_CXX+:} false; then :
4957 $as_echo_n "(cached) " >&6
4958else
4959 case $CXX in
4960 [\\/]* | ?:[\\/]*)
4961 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4962 ;;
4963 *)
4964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4965for as_dir in notfound
4966do
4967 IFS=$as_save_IFS
4968 test -z "$as_dir" && as_dir=.
4969 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004971 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4973 break 2
4974 fi
4975done
4976 done
4977IFS=$as_save_IFS
4978
Ned Deilycbfb9a52012-06-23 16:02:19 -07004979 ;;
4980esac
4981fi
4982CXX=$ac_cv_path_CXX
4983if test -n "$CXX"; then
4984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4985$as_echo "$CXX" >&6; }
4986else
4987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4988$as_echo "no" >&6; }
4989fi
4990
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004991
4992fi
4993if test -z "$ac_cv_path_CXX"; then
4994 ac_pt_CXX=$CXX
4995 # Extract the first word of "clang++", so it can be a program name with args.
4996set dummy clang++; ac_word=$2
4997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4998$as_echo_n "checking for $ac_word... " >&6; }
4999if ${ac_cv_path_ac_pt_CXX+:} false; then :
5000 $as_echo_n "(cached) " >&6
5001else
5002 case $ac_pt_CXX in
5003 [\\/]* | ?:[\\/]*)
5004 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5005 ;;
5006 *)
5007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5008for as_dir in notfound
5009do
5010 IFS=$as_save_IFS
5011 test -z "$as_dir" && as_dir=.
5012 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005014 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5016 break 2
5017 fi
5018done
5019 done
5020IFS=$as_save_IFS
5021
5022 ;;
5023esac
5024fi
5025ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5026if test -n "$ac_pt_CXX"; then
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5028$as_echo "$ac_pt_CXX" >&6; }
5029else
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5031$as_echo "no" >&6; }
5032fi
5033
5034 if test "x$ac_pt_CXX" = x; then
5035 CXX="clang++"
5036 else
5037 case $cross_compiling:$ac_tool_warned in
5038yes:)
5039{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5040$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5041ac_tool_warned=yes ;;
5042esac
5043 CXX=$ac_pt_CXX
5044 fi
5045else
5046 CXX="$ac_cv_path_CXX"
5047fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005048 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005049 icc|*/icc) if test -n "$ac_tool_prefix"; then
5050 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5051set dummy ${ac_tool_prefix}icpc; ac_word=$2
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5053$as_echo_n "checking for $ac_word... " >&6; }
5054if ${ac_cv_path_CXX+:} false; then :
5055 $as_echo_n "(cached) " >&6
5056else
5057 case $CXX in
5058 [\\/]* | ?:[\\/]*)
5059 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5060 ;;
5061 *)
5062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5063for as_dir in notfound
5064do
5065 IFS=$as_save_IFS
5066 test -z "$as_dir" && as_dir=.
5067 for ac_exec_ext in '' $ac_executable_extensions; do
5068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5069 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5071 break 2
5072 fi
5073done
5074 done
5075IFS=$as_save_IFS
5076
5077 ;;
5078esac
5079fi
5080CXX=$ac_cv_path_CXX
5081if test -n "$CXX"; then
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5083$as_echo "$CXX" >&6; }
5084else
5085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
5087fi
5088
5089
5090fi
5091if test -z "$ac_cv_path_CXX"; then
5092 ac_pt_CXX=$CXX
5093 # Extract the first word of "icpc", so it can be a program name with args.
5094set dummy icpc; ac_word=$2
5095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
5097if ${ac_cv_path_ac_pt_CXX+:} false; then :
5098 $as_echo_n "(cached) " >&6
5099else
5100 case $ac_pt_CXX in
5101 [\\/]* | ?:[\\/]*)
5102 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5103 ;;
5104 *)
5105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5106for as_dir in notfound
5107do
5108 IFS=$as_save_IFS
5109 test -z "$as_dir" && as_dir=.
5110 for ac_exec_ext in '' $ac_executable_extensions; do
5111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5112 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5114 break 2
5115 fi
5116done
5117 done
5118IFS=$as_save_IFS
5119
5120 ;;
5121esac
5122fi
5123ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5124if test -n "$ac_pt_CXX"; then
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5126$as_echo "$ac_pt_CXX" >&6; }
5127else
5128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5129$as_echo "no" >&6; }
5130fi
5131
5132 if test "x$ac_pt_CXX" = x; then
5133 CXX="icpc"
5134 else
5135 case $cross_compiling:$ac_tool_warned in
5136yes:)
5137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5139ac_tool_warned=yes ;;
5140esac
5141 CXX=$ac_pt_CXX
5142 fi
5143else
5144 CXX="$ac_cv_path_CXX"
5145fi
5146 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005147 esac
5148 if test "$CXX" = "notfound"
5149 then
5150 CXX=""
5151 fi
5152fi
5153if test -z "$CXX"
5154then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005155 if test -n "$ac_tool_prefix"; then
5156 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5157 do
5158 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5159set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5161$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005162if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005164else
5165 if test -n "$CXX"; then
5166 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5167else
5168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5169for as_dir in $PATH
5170do
5171 IFS=$as_save_IFS
5172 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005173 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005174 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005175 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005177 break 2
5178 fi
5179done
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005181IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182
5183fi
5184fi
5185CXX=$ac_cv_prog_CXX
5186if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5188$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005189else
Matthias Kloseb9621712010-04-24 17:59:49 +00005190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5191$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005192fi
5193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005194
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005195 test -n "$CXX" && break
5196 done
5197fi
5198if test -z "$CXX"; then
5199 ac_ct_CXX=$CXX
5200 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5201do
5202 # Extract the first word of "$ac_prog", so it can be a program name with args.
5203set dummy $ac_prog; ac_word=$2
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5205$as_echo_n "checking for $ac_word... " >&6; }
5206if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5207 $as_echo_n "(cached) " >&6
5208else
5209 if test -n "$ac_ct_CXX"; then
5210 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5211else
5212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215 IFS=$as_save_IFS
5216 test -z "$as_dir" && as_dir=.
5217 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005218 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005219 ac_cv_prog_ac_ct_CXX="$ac_prog"
5220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221 break 2
5222 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005223done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005224 done
5225IFS=$as_save_IFS
5226
5227fi
5228fi
5229ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5230if test -n "$ac_ct_CXX"; then
5231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5232$as_echo "$ac_ct_CXX" >&6; }
5233else
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239 test -n "$ac_ct_CXX" && break
5240done
5241
5242 if test "x$ac_ct_CXX" = x; then
5243 CXX="notfound"
5244 else
5245 case $cross_compiling:$ac_tool_warned in
5246yes:)
5247{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5248$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5249ac_tool_warned=yes ;;
5250esac
5251 CXX=$ac_ct_CXX
5252 fi
5253fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005254
5255 if test "$CXX" = "notfound"
5256 then
5257 CXX=""
5258 fi
5259fi
5260if test "$preset_cxx" != "$CXX"
5261then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005262 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005263
5264 By default, distutils will build C++ extension modules with \"$CXX\".
5265 If this is not intended, then set CXX on the configure command line.
5266 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005267$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005268
5269 By default, distutils will build C++ extension modules with \"$CXX\".
5270 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005271 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005272fi
5273
5274
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005275MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5276
5277
5278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5279$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5280cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005281#undef bfin
5282#undef cris
5283#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005284#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005285#undef hppa
5286#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005287#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005288#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005289#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005290#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005291#undef unix
5292#if defined(__linux__)
5293# if defined(__x86_64__) && defined(__LP64__)
5294 x86_64-linux-gnu
5295# elif defined(__x86_64__) && defined(__ILP32__)
5296 x86_64-linux-gnux32
5297# elif defined(__i386__)
5298 i386-linux-gnu
5299# elif defined(__aarch64__) && defined(__AARCH64EL__)
5300# if defined(__ILP32__)
5301 aarch64_ilp32-linux-gnu
5302# else
5303 aarch64-linux-gnu
5304# endif
5305# elif defined(__aarch64__) && defined(__AARCH64EB__)
5306# if defined(__ILP32__)
5307 aarch64_be_ilp32-linux-gnu
5308# else
5309 aarch64_be-linux-gnu
5310# endif
5311# elif defined(__alpha__)
5312 alpha-linux-gnu
5313# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5314# if defined(__ARMEL__)
5315 arm-linux-gnueabihf
5316# else
5317 armeb-linux-gnueabihf
5318# endif
5319# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5320# if defined(__ARMEL__)
5321 arm-linux-gnueabi
5322# else
5323 armeb-linux-gnueabi
5324# endif
5325# elif defined(__hppa__)
5326 hppa-linux-gnu
5327# elif defined(__ia64__)
5328 ia64-linux-gnu
5329# elif defined(__m68k__) && !defined(__mcoldfire__)
5330 m68k-linux-gnu
5331# elif defined(__mips_hard_float) && defined(_MIPSEL)
5332# if _MIPS_SIM == _ABIO32
5333 mipsel-linux-gnu
5334# elif _MIPS_SIM == _ABIN32
5335 mips64el-linux-gnuabin32
5336# elif _MIPS_SIM == _ABI64
5337 mips64el-linux-gnuabi64
5338# else
5339# error unknown platform triplet
5340# endif
5341# elif defined(__mips_hard_float)
5342# if _MIPS_SIM == _ABIO32
5343 mips-linux-gnu
5344# elif _MIPS_SIM == _ABIN32
5345 mips64-linux-gnuabin32
5346# elif _MIPS_SIM == _ABI64
5347 mips64-linux-gnuabi64
5348# else
5349# error unknown platform triplet
5350# endif
5351# elif defined(__or1k__)
5352 or1k-linux-gnu
5353# elif defined(__powerpc__) && defined(__SPE__)
5354 powerpc-linux-gnuspe
5355# elif defined(__powerpc64__)
5356# if defined(__LITTLE_ENDIAN__)
5357 powerpc64le-linux-gnu
5358# else
5359 powerpc64-linux-gnu
5360# endif
5361# elif defined(__powerpc__)
5362 powerpc-linux-gnu
5363# elif defined(__s390x__)
5364 s390x-linux-gnu
5365# elif defined(__s390__)
5366 s390-linux-gnu
5367# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5368 sh4-linux-gnu
5369# elif defined(__sparc__) && defined(__arch64__)
5370 sparc64-linux-gnu
5371# elif defined(__sparc__)
5372 sparc-linux-gnu
5373# else
5374# error unknown platform triplet
5375# endif
5376#elif defined(__FreeBSD_kernel__)
5377# if defined(__LP64__)
5378 x86_64-kfreebsd-gnu
5379# elif defined(__i386__)
5380 i386-kfreebsd-gnu
5381# else
5382# error unknown platform triplet
5383# endif
5384#elif defined(__gnu_hurd__)
5385 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005386#elif defined(__APPLE__)
5387 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005388#else
5389# error unknown platform triplet
5390#endif
5391
5392EOF
5393
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005394if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005395 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5397$as_echo "$PLATFORM_TRIPLET" >&6; }
5398else
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5400$as_echo "none" >&6; }
5401fi
5402rm -f conftest.c conftest.out
5403
5404if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5405 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5406 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5407 fi
5408fi
5409PLATDIR=plat-$MACHDEP
5410
5411
5412
5413
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5415$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5416save_LDFLAGS="$LDFLAGS"
5417LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005418
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5420/* end confdefs.h. */
5421
5422int
5423main ()
5424{
5425
5426 ;
5427 return 0;
5428}
5429_ACEOF
5430if ac_fn_c_try_link "$LINENO"; then :
5431 NO_AS_NEEDED="-Wl,--no-as-needed"
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5433$as_echo "yes" >&6; }
5434else
5435 NO_AS_NEEDED=""
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5437$as_echo "no" >&6; }
5438fi
5439rm -f core conftest.err conftest.$ac_objext \
5440 conftest$ac_exeext conftest.$ac_ext
5441LDFLAGS="$save_LDFLAGS"
5442
5443
5444
5445# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446
Matthias Kloseb9621712010-04-24 17:59:49 +00005447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5448$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005449if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451else
5452 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5453 then ac_cv_path_EGREP="$GREP -E"
5454 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005456 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 # Loop through the user's path and test for each of PROGNAME-LIST
5458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5460do
5461 IFS=$as_save_IFS
5462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005463 for ac_prog in egrep; do
5464 for ac_exec_ext in '' $ac_executable_extensions; do
5465 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005466 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005467# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005468 # Check for GNU $ac_path_EGREP
5469case `"$ac_path_EGREP" --version 2>&1` in
5470*GNU*)
5471 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5472*)
5473 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005475 while :
5476 do
5477 cat "conftest.in" "conftest.in" >"conftest.tmp"
5478 mv "conftest.tmp" "conftest.in"
5479 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005481 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5482 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005483 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005484 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5485 # Best one so far, save it but keep looking for a better one
5486 ac_cv_path_EGREP="$ac_path_EGREP"
5487 ac_path_EGREP_max=$ac_count
5488 fi
5489 # 10*(2^10) chars as input seems more than enough
5490 test $ac_count -gt 10 && break
5491 done
5492 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5493esac
5494
Matthias Kloseb9621712010-04-24 17:59:49 +00005495 $ac_path_EGREP_found && break 3
5496 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005497 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005499IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005501 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 +00005502 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005503else
5504 ac_cv_path_EGREP=$EGREP
5505fi
5506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005507 fi
5508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5510$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005511 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005512
5513
Matthias Kloseb9621712010-04-24 17:59:49 +00005514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5515$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005516if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005517 $as_echo_n "(cached) " >&6
5518else
5519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005520/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005521#include <stdlib.h>
5522#include <stdarg.h>
5523#include <string.h>
5524#include <float.h>
5525
5526int
5527main ()
5528{
5529
5530 ;
5531 return 0;
5532}
5533_ACEOF
5534if ac_fn_c_try_compile "$LINENO"; then :
5535 ac_cv_header_stdc=yes
5536else
5537 ac_cv_header_stdc=no
5538fi
5539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5540
5541if test $ac_cv_header_stdc = yes; then
5542 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5544/* end confdefs.h. */
5545#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005546
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005547_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005551else
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005553fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005554rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555
Matthias Kloseb9621712010-04-24 17:59:49 +00005556fi
5557
5558if test $ac_cv_header_stdc = yes; then
5559 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5561/* end confdefs.h. */
5562#include <stdlib.h>
5563
5564_ACEOF
5565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5566 $EGREP "free" >/dev/null 2>&1; then :
5567
5568else
5569 ac_cv_header_stdc=no
5570fi
5571rm -f conftest*
5572
5573fi
5574
5575if test $ac_cv_header_stdc = yes; then
5576 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5577 if test "$cross_compiling" = yes; then :
5578 :
5579else
5580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5581/* end confdefs.h. */
5582#include <ctype.h>
5583#include <stdlib.h>
5584#if ((' ' & 0x0FF) == 0x020)
5585# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5586# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5587#else
5588# define ISLOWER(c) \
5589 (('a' <= (c) && (c) <= 'i') \
5590 || ('j' <= (c) && (c) <= 'r') \
5591 || ('s' <= (c) && (c) <= 'z'))
5592# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5593#endif
5594
5595#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5596int
5597main ()
5598{
5599 int i;
5600 for (i = 0; i < 256; i++)
5601 if (XOR (islower (i), ISLOWER (i))
5602 || toupper (i) != TOUPPER (i))
5603 return 2;
5604 return 0;
5605}
5606_ACEOF
5607if ac_fn_c_try_run "$LINENO"; then :
5608
5609else
5610 ac_cv_header_stdc=no
5611fi
5612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5613 conftest.$ac_objext conftest.beam conftest.$ac_ext
5614fi
5615
5616fi
5617fi
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5619$as_echo "$ac_cv_header_stdc" >&6; }
5620if test $ac_cv_header_stdc = yes; then
5621
5622$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5623
5624fi
5625
5626# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5627for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5628 inttypes.h stdint.h unistd.h
5629do :
5630 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5631ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5632"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005633if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005634 cat >>confdefs.h <<_ACEOF
5635#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5636_ACEOF
5637
5638fi
5639
5640done
5641
5642
5643
5644 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 +02005645if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005646 MINIX=yes
5647else
5648 MINIX=
5649fi
5650
5651
5652 if test "$MINIX" = yes; then
5653
5654$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5655
5656
5657$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5658
5659
5660$as_echo "#define _MINIX 1" >>confdefs.h
5661
5662 fi
5663
5664
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5666$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005667if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 $as_echo_n "(cached) " >&6
5669else
5670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5671/* end confdefs.h. */
5672
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005673# define __EXTENSIONS__ 1
5674 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005675int
5676main ()
5677{
5678
5679 ;
5680 return 0;
5681}
5682_ACEOF
5683if ac_fn_c_try_compile "$LINENO"; then :
5684 ac_cv_safe_to_define___extensions__=yes
5685else
5686 ac_cv_safe_to_define___extensions__=no
5687fi
5688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5689fi
5690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5691$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5692 test $ac_cv_safe_to_define___extensions__ = yes &&
5693 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5694
5695 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5696
5697 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5698
5699 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5700
5701 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5702
5703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705# Check for unsupported systems
5706case $ac_sys_system/$ac_sys_release in
5707atheos*|Linux*/1*)
5708 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5709 echo See README for details.
5710 exit 1;;
5711esac
5712
5713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5715$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005718if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719 withval=$with_suffix;
5720 case $withval in
5721 no) EXEEXT=;;
5722 yes) EXEEXT=.exe;;
5723 *) EXEEXT=$withval;;
5724 esac
5725fi
5726
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5728$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729
5730# Test whether we're running on a non-case-sensitive system, in which
5731# case we give a warning if no ext is given
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5734$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735if test ! -d CaseSensitiveTestDir; then
5736mkdir CaseSensitiveTestDir
5737fi
5738
5739if test -d casesensitivetestdir
5740then
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5742$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 BUILDEXEEXT=.exe
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5746$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747 BUILDEXEEXT=$EXEEXT
5748fi
5749rmdir CaseSensitiveTestDir
5750
5751case $MACHDEP in
5752bsdos*)
5753 case $CC in
5754 gcc) CC="$CC -D_HAVE_BSDI";;
5755 esac;;
5756esac
5757
5758case $ac_sys_system in
5759hp*|HP*)
5760 case $CC in
5761 cc|*/cc) CC="$CC -Ae";;
5762 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763esac
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5767$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768if test -z "$LIBRARY"
5769then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005770 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5773$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
5775# LDLIBRARY is the name of the library to link against (as opposed to the
5776# name of the library into which to insert object files). BLDLIBRARY is also
5777# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5778# is blank as the main program is not linked directly against LDLIBRARY.
5779# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5780# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5781# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5782# DLLLIBRARY is the shared (i.e., DLL) library.
5783#
5784# RUNSHARED is used to run shared python without installed libraries
5785#
5786# INSTSONAME is the name of the shared library that will be use to install
5787# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005788#
5789# LDVERSION is the shared library version number, normally the Python version
5790# with the ABI build flags appended.
5791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
5793
5794
5795
5796
5797
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799LDLIBRARY="$LIBRARY"
5800BLDLIBRARY='$(LDLIBRARY)'
5801INSTSONAME='$(LDLIBRARY)'
5802DLLLIBRARY=''
5803LDLIBRARYDIR=''
5804RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005805LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806
5807# LINKCC is the command that links the python executable -- default is $(CC).
5808# If CXX is set, and if it is needed to link a main function that was
5809# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5810# python might then depend on the C++ runtime
5811# This is altered for AIX in order to build the export list before
5812# linking.
5813
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5815$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816if test -z "$LINKCC"
5817then
5818 LINKCC='$(PURIFY) $(MAINCC)'
5819 case $ac_sys_system in
5820 AIX*)
5821 exp_extra="\"\""
5822 if test $ac_sys_release -ge 5 -o \
5823 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5824 exp_extra="."
5825 fi
5826 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827 QNX*)
5828 # qcc must be used because the other compilers do not
5829 # support -N.
5830 LINKCC=qcc;;
5831 esac
5832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5834$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835
5836# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5837# make sure we default having it set to "no": this is used by
5838# distutils.unixccompiler to know if it should add --enable-new-dtags
5839# to linker command lines, and failing to detect GNU ld simply results
5840# in the same bahaviour as before.
5841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5843$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844ac_prog=ld
5845if test "$GCC" = yes; then
5846 ac_prog=`$CC -print-prog-name=ld`
5847fi
5848case `"$ac_prog" -V 2>&1 < /dev/null` in
5849 *GNU*)
5850 GNULD=yes;;
5851 *)
5852 GNULD=no;;
5853esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5855$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5858$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005859if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005860 $as_echo_n "(cached) " >&6
5861else
5862 ac_cv_c_inline=no
5863for ac_kw in inline __inline__ __inline; do
5864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5865/* end confdefs.h. */
5866#ifndef __cplusplus
5867typedef int foo_t;
5868static $ac_kw foo_t static_foo () {return 0; }
5869$ac_kw foo_t foo () {return 0; }
5870#endif
5871
5872_ACEOF
5873if ac_fn_c_try_compile "$LINENO"; then :
5874 ac_cv_c_inline=$ac_kw
5875fi
5876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5877 test "$ac_cv_c_inline" != no && break
5878done
5879
5880fi
5881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5882$as_echo "$ac_cv_c_inline" >&6; }
5883
5884case $ac_cv_c_inline in
5885 inline | yes) ;;
5886 *)
5887 case $ac_cv_c_inline in
5888 no) ac_val=;;
5889 *) ac_val=$ac_cv_c_inline;;
5890 esac
5891 cat >>confdefs.h <<_ACEOF
5892#ifndef __cplusplus
5893#define inline $ac_val
5894#endif
5895_ACEOF
5896 ;;
5897esac
5898
5899if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005900
5901$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005902
5903
5904fi
5905
5906
Matthias Kloseb9621712010-04-24 17:59:49 +00005907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5908$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005910if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 enableval=$enable_shared;
5912fi
5913
5914
5915if test -z "$enable_shared"
5916then
5917 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005918 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 enable_shared="yes";;
5920 *)
5921 enable_shared="no";;
5922 esac
5923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5925$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
Matthias Kloseb9621712010-04-24 17:59:49 +00005927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5928$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005930if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005931 enableval=$enable_profiling;
5932fi
5933
5934if test "x$enable_profiling" = xyes; then
5935 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005936 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938/* end confdefs.h. */
5939int main() { return 0; }
5940_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005941if ac_fn_c_try_link "$LINENO"; then :
5942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005944 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005946rm -f core conftest.err conftest.$ac_objext \
5947 conftest$ac_exeext conftest.$ac_ext
5948 CC="$ac_save_cc"
5949else
5950 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5953$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
doko@ubuntu.comba015832012-06-30 16:52:05 +02005955if test "x$enable_profiling" = xyes; then
5956 BASECFLAGS="-pg $BASECFLAGS"
5957 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958fi
5959
Matthias Kloseb9621712010-04-24 17:59:49 +00005960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5961$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
5963# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5964# library that we build, but we do not want to link against it (we
5965# will find it with a -framework option). For this reason there is an
5966# extra variable BLDLIBRARY against which Python and the extension
5967# modules are linked, BLDLIBRARY. This is normally the same as
5968# LDLIBRARY, but empty for MacOSX framework builds.
5969if test "$enable_framework"
5970then
5971 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005972 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 BLDLIBRARY=''
5974else
5975 BLDLIBRARY='$(LDLIBRARY)'
5976fi
5977
5978# Other platforms follow
5979if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005980 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981
Matthias Kloseb9621712010-04-24 17:59:49 +00005982$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983
5984 case $ac_sys_system in
5985 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005986 LDLIBRARY='libpython$(LDVERSION).dll.a'
5987 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 ;;
5989 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005990 LDLIBRARY='libpython$(LDVERSION).so'
5991 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005992 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005994 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005995 then
5996 PY3LIBRARY=libpython3.so
5997 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005999 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006000 LDLIBRARY='libpython$(LDVERSION).so'
6001 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006002 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006004 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006005 then
6006 PY3LIBRARY=libpython3.so
6007 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 ;;
6009 hp*|HP*)
6010 case `uname -m` in
6011 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006012 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 ;;
6014 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006015 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016 ;;
6017 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006018 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006019 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006022 LDLIBRARY='libpython$(LDVERSION).dylib'
6023 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006024 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006026 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006027 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006028 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006029 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030
6031 esac
6032else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006033 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034 case $ac_sys_system in
6035 CYGWIN*)
6036 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006037 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038 ;;
6039 esac
6040fi
6041
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006042if test "$cross_compiling" = yes; then
6043 RUNSHARED=
6044fi
6045
Matthias Kloseb9621712010-04-24 17:59:49 +00006046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6047$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048
6049if test -n "$ac_tool_prefix"; then
6050 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6051set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006054if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056else
6057 if test -n "$RANLIB"; then
6058 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6059else
6060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063 IFS=$as_save_IFS
6064 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069 break 2
6070 fi
6071done
Matthias Kloseb9621712010-04-24 17:59:49 +00006072 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073IFS=$as_save_IFS
6074
6075fi
6076fi
6077RANLIB=$ac_cv_prog_RANLIB
6078if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6080$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081else
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084fi
6085
6086
6087fi
6088if test -z "$ac_cv_prog_RANLIB"; then
6089 ac_ct_RANLIB=$RANLIB
6090 # Extract the first word of "ranlib", so it can be a program name with args.
6091set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6093$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006094if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096else
6097 if test -n "$ac_ct_RANLIB"; then
6098 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6099else
6100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103 IFS=$as_save_IFS
6104 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109 break 2
6110 fi
6111done
Matthias Kloseb9621712010-04-24 17:59:49 +00006112 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006113IFS=$as_save_IFS
6114
6115fi
6116fi
6117ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6118if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6120$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121else
Matthias Kloseb9621712010-04-24 17:59:49 +00006122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124fi
6125
6126 if test "x$ac_ct_RANLIB" = x; then
6127 RANLIB=":"
6128 else
6129 case $cross_compiling:$ac_tool_warned in
6130yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133ac_tool_warned=yes ;;
6134esac
6135 RANLIB=$ac_ct_RANLIB
6136 fi
6137else
6138 RANLIB="$ac_cv_prog_RANLIB"
6139fi
6140
6141
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006142if test -n "$ac_tool_prefix"; then
6143 for ac_prog in ar aal
6144 do
6145 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6146set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6148$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006149if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006150 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151else
6152 if test -n "$AR"; then
6153 ac_cv_prog_AR="$AR" # Let the user override the test.
6154else
6155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6156for as_dir in $PATH
6157do
6158 IFS=$as_save_IFS
6159 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006162 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164 break 2
6165 fi
6166done
Matthias Kloseb9621712010-04-24 17:59:49 +00006167 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168IFS=$as_save_IFS
6169
6170fi
6171fi
6172AR=$ac_cv_prog_AR
6173if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6175$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176else
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6178$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179fi
6180
6181
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006182 test -n "$AR" && break
6183 done
6184fi
6185if test -z "$AR"; then
6186 ac_ct_AR=$AR
6187 for ac_prog in ar aal
6188do
6189 # Extract the first word of "$ac_prog", so it can be a program name with args.
6190set dummy $ac_prog; ac_word=$2
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6192$as_echo_n "checking for $ac_word... " >&6; }
6193if ${ac_cv_prog_ac_ct_AR+:} false; then :
6194 $as_echo_n "(cached) " >&6
6195else
6196 if test -n "$ac_ct_AR"; then
6197 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6198else
6199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6200for as_dir in $PATH
6201do
6202 IFS=$as_save_IFS
6203 test -z "$as_dir" && as_dir=.
6204 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006205 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006206 ac_cv_prog_ac_ct_AR="$ac_prog"
6207 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6208 break 2
6209 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006211 done
6212IFS=$as_save_IFS
6213
6214fi
6215fi
6216ac_ct_AR=$ac_cv_prog_ac_ct_AR
6217if test -n "$ac_ct_AR"; then
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6219$as_echo "$ac_ct_AR" >&6; }
6220else
6221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6222$as_echo "no" >&6; }
6223fi
6224
6225
6226 test -n "$ac_ct_AR" && break
6227done
6228
6229 if test "x$ac_ct_AR" = x; then
6230 AR="ar"
6231 else
6232 case $cross_compiling:$ac_tool_warned in
6233yes:)
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6235$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6236ac_tool_warned=yes ;;
6237esac
6238 AR=$ac_ct_AR
6239 fi
6240fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241
6242
6243# tweak ARFLAGS only if the user didn't set it on the command line
6244
6245if test -z "$ARFLAGS"
6246then
6247 ARFLAGS="rc"
6248fi
6249
doko@ubuntu.com58844492012-06-30 18:25:32 +02006250if test -n "$ac_tool_prefix"; then
6251 for ac_prog in readelf
6252 do
6253 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6254set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6256$as_echo_n "checking for $ac_word... " >&6; }
6257if ${ac_cv_prog_READELF+:} false; then :
6258 $as_echo_n "(cached) " >&6
6259else
6260 if test -n "$READELF"; then
6261 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6262else
6263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264for as_dir in $PATH
6265do
6266 IFS=$as_save_IFS
6267 test -z "$as_dir" && as_dir=.
6268 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006269 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006270 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6272 break 2
6273 fi
6274done
6275 done
6276IFS=$as_save_IFS
6277
6278fi
6279fi
6280READELF=$ac_cv_prog_READELF
6281if test -n "$READELF"; then
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6283$as_echo "$READELF" >&6; }
6284else
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6286$as_echo "no" >&6; }
6287fi
6288
6289
6290 test -n "$READELF" && break
6291 done
6292fi
6293if test -z "$READELF"; then
6294 ac_ct_READELF=$READELF
6295 for ac_prog in readelf
6296do
6297 # Extract the first word of "$ac_prog", so it can be a program name with args.
6298set dummy $ac_prog; ac_word=$2
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300$as_echo_n "checking for $ac_word... " >&6; }
6301if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6302 $as_echo_n "(cached) " >&6
6303else
6304 if test -n "$ac_ct_READELF"; then
6305 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6306else
6307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308for as_dir in $PATH
6309do
6310 IFS=$as_save_IFS
6311 test -z "$as_dir" && as_dir=.
6312 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006313 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006314 ac_cv_prog_ac_ct_READELF="$ac_prog"
6315 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6316 break 2
6317 fi
6318done
6319 done
6320IFS=$as_save_IFS
6321
6322fi
6323fi
6324ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6325if test -n "$ac_ct_READELF"; then
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6327$as_echo "$ac_ct_READELF" >&6; }
6328else
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }
6331fi
6332
6333
6334 test -n "$ac_ct_READELF" && break
6335done
6336
6337 if test "x$ac_ct_READELF" = x; then
6338 READELF=":"
6339 else
6340 case $cross_compiling:$ac_tool_warned in
6341yes:)
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6344ac_tool_warned=yes ;;
6345esac
6346 READELF=$ac_ct_READELF
6347 fi
6348fi
6349
6350if test "$cross_compiling" = yes; then
6351 case "$READELF" in
6352 readelf|:)
6353 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6354 ;;
6355 esac
6356fi
6357
6358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360case $MACHDEP in
6361bsdos*|hp*|HP*)
6362 # install -d does not work on BSDI or HP-UX
6363 if test -z "$INSTALL"
6364 then
6365 INSTALL="${srcdir}/install-sh -c"
6366 fi
6367esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368# Find a good install program. We prefer a C program (faster),
6369# so one script is as good as another. But avoid the broken or
6370# incompatible versions:
6371# SysV /etc/install, /usr/sbin/install
6372# SunOS /usr/etc/install
6373# IRIX /sbin/install
6374# AIX /bin/install
6375# AmigaOS /C/install, which installs bootblocks on floppy discs
6376# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6377# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6378# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6379# OS/2's system install, which has a completely different semantic
6380# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006381# Reject install programs that cannot install multiple files.
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6383$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006385if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387else
6388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389for as_dir in $PATH
6390do
6391 IFS=$as_save_IFS
6392 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006393 # Account for people who put trailing slashes in PATH elements.
6394case $as_dir/ in #((
6395 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006397 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006398 /usr/ucb/* ) ;;
6399 *)
6400 # OSF1 and SCO ODT 3.0 have their own names for install.
6401 # Don't use installbsd from OSF since it installs stuff as root
6402 # by default.
6403 for ac_prog in ginstall scoinst install; do
6404 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006405 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006406 if test $ac_prog = install &&
6407 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6408 # AIX install. It has an incompatible calling convention.
6409 :
6410 elif test $ac_prog = install &&
6411 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6412 # program-specific install script used by HP pwplus--don't use.
6413 :
6414 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006415 rm -rf conftest.one conftest.two conftest.dir
6416 echo one > conftest.one
6417 echo two > conftest.two
6418 mkdir conftest.dir
6419 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6420 test -s conftest.one && test -s conftest.two &&
6421 test -s conftest.dir/conftest.one &&
6422 test -s conftest.dir/conftest.two
6423 then
6424 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6425 break 3
6426 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427 fi
6428 fi
6429 done
6430 done
6431 ;;
6432esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006433
6434 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435IFS=$as_save_IFS
6436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438
6439fi
6440 if test "${ac_cv_path_install+set}" = set; then
6441 INSTALL=$ac_cv_path_install
6442 else
6443 # As a last resort, use the slow shell script. Don't cache a
6444 # value for INSTALL within a source directory, because that will
6445 # break other packages using the cache if that directory is
6446 # removed, or if the value is a relative name.
6447 INSTALL=$ac_install_sh
6448 fi
6449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6451$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452
6453# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6454# It thinks the first close brace ends the variable substitution.
6455test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6456
6457test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6458
6459test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6460
Matthias Klose93a0ef12012-03-15 18:08:34 +01006461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6462$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6463if test -z "$MKDIR_P"; then
6464 if ${ac_cv_path_mkdir+:} false; then :
6465 $as_echo_n "(cached) " >&6
6466else
6467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6468for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6469do
6470 IFS=$as_save_IFS
6471 test -z "$as_dir" && as_dir=.
6472 for ac_prog in mkdir gmkdir; do
6473 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006474 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006475 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6476 'mkdir (GNU coreutils) '* | \
6477 'mkdir (coreutils) '* | \
6478 'mkdir (fileutils) '4.1*)
6479 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6480 break 3;;
6481 esac
6482 done
6483 done
6484 done
6485IFS=$as_save_IFS
6486
6487fi
6488
6489 test -d ./--version && rmdir ./--version
6490 if test "${ac_cv_path_mkdir+set}" = set; then
6491 MKDIR_P="$ac_cv_path_mkdir -p"
6492 else
6493 # As a last resort, use the slow shell script. Don't cache a
6494 # value for MKDIR_P within a source directory, because that will
6495 # break other packages using the cache if that directory is
6496 # removed, or if the value is a relative name.
6497 MKDIR_P="$ac_install_sh -d"
6498 fi
6499fi
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6501$as_echo "$MKDIR_P" >&6; }
6502
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006503
6504# Not every filesystem supports hard links
6505
6506if test -z "$LN" ; then
6507 case $ac_sys_system in
6508 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509 *) LN=ln;;
6510 esac
6511fi
6512
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006513# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006514
6515ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006516
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6519$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006520
6521# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006522if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006523 withval=$with_pydebug;
6524if test "$withval" != no
6525then
6526
Matthias Kloseb9621712010-04-24 17:59:49 +00006527$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528
Matthias Kloseb9621712010-04-24 17:59:49 +00006529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6530$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006531 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006532 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006533else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535fi
6536else
Matthias Kloseb9621712010-04-24 17:59:49 +00006537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006539fi
6540
6541
Brett Cannon8c94f972016-09-06 17:15:21 -07006542# Enable optimization flags
6543
6544
6545Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6547$as_echo_n "checking for --enable-optimizations... " >&6; }
6548# Check whether --enable-optimizations was given.
6549if test "${enable_optimizations+set}" = set; then :
6550 enableval=$enable_optimizations;
Brett Cannon8c94f972016-09-06 17:15:21 -07006551if test "$withval" != no
6552then
6553 Py_OPT='true'
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6555$as_echo "yes" >&6; };
6556else
6557 Py_OPT='false'
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; };
6560fi
6561else
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563$as_echo "no" >&6; }
6564fi
6565
6566if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006567 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6568 # compile working code using it and both test_distutils and test_gdb are
6569 # broken when you do managed to get a toolchain that works with it. People
6570 # who want LTO need to use --with-lto themselves.
Brett Cannon8c94f972016-09-06 17:15:21 -07006571 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006572 REQUIRE_PGO="yes"
Brett Cannon8c94f972016-09-06 17:15:21 -07006573 DEF_MAKE_RULE="build_all"
6574else
6575 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006576 REQUIRE_PGO="no"
Brett Cannon8c94f972016-09-06 17:15:21 -07006577 DEF_MAKE_RULE="all"
6578fi
6579
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006580# Enable LTO flags
6581
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6583$as_echo_n "checking for --with-lto... " >&6; }
6584
6585# Check whether --with-lto was given.
6586if test "${with_lto+set}" = set; then :
6587 withval=$with_lto;
6588if test "$withval" != no
6589then
6590 Py_LTO='true'
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6592$as_echo "yes" >&6; };
6593else
6594 Py_LTO='false'
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6596$as_echo "no" >&6; };
6597fi
6598else
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600$as_echo "no" >&6; }
6601fi
6602
6603if test "$Py_LTO" = 'true' ; then
6604 case $CC in
6605 *clang*)
6606 # Any changes made here should be reflected in the GCC+Darwin case below
6607 LTOFLAGS="-flto"
6608 ;;
6609 *gcc*)
6610 case $ac_sys_system in
6611 Darwin*)
6612 LTOFLAGS="-flto"
6613 ;;
6614 *)
6615 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6616 ;;
6617 esac
6618 ;;
6619 esac
6620fi
6621
Brett Cannon7188a3e2015-09-18 15:13:44 -07006622# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006623
6624
6625
6626
6627
Gregory P. Smith799520c2016-09-07 16:10:00 -07006628# Make this work on systems where llvm tools are not installed with their
6629# normal names in the default $PATH (ie: Ubuntu). They exist under the
6630# non-suffixed name in their versioned llvm directory.
6631llvm_bin_dir=''
6632llvm_path="${PATH}"
6633if test "${CC}" = "clang"
6634then
6635 clang_bin=`which clang`
6636 # Some systems install clang elsewhere as a symlink to the real path
6637 # which is where the related llvm tools are located.
6638 if test -L "${clang_bin}"
6639 then
6640 clang_dir=`dirname "${clang_bin}"`
6641 clang_bin=`readlink "${clang_bin}"`
6642 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6643 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6644 fi
6645fi
Zachary Ware5af85642015-12-21 12:09:17 -06006646
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6648$as_echo_n "checking target system type... " >&6; }
6649if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006650 $as_echo_n "(cached) " >&6
6651else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006652 if test "x$target_alias" = x; then
6653 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006654else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006655 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6656 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6657fi
6658
6659fi
6660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6661$as_echo "$ac_cv_target" >&6; }
6662case $ac_cv_target in
6663*-*-*) ;;
6664*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6665esac
6666target=$ac_cv_target
6667ac_save_IFS=$IFS; IFS='-'
6668set x $ac_cv_target
6669shift
6670target_cpu=$1
6671target_vendor=$2
6672shift; shift
6673# Remember, the first character of IFS is used to create $*,
6674# except with old shells:
6675target_os=$*
6676IFS=$ac_save_IFS
6677case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6678
6679
6680# The aliases save the names the user supplied, while $host etc.
6681# will get canonicalized.
6682test -n "$target_alias" &&
6683 test "$program_prefix$program_suffix$program_transform_name" = \
6684 NONENONEs,x,x, &&
6685 program_prefix=${target_alias}-
6686# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6687set dummy $target_alias-llvm-profdata; ac_word=$2
6688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6689$as_echo_n "checking for $ac_word... " >&6; }
6690if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6691 $as_echo_n "(cached) " >&6
6692else
6693 case $LLVM_PROFDATA in
6694 [\\/]* | ?:[\\/]*)
6695 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6696 ;;
6697 *)
6698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6699for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006700do
6701 IFS=$as_save_IFS
6702 test -z "$as_dir" && as_dir=.
6703 for ac_exec_ext in '' $ac_executable_extensions; do
6704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006705 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6707 break 2
6708 fi
6709done
6710 done
6711IFS=$as_save_IFS
6712
Gregory P. Smith799520c2016-09-07 16:10:00 -07006713 ;;
6714esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006715fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006716LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6717if test -n "$LLVM_PROFDATA"; then
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6719$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006720else
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6722$as_echo "no" >&6; }
6723fi
6724
6725
Gregory P. Smith799520c2016-09-07 16:10:00 -07006726if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6727 if test "$build" = "$target"; then
6728 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6729 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6730set dummy llvm-profdata; ac_word=$2
6731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6732$as_echo_n "checking for $ac_word... " >&6; }
6733if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6734 $as_echo_n "(cached) " >&6
6735else
6736 case $ac_pt_LLVM_PROFDATA in
6737 [\\/]* | ?:[\\/]*)
6738 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6739 ;;
6740 *)
6741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6742for as_dir in ${llvm_path}
6743do
6744 IFS=$as_save_IFS
6745 test -z "$as_dir" && as_dir=.
6746 for ac_exec_ext in '' $ac_executable_extensions; do
6747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6748 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6750 break 2
6751 fi
6752done
6753 done
6754IFS=$as_save_IFS
6755
6756 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6757 ;;
6758esac
6759fi
6760ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6761if test -n "$ac_pt_LLVM_PROFDATA"; then
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6763$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6764else
6765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6766$as_echo "no" >&6; }
6767fi
6768
6769 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6770 else
6771 LLVM_PROFDATA="''"
6772 fi
6773else
6774 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6775fi
6776
6777
6778if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6779then
6780 LLVM_PROF_FOUND="found"
6781else
6782 LLVM_PROF_FOUND="not-found"
6783fi
6784if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6785then
6786 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6787 if test -n "${found_llvm_profdata}"
6788 then
6789 # llvm-profdata isn't directly in $PATH in some cases.
6790 # https://apple.stackexchange.com/questions/197053/
6791 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6792 LLVM_PROF_FOUND=found
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6794$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6795 fi
6796fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006797LLVM_PROF_ERR=no
6798case $CC in
6799 *clang*)
6800 # Any changes made here should be reflected in the GCC+Darwin case below
6801 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6802 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006803 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006804 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6805 if test $LLVM_PROF_FOUND = not-found
6806 then
6807 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006808 if test "${REQUIRE_PGO}" = "yes"
6809 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006810 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006811 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006812 fi
6813 ;;
6814 *gcc*)
6815 case $ac_sys_system in
6816 Darwin*)
6817 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6818 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006819 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006820 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006821 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006822 then
6823 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006824 if test "${REQUIRE_PGO}" = "yes"
6825 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006826 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006827 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006828 fi
6829 ;;
6830 *)
6831 PGO_PROF_GEN_FLAG="-fprofile-generate"
6832 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6833 LLVM_PROF_MERGER="true"
6834 LLVM_PROF_FILE=""
6835 ;;
6836 esac
6837 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006838 *icc*)
6839 PGO_PROF_GEN_FLAG="-prof-gen"
6840 PGO_PROF_USE_FLAG="-prof-use"
6841 LLVM_PROF_MERGER="true"
6842 LLVM_PROF_FILE=""
6843 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006844esac
6845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6847# merged with this chunk of code?
6848
6849# Optimizer/debugger flags
6850# ------------------------
6851# (The following bit of code is complicated enough - please keep things
6852# indented properly. Just pretend you're editing Python code. ;-)
6853
6854# There are two parallel sets of case statements below, one that checks to
6855# see if OPT was set and one that does BASECFLAGS setting based upon
6856# compiler and platform. BASECFLAGS tweaks need to be made even if the
6857# user set OPT.
6858
6859# tweak OPT based on compiler and platform, only if the user didn't set
6860# it on the command line
6861
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006862if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863then
6864 case $GCC in
6865 yes)
6866 if test "$CC" != 'g++' ; then
6867 STRICT_PROTO="-Wstrict-prototypes"
6868 fi
6869 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6870 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6871 WRAP="-fwrapv"
6872 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006873
6874 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006875 case $CC in
6876 *clang*) WRAP="-fwrapv"
6877 ;;
6878 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006879
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880 case $ac_cv_prog_cc_g in
6881 yes)
6882 if test "$Py_DEBUG" = 'true' ; then
6883 # Optimization messes up debuggers, so turn it off for
6884 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006885 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6886 OPT="-g -Og -Wall $STRICT_PROTO"
6887 else
6888 OPT="-g -O0 -Wall $STRICT_PROTO"
6889 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890 else
6891 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6892 fi
6893 ;;
6894 *)
6895 OPT="-O3 -Wall $STRICT_PROTO"
6896 ;;
6897 esac
6898 case $ac_sys_system in
6899 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6900 ;;
6901 esac
6902 ;;
6903
6904 *)
6905 OPT="-O"
6906 ;;
6907 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908fi
6909
6910
6911
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913# The -arch flags for universal builds on OSX
6914UNIVERSAL_ARCH_FLAGS=
6915
6916
6917# tweak BASECFLAGS based on compiler and platform
6918case $GCC in
6919yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006920 # Python doesn't violate C99 aliasing rules, but older versions of
6921 # GCC produce warnings for legal Python code. Enable
6922 # -fno-strict-aliasing on versions of GCC that support but produce
6923 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6925$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926 ac_save_cc="$CC"
6927 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006928 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006929 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006934
Matthias Kloseb159a552010-04-25 21:00:44 +00006935
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006936int
6937main ()
6938{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006939
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006940 ;
6941 return 0;
6942}
Matthias Kloseb159a552010-04-25 21:00:44 +00006943
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006945if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006946
6947 CC="$ac_save_cc -fstrict-aliasing"
6948 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006950/* end confdefs.h. */
6951
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006952 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006953int
6954main ()
6955{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006956double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006957 ;
6958 return 0;
6959}
Matthias Kloseb159a552010-04-25 21:00:44 +00006960
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006962if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006963
6964 ac_cv_no_strict_aliasing=no
6965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966else
Matthias Kloseb159a552010-04-25 21:00:44 +00006967
6968 ac_cv_no_strict_aliasing=yes
6969
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006970fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006972
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973else
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
6975 ac_cv_no_strict_aliasing=no
6976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006979fi
6980
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6984$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986 then
6987 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6988 fi
6989
Zachary Ware5af85642015-12-21 12:09:17 -06006990 # ICC doesn't recognize the option, but only emits a warning
6991 ## XXX does it emit an unused result warning and can it be disabled?
6992 case "$CC" in
6993 *icc*)
6994 ac_cv_disable_unused_result_warning=no
6995 ;;
6996 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6998$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6999 ac_save_cc="$CC"
7000 CC="$CC -Wunused-result -Werror"
7001 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007002 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007003 $as_echo_n "(cached) " >&6
7004else
7005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7006/* end confdefs.h. */
7007
7008
7009int
7010main ()
7011{
7012
7013 ;
7014 return 0;
7015}
7016
7017_ACEOF
7018if ac_fn_c_try_compile "$LINENO"; then :
7019
7020 ac_cv_disable_unused_result_warning=yes
7021
7022else
7023
7024 ac_cv_disable_unused_result_warning=no
7025
7026fi
7027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7028fi
7029
7030 CFLAGS="$save_CFLAGS"
7031 CC="$ac_save_cc"
7032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7033$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007034 ;;
7035 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007036
7037 if test $ac_cv_disable_unused_result_warning = yes
7038 then
7039 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
7040 fi
7041
Benjamin Petersoncc00e012013-05-20 08:22:04 -07007042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
7043$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
7044 ac_save_cc="$CC"
7045 CC="$CC -Werror=declaration-after-statement"
7046 save_CFLAGS="$CFLAGS"
7047 if ${ac_cv_declaration_after_statement_warning+:} false; then :
7048 $as_echo_n "(cached) " >&6
7049else
7050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051/* end confdefs.h. */
7052
7053
7054int
7055main ()
7056{
7057
7058 ;
7059 return 0;
7060}
7061
7062_ACEOF
7063if ac_fn_c_try_compile "$LINENO"; then :
7064
7065 ac_cv_declaration_after_statement_warning=yes
7066
7067else
7068
7069 ac_cv_declaration_after_statement_warning=no
7070
7071fi
7072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7073fi
7074
7075 CFLAGS="$save_CFLAGS"
7076 CC="$ac_save_cc"
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
7078$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
7079
7080 if test $ac_cv_declaration_after_statement_warning = yes
7081 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007082 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07007083 fi
7084
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7086$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7087 ac_save_cc="$CC"
7088 CC="$CC -Wsign-compare"
7089 save_CFLAGS="$CFLAGS"
7090 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7091 $as_echo_n "(cached) " >&6
7092else
7093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7094/* end confdefs.h. */
7095
7096
7097int
7098main ()
7099{
7100
7101 ;
7102 return 0;
7103}
7104
7105_ACEOF
7106if ac_fn_c_try_compile "$LINENO"; then :
7107
7108 ac_cv_enable_sign_compare_warning=yes
7109
7110else
7111
7112 ac_cv_enable_sign_compare_warning=no
7113
7114fi
7115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7116fi
7117
7118 CFLAGS="$save_CFLAGS"
7119 CC="$ac_save_cc"
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7121$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7122
7123 if test $ac_cv_enable_sign_compare_warning = yes
7124 then
7125 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7126 fi
7127
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7129$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7130 ac_save_cc="$CC"
7131 CC="$CC -Wunreachable-code"
7132 save_CFLAGS="$CFLAGS"
7133 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7134 $as_echo_n "(cached) " >&6
7135else
7136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7137/* end confdefs.h. */
7138
7139
7140int
7141main ()
7142{
7143
7144 ;
7145 return 0;
7146}
7147
7148_ACEOF
7149if ac_fn_c_try_compile "$LINENO"; then :
7150
7151 ac_cv_enable_unreachable_code_warning=yes
7152
7153else
7154
7155 ac_cv_enable_unreachable_code_warning=no
7156
7157fi
7158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7159fi
7160
7161 CFLAGS="$save_CFLAGS"
7162 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007163
7164 # Don't enable unreachable code warning in debug mode, since it usually
7165 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007166 # Issue #24324: Unfortunately, the unreachable code warning does not work
7167 # correctly on gcc and has been silently removed from the compiler.
7168 # It is supported on clang but on OS X systems gcc may be an alias
7169 # for clang. Try to determine if the compiler is not really gcc and,
7170 # if so, only then enable the warning.
7171 if test $ac_cv_enable_unreachable_code_warning = yes && \
7172 test "$Py_DEBUG" != "true" && \
7173 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007174 then
7175 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007176 else
7177 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007178 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7180$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007181
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007182 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7183 # support. Without this, treatment of subnormals doesn't follow
7184 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007185 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007186 alpha*)
7187 BASECFLAGS="$BASECFLAGS -mieee"
7188 ;;
7189 esac
7190
7191 case $ac_sys_system in
7192 SCO_SV*)
7193 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7194 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007195
7196 # is there any other compiler on Darwin besides gcc?
7197 Darwin*)
7198 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7199 # used to be here, but non-Apple gcc doesn't accept them.
7200 if test "${CC}" = gcc
7201 then
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007203$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007204 case "${UNIVERSALSDK}" in
7205 */MacOSX10.4u.sdk)
7206 # Build using 10.4 SDK, force usage of gcc when the
7207 # compiler is gcc, otherwise the user will get very
7208 # confusing error messages when building on OSX 10.6
7209 CC=gcc-4.0
7210 CPP=cpp-4.0
7211 ;;
7212 esac
7213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007214$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007215 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007216
Ned Deily87adb6e2013-10-18 21:09:56 -07007217 if test "${enable_universalsdk}"
7218 then
7219 case "$UNIVERSAL_ARCHS" in
7220 32-bit)
7221 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7222 LIPO_32BIT_FLAGS=""
7223 ARCH_RUN_32BIT=""
7224 ;;
7225 64-bit)
7226 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7227 LIPO_32BIT_FLAGS=""
7228 ARCH_RUN_32BIT="true"
7229 ;;
7230 all)
7231 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7232 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7233 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7234 ;;
7235 intel)
7236 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7237 LIPO_32BIT_FLAGS="-extract i386"
7238 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7239 ;;
7240 intel-32)
7241 UNIVERSAL_ARCH_FLAGS="-arch i386"
7242 LIPO_32BIT_FLAGS=""
7243 ARCH_RUN_32BIT=""
7244 ;;
7245 3-way)
7246 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7247 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7248 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7249 ;;
7250 *)
7251 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7252 ;;
7253 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254
Ned Deily87adb6e2013-10-18 21:09:56 -07007255 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7256 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7257 if test "${UNIVERSALSDK}" != "/"
7258 then
7259 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7260 fi
7261 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262
Ned Deily87adb6e2013-10-18 21:09:56 -07007263 # Calculate an appropriate deployment target for this build:
7264 # The deployment target value is used explicitly to enable certain
7265 # features are enabled (such as builtin libedit support for readline)
Martin Panter0be894b2016-09-07 12:03:06 +00007266 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 # component of the string returned by distutils.get_platform().
7268 #
7269 # Use the value from:
7270 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7271 # 2. the operating system version of the build machine if >= 10.6
7272 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7273 # below to pick either 10.3, 10.4, or 10.5 as the target.
7274 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007275
Ned Deily87adb6e2013-10-18 21:09:56 -07007276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7277$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007278 cur_target_major=`sw_vers -productVersion | \
7279 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7280 cur_target_minor=`sw_vers -productVersion | \
7281 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7282 cur_target="${cur_target_major}.${cur_target_minor}"
7283 if test ${cur_target_major} -eq 10 && \
7284 test ${cur_target_minor} -ge 3 && \
7285 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007286 then
Ned Deily36820b62014-06-25 13:44:22 -07007287 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007288 cur_target=10.3
7289 if test ${enable_universalsdk}
7290 then
7291 case "$UNIVERSAL_ARCHS" in
7292 all|3-way|intel|64-bit)
7293 # These configurations were first supported in 10.5
7294 cur_target='10.5'
7295 ;;
7296 esac
7297 else
7298 if test `/usr/bin/arch` = "i386"
7299 then
7300 # 10.4 was the first release to support Intel archs
7301 cur_target="10.4"
7302 fi
7303 fi
7304 fi
7305 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007306
Ned Deily87adb6e2013-10-18 21:09:56 -07007307 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7308 # environment with a value that is the same as what we'll use
7309 # in the Makefile to ensure that we'll get the same compiler
7310 # environment during configure and build time.
7311 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7312 export MACOSX_DEPLOYMENT_TARGET
7313 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7315$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007316
Ned Deily87adb6e2013-10-18 21:09:56 -07007317 # end of Darwin* tests
7318 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319 esac
7320 ;;
7321
7322*)
7323 case $ac_sys_system in
7324 OpenUNIX*|UnixWare*)
7325 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7326 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007327 SCO_SV*)
7328 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7329 ;;
7330 esac
7331 ;;
7332esac
7333
Zachary Ware5af85642015-12-21 12:09:17 -06007334# ICC needs -fp-model strict or floats behave badly
7335case "$CC" in
7336*icc*)
7337 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7338 ;;
7339esac
7340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341if test "$Py_DEBUG" = 'true'; then
7342 :
7343else
7344 OPT="-DNDEBUG $OPT"
7345fi
7346
7347if test "$ac_arch_flags"
7348then
7349 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7350fi
7351
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007352# On some compilers, pthreads are available without further options
7353# (e.g. MacOS X). On some of these systems, the compiler will not
7354# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7355# So we have to see first whether pthreads are available without
7356# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7358$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007359if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363 ac_cv_pthread_is_default=no
7364else
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366/* end confdefs.h. */
7367
Stefan Krah7dba5942012-11-22 22:49:11 +01007368#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007369#include <pthread.h>
7370
7371void* routine(void* p){return NULL;}
7372
7373int main(){
7374 pthread_t p;
7375 if(pthread_create(&p,NULL,routine,NULL)!=0)
7376 return 1;
7377 (void)pthread_detach(p);
7378 return 0;
7379}
7380
7381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007382if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383
7384 ac_cv_pthread_is_default=yes
7385 ac_cv_kthread=no
7386 ac_cv_pthread=no
7387
7388else
Matthias Kloseb9621712010-04-24 17:59:49 +00007389 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7392 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393fi
7394
7395
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396fi
7397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7399$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400
7401
7402if test $ac_cv_pthread_is_default = yes
7403then
7404 ac_cv_kpthread=no
7405else
7406# -Kpthread, if available, provides the right #defines
7407# and linker options to make pthread_create available
7408# Some compilers won't report that they do not support -Kpthread,
7409# so we need to run a program to see whether it really made the
7410# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7412$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007413if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007414 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415else
7416 ac_save_cc="$CC"
7417CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007418if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419 ac_cv_kpthread=no
7420else
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422/* end confdefs.h. */
7423
Stefan Krah7dba5942012-11-22 22:49:11 +01007424#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425#include <pthread.h>
7426
7427void* routine(void* p){return NULL;}
7428
7429int main(){
7430 pthread_t p;
7431 if(pthread_create(&p,NULL,routine,NULL)!=0)
7432 return 1;
7433 (void)pthread_detach(p);
7434 return 0;
7435}
7436
7437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007438if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439 ac_cv_kpthread=yes
7440else
Matthias Kloseb9621712010-04-24 17:59:49 +00007441 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7444 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445fi
7446
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447CC="$ac_save_cc"
7448fi
7449
Matthias Kloseb9621712010-04-24 17:59:49 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7451$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452fi
7453
7454if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7455then
7456# -Kthread, if available, provides the right #defines
7457# and linker options to make pthread_create available
7458# Some compilers won't report that they do not support -Kthread,
7459# so we need to run a program to see whether it really made the
7460# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7462$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007463if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465else
7466 ac_save_cc="$CC"
7467CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007468if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469 ac_cv_kthread=no
7470else
Matthias Kloseb9621712010-04-24 17:59:49 +00007471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472/* end confdefs.h. */
7473
Stefan Krah7dba5942012-11-22 22:49:11 +01007474#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475#include <pthread.h>
7476
7477void* routine(void* p){return NULL;}
7478
7479int main(){
7480 pthread_t p;
7481 if(pthread_create(&p,NULL,routine,NULL)!=0)
7482 return 1;
7483 (void)pthread_detach(p);
7484 return 0;
7485}
7486
7487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007488if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489 ac_cv_kthread=yes
7490else
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7494 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495fi
7496
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497CC="$ac_save_cc"
7498fi
7499
Matthias Kloseb9621712010-04-24 17:59:49 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7501$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502fi
7503
7504if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7505then
7506# -pthread, if available, provides the right #defines
7507# and linker options to make pthread_create available
7508# Some compilers won't report that they do not support -pthread,
7509# so we need to run a program to see whether it really made the
7510# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7512$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007513if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515else
7516 ac_save_cc="$CC"
7517CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007518if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519 ac_cv_pthread=no
7520else
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522/* end confdefs.h. */
7523
Stefan Krah7dba5942012-11-22 22:49:11 +01007524#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525#include <pthread.h>
7526
7527void* routine(void* p){return NULL;}
7528
7529int main(){
7530 pthread_t p;
7531 if(pthread_create(&p,NULL,routine,NULL)!=0)
7532 return 1;
7533 (void)pthread_detach(p);
7534 return 0;
7535}
7536
7537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007538if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539 ac_cv_pthread=yes
7540else
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7544 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545fi
7546
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547CC="$ac_save_cc"
7548fi
7549
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7551$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552fi
7553
7554# If we have set a CC compiler flag for thread support then
7555# check if it works for CXX, too.
7556ac_cv_cxx_thread=no
7557if test ! -z "$CXX"
7558then
Matthias Kloseb9621712010-04-24 17:59:49 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7560$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561ac_save_cxx="$CXX"
7562
7563if test "$ac_cv_kpthread" = "yes"
7564then
7565 CXX="$CXX -Kpthread"
7566 ac_cv_cxx_thread=yes
7567elif test "$ac_cv_kthread" = "yes"
7568then
7569 CXX="$CXX -Kthread"
7570 ac_cv_cxx_thread=yes
7571elif test "$ac_cv_pthread" = "yes"
7572then
7573 CXX="$CXX -pthread"
7574 ac_cv_cxx_thread=yes
7575fi
7576
7577if test $ac_cv_cxx_thread = yes
7578then
7579 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7580 $CXX -c conftest.$ac_ext 2>&5
7581 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7582 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7583 then
7584 ac_cv_cxx_thread=yes
7585 else
7586 ac_cv_cxx_thread=no
7587 fi
7588 rm -fr conftest*
7589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7591$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592fi
7593CXX="$ac_save_cxx"
7594
7595
7596# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7598$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007599if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601else
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603/* end confdefs.h. */
7604#include <stdlib.h>
7605#include <stdarg.h>
7606#include <string.h>
7607#include <float.h>
7608
7609int
7610main ()
7611{
7612
7613 ;
7614 return 0;
7615}
7616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007617if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618 ac_cv_header_stdc=yes
7619else
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7623
7624if test $ac_cv_header_stdc = yes; then
7625 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627/* end confdefs.h. */
7628#include <string.h>
7629
7630_ACEOF
7631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 $EGREP "memchr" >/dev/null 2>&1; then :
7633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634else
7635 ac_cv_header_stdc=no
7636fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007637rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638
7639fi
7640
7641if test $ac_cv_header_stdc = yes; then
7642 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644/* end confdefs.h. */
7645#include <stdlib.h>
7646
7647_ACEOF
7648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 $EGREP "free" >/dev/null 2>&1; then :
7650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651else
7652 ac_cv_header_stdc=no
7653fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007654rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655
7656fi
7657
7658if test $ac_cv_header_stdc = yes; then
7659 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661 :
7662else
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664/* end confdefs.h. */
7665#include <ctype.h>
7666#include <stdlib.h>
7667#if ((' ' & 0x0FF) == 0x020)
7668# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7669# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7670#else
7671# define ISLOWER(c) \
7672 (('a' <= (c) && (c) <= 'i') \
7673 || ('j' <= (c) && (c) <= 'r') \
7674 || ('s' <= (c) && (c) <= 'z'))
7675# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7676#endif
7677
7678#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7679int
7680main ()
7681{
7682 int i;
7683 for (i = 0; i < 256; i++)
7684 if (XOR (islower (i), ISLOWER (i))
7685 || toupper (i) != TOUPPER (i))
7686 return 2;
7687 return 0;
7688}
7689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007690if ac_fn_c_try_run "$LINENO"; then :
7691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697fi
7698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699fi
7700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7702$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703if test $ac_cv_header_stdc = yes; then
7704
Matthias Kloseb9621712010-04-24 17:59:49 +00007705$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706
7707fi
7708
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007709for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007710fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007711ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007712sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007713unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007714poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007715sys/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 +01007716sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007717sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007718sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007719sys/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 -07007720libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007721bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007722sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007723do :
7724 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7725ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007726if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007728#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007729_ACEOF
7730
7731fi
7732
Guido van Rossum627b2d71993-12-24 10:39:16 +00007733done
7734
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007735ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007736for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7739$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007740if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007744/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007745#include <sys/types.h>
7746#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007747
Martin v. Löwis11437992002-04-12 09:54:03 +00007748int
7749main ()
7750{
7751if ((DIR *) 0)
7752return 0;
7753 ;
7754 return 0;
7755}
7756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007757if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007759else
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764eval ac_res=\$$as_ac_Header
7765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7766$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007767if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007769#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007770_ACEOF
7771
7772ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007775done
7776# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7777if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7779$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007780if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007782else
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787/* Override any GCC internal prototype to avoid an error.
7788 Use char because int might match the return type of a GCC
7789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790#ifdef __cplusplus
7791extern "C"
7792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007793char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007794int
7795main ()
7796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ;
7799 return 0;
7800}
7801_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802for ac_lib in '' dir; do
7803 if test -z "$ac_lib"; then
7804 ac_res="none required"
7805 else
7806 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007807 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812rm -f core conftest.err conftest.$ac_objext \
7813 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007814 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817done
Victor Stinnere0be4232011-10-25 13:06:09 +02007818if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820else
7821 ac_cv_search_opendir=no
7822fi
7823rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007824LIBS=$ac_func_search_save_LIBS
7825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7827$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007829if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007831
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007832fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007833
Michael W. Hudson54241132001-12-07 15:38:26 +00007834else
Matthias Kloseb9621712010-04-24 17:59:49 +00007835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7836$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007837if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007839else
7840 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844/* Override any GCC internal prototype to avoid an error.
7845 Use char because int might match the return type of a GCC
7846 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007847#ifdef __cplusplus
7848extern "C"
7849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007850char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007851int
7852main ()
7853{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 ;
7856 return 0;
7857}
7858_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859for ac_lib in '' x; do
7860 if test -z "$ac_lib"; then
7861 ac_res="none required"
7862 else
7863 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007864 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869rm -f core conftest.err conftest.$ac_objext \
7870 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007871 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874done
Victor Stinnere0be4232011-10-25 13:06:09 +02007875if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877else
7878 ac_cv_search_opendir=no
7879fi
7880rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007881LIBS=$ac_func_search_save_LIBS
7882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7884$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007886if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007889fi
7890
7891fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007892
Matthias Kloseb9621712010-04-24 17:59:49 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7894$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007895if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007897else
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007899/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007900#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007901int
7902main ()
7903{
7904return makedev(0, 0);
7905 ;
7906 return 0;
7907}
7908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007910 ac_cv_header_sys_types_h_makedev=yes
7911else
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914rm -f core conftest.err conftest.$ac_objext \
7915 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007916
7917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7919$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007920
7921if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007922ac_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 +02007923if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007924
Matthias Kloseb9621712010-04-24 17:59:49 +00007925$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007926
7927fi
7928
7929
7930
7931 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 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 +02007933if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007934
Matthias Kloseb9621712010-04-24 17:59:49 +00007935$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007936
7937fi
7938
7939
7940 fi
7941fi
7942
Michael W. Hudson54241132001-12-07 15:38:26 +00007943
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007944# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7945for ac_header in net/if.h
7946do :
7947 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7948#ifdef STDC_HEADERS
7949# include <stdlib.h>
7950# include <stddef.h>
7951#else
7952# ifdef HAVE_STDLIB_H
7953# include <stdlib.h>
7954# endif
7955#endif
7956#ifdef HAVE_SYS_SOCKET_H
7957# include <sys/socket.h>
7958#endif
7959
7960"
Victor Stinnere0be4232011-10-25 13:06:09 +02007961if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007962 cat >>confdefs.h <<_ACEOF
7963#define HAVE_NET_IF_H 1
7964_ACEOF
7965
7966fi
7967
7968done
7969
7970
Martin v. Löwis11017b12006-01-14 18:12:57 +00007971# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007972for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007973do :
7974 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 +00007975#ifdef HAVE_ASM_TYPES_H
7976#include <asm/types.h>
7977#endif
7978#ifdef HAVE_SYS_SOCKET_H
7979#include <sys/socket.h>
7980#endif
7981
Matthias Kloseb9621712010-04-24 17:59:49 +00007982"
Victor Stinnere0be4232011-10-25 13:06:09 +02007983if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007984 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007985#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007986_ACEOF
7987
7988fi
7989
7990done
7991
7992
Charles-François Natali47413c12011-10-06 19:47:44 +02007993# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007994for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007995do :
7996 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7997ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7998#ifdef HAVE_SYS_SOCKET_H
7999#include <sys/socket.h>
8000#endif
8001
8002"
8003if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8004 cat >>confdefs.h <<_ACEOF
8005#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8006_ACEOF
8007
8008fi
8009
8010done
8011
8012
Guido van Rossum627b2d71993-12-24 10:39:16 +00008013# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008014was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8016$as_echo_n "checking for clock_t in time.h... " >&6; }
8017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008018/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
8021_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008024 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008025else
Martin v. Löwis11437992002-04-12 09:54:03 +00008026
8027
Matthias Kloseb9621712010-04-24 17:59:49 +00008028$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008029
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008030
Guido van Rossum627b2d71993-12-24 10:39:16 +00008031fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008032rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008033
Matthias Kloseb9621712010-04-24 17:59:49 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8035$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8038$as_echo_n "checking for makedev... " >&6; }
8039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008041
Jesus Cea740f53a2010-04-28 11:35:30 +00008042#if defined(MAJOR_IN_MKDEV)
8043#include <sys/mkdev.h>
8044#elif defined(MAJOR_IN_SYSMACROS)
8045#include <sys/sysmacros.h>
8046#else
8047#include <sys/types.h>
8048#endif
8049
Neal Norwitz11690112002-07-30 01:08:28 +00008050int
8051main ()
8052{
Jesus Cea740f53a2010-04-28 11:35:30 +00008053
8054 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008055 ;
8056 return 0;
8057}
Matthias Kloseb159a552010-04-25 21:00:44 +00008058
Neal Norwitz11690112002-07-30 01:08:28 +00008059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008060if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008061 ac_cv_has_makedev=yes
8062else
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065rm -f core conftest.err conftest.$ac_objext \
8066 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8068$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008069if test "$ac_cv_has_makedev" = "yes"; then
8070
Matthias Kloseb9621712010-04-24 17:59:49 +00008071$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008072
8073fi
8074
Christian Heimes985ecdc2013-11-20 11:46:18 +01008075# byte swapping
8076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8077$as_echo_n "checking for le64toh... " >&6; }
8078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8079/* end confdefs.h. */
8080
8081#ifdef HAVE_ENDIAN_H
8082#include <endian.h>
8083#elif defined(HAVE_SYS_ENDIAN_H)
8084#include <sys/endian.h>
8085#endif
8086
8087int
8088main ()
8089{
8090
8091 le64toh(1)
8092 ;
8093 return 0;
8094}
8095
8096_ACEOF
8097if ac_fn_c_try_link "$LINENO"; then :
8098 ac_cv_has_le64toh=yes
8099else
8100 ac_cv_has_le64toh=no
8101fi
8102rm -f core conftest.err conftest.$ac_objext \
8103 conftest$ac_exeext conftest.$ac_ext
8104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8105$as_echo "$ac_cv_has_le64toh" >&6; }
8106if test "$ac_cv_has_le64toh" = "yes"; then
8107
8108$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8109
8110fi
8111
Martin v. Löwis399a6892002-10-04 10:22:02 +00008112# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8113# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8114# defined, but the compiler does not support pragma redefine_extname,
8115# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8116# structures (such as rlimit64) without declaring them. As a
8117# work-around, disable LFS on such configurations
8118
8119use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8121$as_echo_n "checking Solaris LFS bug... " >&6; }
8122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008123/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008124
8125#define _LARGEFILE_SOURCE 1
8126#define _FILE_OFFSET_BITS 64
8127#include <sys/resource.h>
8128
Martin v. Löwis399a6892002-10-04 10:22:02 +00008129int
8130main ()
8131{
8132struct rlimit foo;
8133 ;
8134 return 0;
8135}
8136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008138 sol_lfs_bug=no
8139else
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8144$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008145if test "$sol_lfs_bug" = "yes"; then
8146 use_lfs=no
8147fi
8148
8149if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008150# Two defines needed to enable largefile support on various platforms
8151# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008152case $ac_sys_system/$ac_sys_release in
8153AIX*)
8154
8155$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8156
8157 ;;
8158esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008161
8162
Matthias Kloseb9621712010-04-24 17:59:49 +00008163$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008164
Martin v. Löwis399a6892002-10-04 10:22:02 +00008165fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008166
Guido van Rossum84e7b241996-08-19 21:59:00 +00008167# Add some code to confdefs.h so that the test for off_t works on SCO
8168cat >> confdefs.h <<\EOF
8169#if defined(SCO_DS)
8170#undef _OFF_T
8171#endif
8172EOF
8173
Guido van Rossumef2255b2000-03-10 22:30:29 +00008174# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008175ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008176if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008178else
Martin v. Löwis11437992002-04-12 09:54:03 +00008179
8180cat >>confdefs.h <<_ACEOF
8181#define mode_t int
8182_ACEOF
8183
8184fi
8185
Matthias Kloseb9621712010-04-24 17:59:49 +00008186ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008187if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008189else
Martin v. Löwis11437992002-04-12 09:54:03 +00008190
8191cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008193_ACEOF
8194
8195fi
8196
Matthias Kloseb9621712010-04-24 17:59:49 +00008197ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008198if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008200else
Martin v. Löwis11437992002-04-12 09:54:03 +00008201
8202cat >>confdefs.h <<_ACEOF
8203#define pid_t int
8204_ACEOF
8205
8206fi
8207
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008208
Martin v. Löwis11437992002-04-12 09:54:03 +00008209cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008210#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008212
Matthias Kloseb9621712010-04-24 17:59:49 +00008213ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008214if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008215
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008216else
Martin v. Löwis11437992002-04-12 09:54:03 +00008217
8218cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008220_ACEOF
8221
8222fi
8223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8225$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008226if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008228else
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008230/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008231#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
8233_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008236 ac_cv_type_uid_t=yes
8237else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008238 ac_cv_type_uid_t=no
8239fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008240rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008241
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8244$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008245if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008246
Matthias Kloseb9621712010-04-24 17:59:49 +00008247$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008248
8249
Matthias Kloseb9621712010-04-24 17:59:49 +00008250$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008251
8252fi
8253
Mark Dickinson983bc162012-12-02 12:11:38 +00008254
8255# There are two separate checks for each of the exact-width integer types we
8256# need. First we check whether the type is available using the usual
8257# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8258# and <stdint.h> where available). We then also use the special type checks of
8259# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8260# directly, #define's uint32_t to be a suitable type.
8261
8262ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8263if test "x$ac_cv_type_uint32_t" = xyes; then :
8264
8265$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8266
8267fi
8268
Matthias Kloseb9621712010-04-24 17:59:49 +00008269ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8270case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008271 no|yes) ;; #(
8272 *)
8273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008275
8276
8277cat >>confdefs.h <<_ACEOF
8278#define uint32_t $ac_cv_c_uint32_t
8279_ACEOF
8280;;
8281 esac
8282
Mark Dickinson983bc162012-12-02 12:11:38 +00008283
8284ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8285if test "x$ac_cv_type_uint64_t" = xyes; then :
8286
8287$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8288
8289fi
8290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8292case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008293 no|yes) ;; #(
8294 *)
8295
Matthias Kloseb9621712010-04-24 17:59:49 +00008296$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008297
8298
8299cat >>confdefs.h <<_ACEOF
8300#define uint64_t $ac_cv_c_uint64_t
8301_ACEOF
8302;;
8303 esac
8304
Mark Dickinson983bc162012-12-02 12:11:38 +00008305
8306ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8307if test "x$ac_cv_type_int32_t" = xyes; then :
8308
8309$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8310
8311fi
8312
Matthias Kloseb9621712010-04-24 17:59:49 +00008313ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8314case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008315 no|yes) ;; #(
8316 *)
8317
8318cat >>confdefs.h <<_ACEOF
8319#define int32_t $ac_cv_c_int32_t
8320_ACEOF
8321;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008322esac
8323
Mark Dickinson983bc162012-12-02 12:11:38 +00008324
8325ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8326if test "x$ac_cv_type_int64_t" = xyes; then :
8327
8328$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8329
8330fi
8331
Matthias Kloseb9621712010-04-24 17:59:49 +00008332ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8333case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008334 no|yes) ;; #(
8335 *)
8336
8337cat >>confdefs.h <<_ACEOF
8338#define int64_t $ac_cv_c_int64_t
8339_ACEOF
8340;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008341esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008342
Mark Dickinson983bc162012-12-02 12:11:38 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008345if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008348
8349fi
8350
Stefan Krah1919b7e2012-03-21 18:25:23 +01008351ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8352if test "x$ac_cv_type___uint128_t" = xyes; then :
8353
8354$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8355
8356fi
8357
Jack Jansendd19cf82001-12-06 22:36:17 +00008358
Michael W. Hudson54241132001-12-07 15:38:26 +00008359# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008360# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361# The cast to long int works around a bug in the HP C Compiler
8362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8364# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8366$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008367if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 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 +00008371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 if test "$ac_cv_type_int" = yes; then
8374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008376as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008377See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378 else
8379 ac_cv_sizeof_int=0
8380 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8385$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386
8387
8388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008390#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008392
8393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394# The cast to long int works around a bug in the HP C Compiler
8395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8397# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8399$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008400if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 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 +00008404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405else
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 if test "$ac_cv_type_long" = yes; then
8407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008409as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008410See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411 else
8412 ac_cv_sizeof_long=0
8413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8418$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419
8420
8421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008423#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008424_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008425
8426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427# The cast to long int works around a bug in the HP C Compiler
8428# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8429# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8430# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8432$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008433if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008435else
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 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 +00008437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438else
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 if test "$ac_cv_type_void_p" = yes; then
8440 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008442as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008443See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444 else
8445 ac_cv_sizeof_void_p=0
8446 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448
Martin v. Löwis11437992002-04-12 09:54:03 +00008449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8451$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452
8453
8454
Martin v. Löwis11437992002-04-12 09:54:03 +00008455cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008456#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008457_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008458
8459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460# The cast to long int works around a bug in the HP C Compiler
8461# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8462# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8463# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8465$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008466if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 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 +00008470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471else
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 if test "$ac_cv_type_short" = yes; then
8473 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008475as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008476See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477 else
8478 ac_cv_sizeof_short=0
8479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8484$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485
8486
8487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008489#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008490_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008491
8492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493# The cast to long int works around a bug in the HP C Compiler
8494# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8495# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8496# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8498$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008499if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 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 +00008503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504else
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 if test "$ac_cv_type_float" = yes; then
8506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008508as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008509See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510 else
8511 ac_cv_sizeof_float=0
8512 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8517$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518
8519
8520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008522#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008523_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008524
8525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526# The cast to long int works around a bug in the HP C Compiler
8527# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8528# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8529# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8531$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008532if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 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 +00008536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537else
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 if test "$ac_cv_type_double" = yes; then
8539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008541as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008542See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 else
8544 ac_cv_sizeof_double=0
8545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008547
Martin v. Löwis11437992002-04-12 09:54:03 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8550$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551
8552
8553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008555#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008556_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008557
8558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559# The cast to long int works around a bug in the HP C Compiler
8560# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8561# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8562# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8564$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008565if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 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 +00008569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570else
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 if test "$ac_cv_type_fpos_t" = yes; then
8572 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8573$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008574as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008575See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576 else
8577 ac_cv_sizeof_fpos_t=0
8578 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8583$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584
8585
8586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008588#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008589_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008590
Michael W. Hudson54241132001-12-07 15:38:26 +00008591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592# The cast to long int works around a bug in the HP C Compiler
8593# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8594# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8595# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8597$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008598if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 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 +00008602
Martin v. Löwis18e16552006-02-15 17:27:45 +00008603else
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 if test "$ac_cv_type_size_t" = yes; then
8605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008607as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008608See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609 else
8610 ac_cv_sizeof_size_t=0
8611 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008613
Martin v. Löwis18e16552006-02-15 17:27:45 +00008614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8616$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617
8618
8619
Martin v. Löwis18e16552006-02-15 17:27:45 +00008620cat >>confdefs.h <<_ACEOF
8621#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8622_ACEOF
8623
8624
Christian Heimes400adb02008-02-01 08:12:03 +00008625# The cast to long int works around a bug in the HP C Compiler
8626# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8627# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8628# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8630$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008631if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008632 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 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 +00008635
Christian Heimes400adb02008-02-01 08:12:03 +00008636else
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 if test "$ac_cv_type_pid_t" = yes; then
8638 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008640as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008641See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008642 else
8643 ac_cv_sizeof_pid_t=0
8644 fi
8645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646
Christian Heimes400adb02008-02-01 08:12:03 +00008647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8649$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008650
8651
8652
8653cat >>confdefs.h <<_ACEOF
8654#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8655_ACEOF
8656
8657
Michael W. Hudson54241132001-12-07 15:38:26 +00008658
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8660$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008661have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008663/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665int
8666main ()
8667{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008668long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 ;
8670 return 0;
8671}
8672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008674
8675
Matthias Kloseb9621712010-04-24 17:59:49 +00008676$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008677
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008678 have_long_long=yes
8679
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8683$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008684if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685# The cast to long int works around a bug in the HP C Compiler
8686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8688# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8690$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008691if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 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 +00008695
Martin v. Löwis11437992002-04-12 09:54:03 +00008696else
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 if test "$ac_cv_type_long_long" = yes; then
8698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008700as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008701See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702 else
8703 ac_cv_sizeof_long_long=0
8704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008706
Martin v. Löwis11437992002-04-12 09:54:03 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8709$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710
8711
8712
Martin v. Löwis11437992002-04-12 09:54:03 +00008713cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008714#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008715_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008716
Michael W. Hudson54241132001-12-07 15:38:26 +00008717
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008718fi
8719
Matthias Kloseb9621712010-04-24 17:59:49 +00008720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8721$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008722have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008724/* end confdefs.h. */
8725
8726int
8727main ()
8728{
8729long double x; x = (long double)0;
8730 ;
8731 return 0;
8732}
8733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008734if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008735
8736
Matthias Kloseb9621712010-04-24 17:59:49 +00008737$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008738
8739 have_long_double=yes
8740
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008741fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8744$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008745if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746# The cast to long int works around a bug in the HP C Compiler
8747# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8748# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8749# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8751$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008752if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008754else
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 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 +00008756
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 if test "$ac_cv_type_long_double" = yes; then
8759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008761as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008762See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008763 else
8764 ac_cv_sizeof_long_double=0
8765 fi
8766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008767
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8770$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008771
8772
8773
8774cat >>confdefs.h <<_ACEOF
8775#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8776_ACEOF
8777
8778
8779fi
8780
8781
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8783$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008784have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008786/* end confdefs.h. */
8787
8788int
8789main ()
8790{
8791_Bool x; x = (_Bool)0;
8792 ;
8793 return 0;
8794}
8795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008796if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008797
8798
Matthias Kloseb9621712010-04-24 17:59:49 +00008799$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008800
8801 have_c99_bool=yes
8802
Thomas Woutersb2137042007-02-01 18:02:27 +00008803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8806$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008807if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808# The cast to long int works around a bug in the HP C Compiler
8809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8811# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8813$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008814if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008816else
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 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 +00008818
Thomas Woutersb2137042007-02-01 18:02:27 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 if test "$ac_cv_type__Bool" = yes; then
8821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008823as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008824See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825 else
8826 ac_cv_sizeof__Bool=0
8827 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829
Thomas Woutersb2137042007-02-01 18:02:27 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8832$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833
8834
8835
Thomas Woutersb2137042007-02-01 18:02:27 +00008836cat >>confdefs.h <<_ACEOF
8837#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8838_ACEOF
8839
8840
8841fi
8842
Matthias Kloseb9621712010-04-24 17:59:49 +00008843ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008844 #include <stdint.h>
8845 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008846 #ifdef HAVE_INTTYPES_H
8847 #include <inttypes.h>
8848 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008849"
Victor Stinnere0be4232011-10-25 13:06:09 +02008850if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008851
8852cat >>confdefs.h <<_ACEOF
8853#define HAVE_UINTPTR_T 1
8854_ACEOF
8855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856# The cast to long int works around a bug in the HP C Compiler
8857# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8858# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8859# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8861$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008862if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008864else
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 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 +00008866
Martin v. Löwis11437992002-04-12 09:54:03 +00008867else
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 if test "$ac_cv_type_uintptr_t" = yes; then
8869 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008871as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008872See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873 else
8874 ac_cv_sizeof_uintptr_t=0
8875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008877
Martin v. Löwis11437992002-04-12 09:54:03 +00008878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8880$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881
8882
8883
Martin v. Löwis11437992002-04-12 09:54:03 +00008884cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008885#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008887
Michael W. Hudson54241132001-12-07 15:38:26 +00008888
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008889fi
8890
Thomas Wouters89f507f2006-12-13 04:49:30 +00008891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892# The cast to long int works around a bug in the HP C Compiler
8893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8897$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008898if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008902#ifdef HAVE_SYS_TYPES_H
8903#include <sys/types.h>
8904#endif
8905
Matthias Kloseb9621712010-04-24 17:59:49 +00008906"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908else
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 if test "$ac_cv_type_off_t" = yes; then
8910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008912as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008913See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914 else
8915 ac_cv_sizeof_off_t=0
8916 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8921$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008922
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008923
8924
Martin v. Löwis11437992002-04-12 09:54:03 +00008925cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008926#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008927_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008928
Michael W. Hudson54241132001-12-07 15:38:26 +00008929
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008930
Matthias Kloseb9621712010-04-24 17:59:49 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8932$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008933if test "$have_long_long" = yes
8934then
8935if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008936 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008937
Matthias Kloseb9621712010-04-24 17:59:49 +00008938$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008939
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8941$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008942else
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8944$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008945fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008946else
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8948$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008949fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008950
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008951# The cast to long int works around a bug in the HP C Compiler
8952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8954# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8956$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008957if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008959else
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008961#ifdef HAVE_SYS_TYPES_H
8962#include <sys/types.h>
8963#endif
8964#ifdef HAVE_TIME_H
8965#include <time.h>
8966#endif
8967
Matthias Kloseb9621712010-04-24 17:59:49 +00008968"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970else
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 if test "$ac_cv_type_time_t" = yes; then
8972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008974as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008975See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976 else
8977 ac_cv_sizeof_time_t=0
8978 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008980
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8983$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008984
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008985
8986
Martin v. Löwis11437992002-04-12 09:54:03 +00008987cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008988#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008989_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008990
Michael W. Hudson54241132001-12-07 15:38:26 +00008991
8992
Trent Mick635f6fb2000-08-23 21:33:05 +00008993# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008994ac_save_cc="$CC"
8995if test "$ac_cv_kpthread" = "yes"
8996then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008997elif test "$ac_cv_kthread" = "yes"
8998then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008999elif test "$ac_cv_pthread" = "yes"
9000then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009001fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9004$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009005have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009007/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009008
9009 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009010int
9011main ()
9012{
Guido van Rossum12580492000-09-24 16:47:19 +00009013pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 ;
9015 return 0;
9016}
Matthias Kloseb159a552010-04-25 21:00:44 +00009017
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009019if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009020 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9024$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009025if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009027# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9028# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9029# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9031$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009032if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036#ifdef HAVE_PTHREAD_H
9037#include <pthread.h>
9038#endif
9039
Matthias Kloseb9621712010-04-24 17:59:49 +00009040"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009041
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042else
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 if test "$ac_cv_type_pthread_t" = yes; then
9044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9045$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009046as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009047See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009048 else
9049 ac_cv_sizeof_pthread_t=0
9050 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009052
Trent Mick635f6fb2000-08-23 21:33:05 +00009053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9055$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009056
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009057
9058
Martin v. Löwis11437992002-04-12 09:54:03 +00009059cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009060#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009061_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009062
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009063
Trent Mick635f6fb2000-08-23 21:33:05 +00009064fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009065CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009066
Michael W. Hudson54241132001-12-07 15:38:26 +00009067
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009068case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009069 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009070 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9071 ;;
9072 Darwin/*)
9073 OTHER_LIBTOOL_OPT=""
9074 ;;
9075esac
9076
9077
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009078
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009079case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009080 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009081 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9082 if test "${enable_universalsdk}"; then
9083 :
9084 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009085 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009086 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009087 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009088 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009089 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009090 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009091 if test ${gcc_version} '<' 4.0
9092 then
9093 LIBTOOL_CRUFT="-lcc_dynamic"
9094 else
9095 LIBTOOL_CRUFT=""
9096 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009098 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009099else
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009101/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009102
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009103 #include <unistd.h>
9104 int main(int argc, char*argv[])
9105 {
9106 if (sizeof(long) == 4) {
9107 return 0;
9108 } else {
9109 return 1;
9110 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009111 }
9112
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009114if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009115 ac_osx_32bit=yes
9116else
Matthias Kloseb9621712010-04-24 17:59:49 +00009117 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009121fi
9122
9123
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009124 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009125 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009126 i386)
9127 MACOSX_DEFAULT_ARCH="i386"
9128 ;;
9129 ppc)
9130 MACOSX_DEFAULT_ARCH="ppc"
9131 ;;
9132 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009133 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009134 ;;
9135 esac
9136 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009137 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009138 i386)
9139 MACOSX_DEFAULT_ARCH="x86_64"
9140 ;;
9141 ppc)
9142 MACOSX_DEFAULT_ARCH="ppc64"
9143 ;;
9144 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009145 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009146 ;;
9147 esac
9148
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009149 fi
9150
9151 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009152 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009153 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009154esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9156$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009157if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009158then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009159 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009161 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009162
Matthias Kloseb9621712010-04-24 17:59:49 +00009163$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009164
Matthias Kloseb9621712010-04-24 17:59:49 +00009165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9166$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009167 if test $enable_shared = "yes"
9168 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009169 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 +00009170 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009171else
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009174fi
9175
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9177$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009178case $ac_sys_system/$ac_sys_release in
9179 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009180
Matthias Kloseb9621712010-04-24 17:59:49 +00009181$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009182
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9184$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009185 ;;
9186 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9188$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009189 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009190esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009191
Guido van Rossum0a516c91994-09-12 10:58:40 +00009192# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009193
Michael W. Hudson54241132001-12-07 15:38:26 +00009194
9195
9196
9197
Benjamin Peterson99f03762010-04-11 22:15:28 +00009198
Thomas Wouters477c8d52006-05-27 19:21:47 +00009199
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009200# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9201# -- usually .so, .sl on HP-UX, .dll on Cygwin
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9203$as_echo_n "checking the extension of shared libraries... " >&6; }
9204if test -z "$SHLIB_SUFFIX"; then
9205 case $ac_sys_system in
9206 hp*|HP*)
9207 case `uname -m` in
9208 ia64) SHLIB_SUFFIX=.so;;
9209 *) SHLIB_SUFFIX=.sl;;
9210 esac
9211 ;;
9212 CYGWIN*) SHLIB_SUFFIX=.dll;;
9213 *) SHLIB_SUFFIX=.so;;
9214 esac
9215fi
9216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9217$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009218
Guido van Rossum0a516c91994-09-12 10:58:40 +00009219# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009220# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009221# (Shared libraries in this instance are shared modules to be loaded into
9222# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9224$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009225if test -z "$LDSHARED"
9226then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009227 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009228 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009229 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009230 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009231 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009232 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009233 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009235 if test "$GCC" = "yes" ; then
9236 LDSHARED='$(CC) -shared'
9237 LDCXXSHARED='$(CXX) -shared'
9238 else
9239 LDSHARED='$(CC) -G'
9240 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009241 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009242 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009243 if test "$GCC" = "yes" ; then
9244 LDSHARED='$(CC) -shared'
9245 LDCXXSHARED='$(CXX) -shared'
9246 else
9247 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009248 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009249 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009250 LDSHARED='$(CC) -bundle'
9251 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009252 if test "$enable_framework" ; then
9253 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009254 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9255 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009256 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009257 else
9258 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009259 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009260 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009261 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009262 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009263 LDSHARED='$(CC) -bundle'
9264 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009265 if test "$enable_framework" ; then
9266 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009267 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9268 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009269 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009270 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009271 # No framework, use the Python app as bundle-loader
9272 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009273 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009274 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009276 Darwin/*)
9277 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9278 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009279
Ned Deily36820b62014-06-25 13:44:22 -07009280 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9281 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9282 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9283 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9284 if test ${dep_target_major} -eq 10 && \
9285 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009286 then
Ned Deily36820b62014-06-25 13:44:22 -07009287 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009288 LDSHARED='$(CC) -bundle'
9289 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009290 if test "$enable_framework" ; then
9291 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009292 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9293 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009294 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009295 else
9296 # No framework, use the Python app as bundle-loader
9297 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9298 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009299 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009300 fi
Ned Deily36820b62014-06-25 13:44:22 -07009301 else
9302 # building for OS X 10.3 and later
9303 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9304 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9305 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009306 fi
9307 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009308 Linux*|GNU*|QNX*)
9309 LDSHARED='$(CC) -shared'
9310 LDCXXSHARED='$(CXX) -shared';;
9311 BSD/OS*/4*)
9312 LDSHARED="gcc -shared"
9313 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009314 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009315 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009316 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009317 LDSHARED='$(CC) -shared'
9318 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009319 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009320 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009321 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009322 OpenBSD*)
9323 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9324 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009325 LDSHARED='$(CC) -shared $(CCSHARED)'
9326 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009327 else
9328 case `uname -r` in
9329 [01].* | 2.[0-7] | 2.[0-7].*)
9330 LDSHARED="ld -Bshareable ${LDFLAGS}"
9331 ;;
9332 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009333 LDSHARED='$(CC) -shared $(CCSHARED)'
9334 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009335 ;;
9336 esac
9337 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009338 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009339 LDSHARED='$(CC) -shared'
9340 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009341 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009342 if test "$GCC" = "yes" ; then
9343 LDSHARED='$(CC) -shared'
9344 LDCXXSHARED='$(CXX) -shared'
9345 else
9346 LDSHARED='$(CC) -G'
9347 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009348 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009349 SCO_SV*)
9350 LDSHARED='$(CC) -Wl,-G,-Bexport'
9351 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9352 CYGWIN*)
9353 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9354 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009355 *) LDSHARED="ld";;
9356 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9359$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009360LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009361BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009362# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009363# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9365$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009366if test -z "$CCSHARED"
9367then
Guido van Rossum07397971997-04-29 21:49:50 +00009368 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009369 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009370 then CCSHARED="-fPIC";
9371 elif test `uname -p` = sparc;
9372 then CCSHARED="-xcode=pic32";
9373 else CCSHARED="-Kpic";
9374 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009375 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009376 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009377 else CCSHARED="+z";
9378 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009379 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009380 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009381 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009382 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009383 if test "$GCC" = "yes"
9384 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009385 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009386 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009387 SCO_SV*)
9388 if test "$GCC" = "yes"
9389 then CCSHARED="-fPIC"
9390 else CCSHARED="-Kpic -belf"
9391 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009392 IRIX*/6*) case $CC in
9393 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009394 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009395 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009396 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9399$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009401# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9403$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009404if test -z "$LINKFORSHARED"
9405then
Guido van Rossum07397971997-04-29 21:49:50 +00009406 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009407 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009408 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009409 LINKFORSHARED="-Wl,-E -Wl,+s";;
9410# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009411 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009412 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009413 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009415 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009416
9417 # Issue #18075: the default maximum stack size (8MBytes) is too
9418 # small for the default recursion limit. Increase the stack size
9419 # to ensure that tests don't crash
9420 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9421
Jack Jansene578a632001-08-15 01:27:14 +00009422 if test "$enable_framework"
9423 then
Jack Jansenda49e192005-01-07 13:08:22 +00009424 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009425 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009426 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009427 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009428 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009429 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009430 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009431 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9432 then
9433 LINKFORSHARED="-Wl,--export-dynamic"
9434 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009435 SunOS/5*) case $CC in
9436 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009437 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009438 then
9439 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009440 fi;;
9441 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009442 CYGWIN*)
9443 if test $enable_shared = "no"
9444 then
9445 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9446 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009447 QNX*)
9448 # -Wl,-E causes the symbols to be added to the dynamic
9449 # symbol table so that they can be found when a module
9450 # is loaded. -N 2048K causes the stack size to be set
9451 # to 2048 kilobytes so that the stack doesn't overflow
9452 # when running test_compile.py.
9453 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009454 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9457$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009458
Michael W. Hudson54241132001-12-07 15:38:26 +00009459
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009460
Matthias Kloseb9621712010-04-24 17:59:49 +00009461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9462$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009463if test ! "$LIBRARY" = "$LDLIBRARY"
9464then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009465 case $ac_sys_system in
9466 CYGWIN*)
9467 # Cygwin needs CCSHARED when building extension DLLs
9468 # but not when building the interpreter DLL.
9469 CFLAGSFORSHARED='';;
9470 *)
9471 CFLAGSFORSHARED='$(CCSHARED)'
9472 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9475$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009476
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009477# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9478# library (with --enable-shared).
9479# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009480# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9481# if it is not required, since it creates a dependency of the shared library
9482# to LIBS. This, in turn, means that applications linking the shared libpython
9483# don't need to link LIBS explicitly. The default should be only changed
9484# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009485
Matthias Kloseb9621712010-04-24 17:59:49 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9487$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009488case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009489 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009490 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009491esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9493$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009494
9495
Guido van Rossum627b2d71993-12-24 10:39:16 +00009496# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9498$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009500 $as_echo_n "(cached) " >&6
9501else
9502 ac_check_lib_save_LIBS=$LIBS
9503LIBS="-lsendfile $LIBS"
9504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9505/* end confdefs.h. */
9506
9507/* Override any GCC internal prototype to avoid an error.
9508 Use char because int might match the return type of a GCC
9509 builtin and then its argument prototype would still apply. */
9510#ifdef __cplusplus
9511extern "C"
9512#endif
9513char sendfile ();
9514int
9515main ()
9516{
9517return sendfile ();
9518 ;
9519 return 0;
9520}
9521_ACEOF
9522if ac_fn_c_try_link "$LINENO"; then :
9523 ac_cv_lib_sendfile_sendfile=yes
9524else
9525 ac_cv_lib_sendfile_sendfile=no
9526fi
9527rm -f core conftest.err conftest.$ac_objext \
9528 conftest$ac_exeext conftest.$ac_ext
9529LIBS=$ac_check_lib_save_LIBS
9530fi
9531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9532$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009533if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009534 cat >>confdefs.h <<_ACEOF
9535#define HAVE_LIBSENDFILE 1
9536_ACEOF
9537
9538 LIBS="-lsendfile $LIBS"
9539
9540fi
9541
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9543$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009544if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009546else
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009548LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552/* Override any GCC internal prototype to avoid an error.
9553 Use char because int might match the return type of a GCC
9554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555#ifdef __cplusplus
9556extern "C"
9557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009558char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009559int
9560main ()
9561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 ;
9564 return 0;
9565}
9566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009569else
Matthias Kloseb9621712010-04-24 17:59:49 +00009570 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572rm -f core conftest.err conftest.$ac_objext \
9573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009574LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9577$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009578if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009579 cat >>confdefs.h <<_ACEOF
9580#define HAVE_LIBDL 1
9581_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009582
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009583 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009585fi
9586 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9588$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009589if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009590 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009591else
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009593LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597/* Override any GCC internal prototype to avoid an error.
9598 Use char because int might match the return type of a GCC
9599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600#ifdef __cplusplus
9601extern "C"
9602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009603char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009604int
9605main ()
9606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ;
9609 return 0;
9610}
9611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009612if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009614else
Matthias Kloseb9621712010-04-24 17:59:49 +00009615 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009617rm -f core conftest.err conftest.$ac_objext \
9618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009619LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9622$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009623if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 cat >>confdefs.h <<_ACEOF
9625#define HAVE_LIBDLD 1
9626_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009627
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009628 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009630fi
9631 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009632
Georg Brandlb1441c72009-01-03 22:33:39 +00009633# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009634if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9636$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009637if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009639else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009640 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644/* Override any GCC internal prototype to avoid an error.
9645 Use char because int might match the return type of a GCC
9646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009647#ifdef __cplusplus
9648extern "C"
9649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009650char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009651int
9652main ()
9653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009655 ;
9656 return 0;
9657}
9658_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659for ac_lib in '' pthread rt posix4; do
9660 if test -z "$ac_lib"; then
9661 ac_res="none required"
9662 else
9663 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009664 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009669rm -f core conftest.err conftest.$ac_objext \
9670 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009671 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674done
Victor Stinnere0be4232011-10-25 13:06:09 +02009675if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009677else
9678 ac_cv_search_sem_init=no
9679fi
9680rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009681LIBS=$ac_func_search_save_LIBS
9682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9684$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009688
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009689fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009690 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009691 # posix4 on Solaris 2.6
9692 # pthread (first!) on Linux
9693fi
9694
Martin v. Löwis19d17342003-06-14 21:03:05 +00009695# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9697$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009698if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009700else
9701 ac_check_lib_save_LIBS=$LIBS
9702LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706/* Override any GCC internal prototype to avoid an error.
9707 Use char because int might match the return type of a GCC
9708 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009709#ifdef __cplusplus
9710extern "C"
9711#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009712char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009713int
9714main ()
9715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009717 ;
9718 return 0;
9719}
9720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009721if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009722 ac_cv_lib_intl_textdomain=yes
9723else
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009726rm -f core conftest.err conftest.$ac_objext \
9727 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009728LIBS=$ac_check_lib_save_LIBS
9729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9731$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009732if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009733
Matthias Kloseb9621712010-04-24 17:59:49 +00009734$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009735
Brett Cannonc6d936e2009-06-07 20:09:53 +00009736 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009737fi
9738
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009739
9740# checks for system dependent C++ extensions support
9741case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9743$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009746
Georg Brandl59e87bd2011-02-15 19:48:59 +00009747 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009748int
9749main ()
9750{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009751loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ;
9753 return 0;
9754}
Matthias Kloseb159a552010-04-25 21:00:44 +00009755
Martin v. Löwis11437992002-04-12 09:54:03 +00009756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009757if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009758
Matthias Kloseb159a552010-04-25 21:00:44 +00009759
Matthias Kloseb9621712010-04-24 17:59:49 +00009760$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009761
Matthias Kloseb159a552010-04-25 21:00:44 +00009762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009763$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009764
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009765else
Matthias Kloseb159a552010-04-25 21:00:44 +00009766
9767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009768$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009769
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009771rm -f core conftest.err conftest.$ac_objext \
9772 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009773 *) ;;
9774esac
9775
Christian Heimes985ecdc2013-11-20 11:46:18 +01009776# check for systems that require aligned memory access
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9778$as_echo_n "checking aligned memory access is required... " >&6; }
9779if test "$cross_compiling" = yes; then :
9780 aligned_required=yes
9781else
9782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9783/* end confdefs.h. */
9784
9785int main()
9786{
9787 char s[16];
9788 int i, *p1, *p2;
9789 for (i=0; i < 16; i++)
9790 s[i] = i;
9791 p1 = (int*)(s+1);
9792 p2 = (int*)(s+2);
9793 if (*p1 == *p2)
9794 return 1;
9795 return 0;
9796}
9797
9798_ACEOF
9799if ac_fn_c_try_run "$LINENO"; then :
9800 aligned_required=no
9801else
9802 aligned_required=yes
9803fi
9804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9805 conftest.$ac_objext conftest.beam conftest.$ac_ext
9806fi
9807
9808
9809if test "$aligned_required" = yes ; then
9810
9811$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9812
9813fi
9814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9815$as_echo "$aligned_required" >&6; }
9816
9817
9818# str, bytes and memoryview hash algorithm
9819
9820
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9822$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9823
9824# Check whether --with-hash_algorithm was given.
9825if test "${with_hash_algorithm+set}" = set; then :
9826 withval=$with_hash_algorithm;
9827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9828$as_echo "$withval" >&6; }
9829case "$withval" in
9830 siphash24)
9831 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9832
9833 ;;
9834 fnv)
9835 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9836
9837 ;;
9838 *)
9839 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9840 ;;
9841esac
9842
9843else
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9845$as_echo "default" >&6; }
9846fi
9847
9848
Charles-François Natalid30b0222014-05-08 23:08:51 +01009849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9850$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9851
9852# Check whether --with-address_sanitizer was given.
9853if test "${with_address_sanitizer+set}" = set; then :
9854 withval=$with_address_sanitizer;
9855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9856$as_echo "$withval" >&6; }
9857BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9858LDFLAGS="-fsanitize=address $LDFLAGS"
9859
9860else
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862$as_echo "no" >&6; }
9863fi
9864
9865
Guido van Rossum70c7f481998-03-26 18:44:10 +00009866# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9868$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009871else
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009873LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877/* Override any GCC internal prototype to avoid an error.
9878 Use char because int might match the return type of a GCC
9879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009880#ifdef __cplusplus
9881extern "C"
9882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009883char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009884int
9885main ()
9886{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ;
9889 return 0;
9890}
9891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009892if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009894else
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009897rm -f core conftest.err conftest.$ac_objext \
9898 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009899LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9902$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009903if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009904 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009905fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009906 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9908$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009909if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009911else
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009913LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917/* Override any GCC internal prototype to avoid an error.
9918 Use char because int might match the return type of a GCC
9919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009920#ifdef __cplusplus
9921extern "C"
9922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009923char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009924int
9925main ()
9926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ;
9929 return 0;
9930}
9931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009934else
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009937rm -f core conftest.err conftest.$ac_objext \
9938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009939LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9942$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009943if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009944 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009945fi
9946 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009947
Matthias Kloseb9621712010-04-24 17:59:49 +00009948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9949$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009951# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009952if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9955$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009956LIBS="$withval $LIBS"
9957
9958else
Matthias Kloseb9621712010-04-24 17:59:49 +00009959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9960$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961fi
9962
Guido van Rossum7f43da71994-08-01 12:15:30 +00009963
Victor Stinner8291b5e2015-03-20 16:03:14 +01009964
9965
9966
9967
9968
9969
9970
9971if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9972 if test -n "$ac_tool_prefix"; then
9973 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9974set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9976$as_echo_n "checking for $ac_word... " >&6; }
9977if ${ac_cv_path_PKG_CONFIG+:} false; then :
9978 $as_echo_n "(cached) " >&6
9979else
9980 case $PKG_CONFIG in
9981 [\\/]* | ?:[\\/]*)
9982 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9983 ;;
9984 *)
9985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9986for as_dir in $PATH
9987do
9988 IFS=$as_save_IFS
9989 test -z "$as_dir" && as_dir=.
9990 for ac_exec_ext in '' $ac_executable_extensions; do
9991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9992 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9994 break 2
9995 fi
9996done
9997 done
9998IFS=$as_save_IFS
9999
10000 ;;
10001esac
10002fi
10003PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10004if test -n "$PKG_CONFIG"; then
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10006$as_echo "$PKG_CONFIG" >&6; }
10007else
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
10010fi
10011
10012
10013fi
10014if test -z "$ac_cv_path_PKG_CONFIG"; then
10015 ac_pt_PKG_CONFIG=$PKG_CONFIG
10016 # Extract the first word of "pkg-config", so it can be a program name with args.
10017set dummy pkg-config; ac_word=$2
10018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10019$as_echo_n "checking for $ac_word... " >&6; }
10020if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10021 $as_echo_n "(cached) " >&6
10022else
10023 case $ac_pt_PKG_CONFIG in
10024 [\\/]* | ?:[\\/]*)
10025 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10026 ;;
10027 *)
10028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10029for as_dir in $PATH
10030do
10031 IFS=$as_save_IFS
10032 test -z "$as_dir" && as_dir=.
10033 for ac_exec_ext in '' $ac_executable_extensions; do
10034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10035 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10037 break 2
10038 fi
10039done
10040 done
10041IFS=$as_save_IFS
10042
10043 ;;
10044esac
10045fi
10046ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10047if test -n "$ac_pt_PKG_CONFIG"; then
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10049$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10050else
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
10053fi
10054
10055 if test "x$ac_pt_PKG_CONFIG" = x; then
10056 PKG_CONFIG=""
10057 else
10058 case $cross_compiling:$ac_tool_warned in
10059yes:)
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10062ac_tool_warned=yes ;;
10063esac
10064 PKG_CONFIG=$ac_pt_PKG_CONFIG
10065 fi
10066else
10067 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10068fi
10069
10070fi
10071if test -n "$PKG_CONFIG"; then
10072 _pkg_min_version=0.9.0
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10074$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10075 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10077$as_echo "yes" >&6; }
10078 else
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10080$as_echo "no" >&6; }
10081 PKG_CONFIG=""
10082 fi
10083fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010084
10085# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10087$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010088
10089# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010090if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010091 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010092else
10093 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010094fi
10095
10096
Matthias Kloseb9621712010-04-24 17:59:49 +000010097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10098$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010099
10100# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10102$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010103
10104# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010105if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010106 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +000010107else
10108 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010109fi
10110
10111
10112if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010113 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10114else
10115 LIBFFI_INCLUDEDIR=""
10116fi
10117
10118
Matthias Kloseb9621712010-04-24 17:59:49 +000010119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10120$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010121
Stefan Krah60187b52012-03-23 19:06:27 +010010122# Check for use of the system libmpdec library
10123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10124$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10125
10126# Check whether --with-system_libmpdec was given.
10127if test "${with_system_libmpdec+set}" = set; then :
10128 withval=$with_system_libmpdec;
10129else
10130 with_system_libmpdec="no"
10131fi
10132
10133
10134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10135$as_echo "$with_system_libmpdec" >&6; }
10136
Benjamin Peterson076ed002010-10-31 17:11:02 +000010137# Check for support for loadable sqlite extensions
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10139$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10140# Check whether --enable-loadable-sqlite-extensions was given.
10141if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10142 enableval=$enable_loadable_sqlite_extensions;
10143else
10144 enable_loadable_sqlite_extensions="no"
10145fi
10146
10147
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10149$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10150
Ned Deilyd819b932013-09-06 01:07:05 -070010151# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10152
10153
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10155$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10156
10157# Check whether --with-tcltk-includes was given.
10158if test "${with_tcltk_includes+set}" = set; then :
10159 withval=$with_tcltk_includes;
10160else
10161 with_tcltk_includes="default"
10162fi
10163
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10165$as_echo "$with_tcltk_includes" >&6; }
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10167$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10168
10169# Check whether --with-tcltk-libs was given.
10170if test "${with_tcltk_libs+set}" = set; then :
10171 withval=$with_tcltk_libs;
10172else
10173 with_tcltk_libs="default"
10174fi
10175
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10177$as_echo "$with_tcltk_libs" >&6; }
10178if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10179then
10180 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10181 then
10182 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10183 fi
10184 TCLTK_INCLUDES=""
10185 TCLTK_LIBS=""
10186else
10187 TCLTK_INCLUDES="$with_tcltk_includes"
10188 TCLTK_LIBS="$with_tcltk_libs"
10189fi
10190
Matthias Klose55708cc2009-04-30 08:06:49 +000010191# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10193$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010194
10195# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010197 withval=$with_dbmliborder;
10198if test x$with_dbmliborder = xyes
10199then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010200as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010201else
10202 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10203 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10204 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010205 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010206 fi
10207 done
10208fi
10209fi
10210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10212$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010213
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010214# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010215
10216
Matthias Kloseb9621712010-04-24 17:59:49 +000010217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10218$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222 withval=$with_signal_module;
10223fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010224
10225
10226if test -z "$with_signal_module"
10227then with_signal_module="yes"
10228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10230$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010231
10232if test "${with_signal_module}" = "yes"; then
10233 USE_SIGNAL_MODULE=""
10234 SIGNAL_OBJS=""
10235else
10236 USE_SIGNAL_MODULE="#"
10237 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10238fi
10239
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010240# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010241
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010242USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
10246# Templates for things AC_DEFINEd more than once.
10247# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010248
10249
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Matthias Kloseb9621712010-04-24 17:59:49 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10252$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010255if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256 withval=$with_threads;
10257fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010258
10259
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010260# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010263if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 withval=$with_thread; with_threads=$with_thread
10265fi
10266
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010267
10268if test -z "$with_threads"
10269then with_threads="yes"
10270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10272$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010273
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010274
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010275if test "$with_threads" = "no"
10276then
10277 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010278elif test "$ac_cv_pthread_is_default" = yes
10279then
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010281
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010282 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010284
10285 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010287elif test "$ac_cv_kpthread" = "yes"
10288then
10289 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010290 if test "$ac_cv_cxx_thread" = "yes"; then
10291 CXX="$CXX -Kpthread"
10292 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010294
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010295 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010296 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010297elif test "$ac_cv_kthread" = "yes"
10298then
10299 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010300 if test "$ac_cv_cxx_thread" = "yes"; then
10301 CXX="$CXX -Kthread"
10302 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010304
10305 posix_threads=yes
10306 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010307elif test "$ac_cv_pthread" = "yes"
10308then
10309 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010310 if test "$ac_cv_cxx_thread" = "yes"; then
10311 CXX="$CXX -pthread"
10312 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010314
10315 posix_threads=yes
10316 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010317else
10318 if test ! -z "$with_threads" -a -d "$with_threads"
10319 then LDFLAGS="$LDFLAGS -L$with_threads"
10320 fi
10321 if test ! -z "$withval" -a -d "$withval"
10322 then LDFLAGS="$LDFLAGS -L$withval"
10323 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010324
10325 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010326 # define _POSIX_THREADS in unistd.h. Some apparently don't
10327 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10329$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010332
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010333#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010334#ifdef _POSIX_THREADS
10335yes
10336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010337
10338_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010341 unistd_defines_pthreads=yes
10342else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010343 unistd_defines_pthreads=no
10344fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010345rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010346
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10348$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010351
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010352 # Just looking for pthread_create in libpthread is not enough:
10353 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10354 # So we really have to include pthread.h, and then link.
10355 _libs=$LIBS
10356 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10358$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010360/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010361
10362#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010363#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010364
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010365void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010366int
10367main ()
10368{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010369
10370pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ;
10372 return 0;
10373}
10374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10378$as_echo "yes" >&6; }
10379 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010380
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010381 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010382 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010383else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010385 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010387if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010389
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010390 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010391 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010392else
Guido van Rossumad678af1998-10-02 14:42:15 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10395$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010396if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010398else
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010400LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404/* Override any GCC internal prototype to avoid an error.
10405 Use char because int might match the return type of a GCC
10406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407#ifdef __cplusplus
10408extern "C"
10409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010410char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010411int
10412main ()
10413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010421else
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010424rm -f core conftest.err conftest.$ac_objext \
10425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010426LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10429$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010430if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010432
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010433 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010434 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010435 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010436else
Greg Steinadf63d62000-07-05 10:38:09 +000010437
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10439$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010440if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010442else
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010444LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448/* Override any GCC internal prototype to avoid an error.
10449 Use char because int might match the return type of a GCC
10450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010451#ifdef __cplusplus
10452extern "C"
10453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010454char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010455int
10456main ()
10457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ;
10460 return 0;
10461}
10462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010468rm -f core conftest.err conftest.$ac_objext \
10469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010470LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10473$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010474if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010476
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010477 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010478 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010479 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010480else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010481
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10483$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010484if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010486else
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010488LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492/* Override any GCC internal prototype to avoid an error.
10493 Use char because int might match the return type of a GCC
10494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495#ifdef __cplusplus
10496extern "C"
10497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010498char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010499int
10500main ()
10501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ;
10504 return 0;
10505}
10506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010509else
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512rm -f core conftest.err conftest.$ac_objext \
10513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010514LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10517$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010518if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010521 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010522 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010523 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010524else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010525
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10527$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010528if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010530else
Martin v. Löwis11437992002-04-12 09:54:03 +000010531 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010532LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536/* Override any GCC internal prototype to avoid an error.
10537 Use char because int might match the return type of a GCC
10538 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010539#ifdef __cplusplus
10540extern "C"
10541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010542char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010543int
10544main ()
10545{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 ;
10548 return 0;
10549}
10550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010551if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010553else
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010556rm -f core conftest.err conftest.$ac_objext \
10557 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010558LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10561$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010562if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010564
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010565 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010566 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010567 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010568else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010569
Martin v. Löwis130fb172001-07-19 11:00:41 +000010570 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010571fi
10572
Guido van Rossum627b2d71993-12-24 10:39:16 +000010573
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010574fi
10575
Guido van Rossum0be3e491997-05-22 20:33:33 +000010576fi
10577
Guido van Rossum49545951997-12-02 19:28:29 +000010578fi
10579
Guido van Rossumb93a8621998-05-07 13:27:32 +000010580fi
10581
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010583rm -f core conftest.err conftest.$ac_objext \
10584 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010585
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10587$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010588if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590else
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010592LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596/* Override any GCC internal prototype to avoid an error.
10597 Use char because int might match the return type of a GCC
10598 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010599#ifdef __cplusplus
10600extern "C"
10601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010602char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010603int
10604main ()
10605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 ;
10608 return 0;
10609}
10610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613else
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010616rm -f core conftest.err conftest.$ac_objext \
10617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010618LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10621$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010622if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010624
Martin v. Löwis130fb172001-07-19 11:00:41 +000010625 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010626 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010627 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628fi
10629
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010630
Neal Norwitza978ab02002-11-02 16:58:05 +000010631 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10633$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010634if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010636else
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010638LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642/* Override any GCC internal prototype to avoid an error.
10643 Use char because int might match the return type of a GCC
10644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010645#ifdef __cplusplus
10646extern "C"
10647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010648char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010649int
10650main ()
10651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 ;
10654 return 0;
10655}
10656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010659else
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010662rm -f core conftest.err conftest.$ac_objext \
10663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010664LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10667$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010668if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010670
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010671 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010672 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010673 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010674fi
10675
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010676 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010677fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010678
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679if test "$posix_threads" = "yes"; then
10680 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010683
10684 fi
10685
10686 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10687 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010688 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010689$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010690
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010691 ;;
10692 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010693$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010694
10695 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010696 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010698
10699 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010700 esac
10701
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10703$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010704 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706else
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708 ac_cv_pthread_system_supported=no
10709else
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010711/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010712
10713 #include <stdio.h>
10714 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715 void *foo(void *parm) {
10716 return NULL;
10717 }
10718 main() {
10719 pthread_attr_t attr;
10720 pthread_t id;
10721 if (pthread_attr_init(&attr)) exit(-1);
10722 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10723 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10724 exit(0);
10725 }
10726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010727if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010728 ac_cv_pthread_system_supported=yes
10729else
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010734fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736
Guido van Rossum627b2d71993-12-24 10:39:16 +000010737fi
10738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10740$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010741 if test "$ac_cv_pthread_system_supported" = "yes"; then
10742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010744
10745 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 for ac_func in pthread_sigmask
10747do :
10748 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010749if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010750 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010751#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010752_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010753 case $ac_sys_system in
10754 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010757
10758 ;;
10759 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010760fi
10761done
10762
Christian Heimesf77b4b22013-08-21 13:26:05 +020010763 for ac_func in pthread_atfork
10764do :
10765 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10766if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10767 cat >>confdefs.h <<_ACEOF
10768#define HAVE_PTHREAD_ATFORK 1
10769_ACEOF
10770
10771fi
10772done
10773
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010774fi
10775
10776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010778
Matthias Kloseb9621712010-04-24 17:59:49 +000010779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10780$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10786$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787 ipv6=no
10788 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10790$as_echo "yes" >&6; }
10791 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792
10793 ipv6=yes
10794 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796else
Martin v. Löwis11437992002-04-12 09:54:03 +000010797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800 /* AF_INET6 available check */
10801#include <sys/types.h>
10802#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010803int
10804main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010806int domain = AF_INET6;
10807 ;
10808 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809}
Martin v. Löwis11437992002-04-12 09:54:03 +000010810_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010811if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010812
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10814$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010816
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817else
Matthias Kloseb159a552010-04-25 21:00:44 +000010818
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10820$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010826if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10828$as_echo_n "checking if RFC2553 API is available... " >&6; }
10829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010831
10832 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010833#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010834int
10835main ()
10836{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010837struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010838 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 ;
10840 return 0;
10841}
Matthias Kloseb159a552010-04-25 21:00:44 +000010842
Martin v. Löwis11437992002-04-12 09:54:03 +000010843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010844if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010845
10846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010847$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010848 ipv6=yes
10849
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010850else
Matthias Kloseb159a552010-04-25 21:00:44 +000010851
10852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010853$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010854 ipv6=no
10855
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010858fi
10859
10860if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010862
10863fi
10864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865fi
10866
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867
10868ipv6type=unknown
10869ipv6lib=none
10870ipv6trylibc=no
10871
10872if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10874$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010875 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10876 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877 case $i in
10878 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010881
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882#include <netinet/in.h>
10883#ifdef IPV6_INRIA_VERSION
10884yes
10885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010886_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010889 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892
10893 ;;
10894 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898#include <netinet/in.h>
10899#ifdef __KAME__
10900yes
10901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 ipv6type=$i;
10906 ipv6lib=inet6
10907 ipv6libdir=/usr/local/v6/lib
10908 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010910rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911
10912 ;;
10913 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917#include <features.h>
10918#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10919yes
10920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010921_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924 ipv6type=$i;
10925 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010927rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928
10929 ;;
10930 linux-inet6)
10931 if test -d /usr/inet6; then
10932 ipv6type=$i
10933 ipv6lib=inet6
10934 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010935 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936 fi
10937 ;;
10938 solaris)
10939 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010940 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941 ipv6type=$i
10942 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943 fi
10944 fi
10945 ;;
10946 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010948/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010949
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950#include <sys/param.h>
10951#ifdef _TOSHIBA_INET6
10952yes
10953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010954_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957 ipv6type=$i;
10958 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010959 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010961rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962
10963 ;;
10964 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010966/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010967
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968#include </usr/local/v6/include/sys/v6config.h>
10969#ifdef __V6D__
10970yes
10971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010972_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010975 ipv6type=$i;
10976 ipv6lib=v6;
10977 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010978 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010980rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981
10982 ;;
10983 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010985/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987#include <sys/param.h>
10988#ifdef _ZETA_MINAMI_INET6
10989yes
10990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010991_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010994 ipv6type=$i;
10995 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010996 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010997fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010998rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999
11000 ;;
11001 esac
11002 if test "$ipv6type" != "unknown"; then
11003 break
11004 fi
11005 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11007$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008fi
11009
11010if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11011 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11012 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11013 echo "using lib$ipv6lib"
11014 else
11015 if test $ipv6trylibc = "yes"; then
11016 echo "using libc"
11017 else
11018 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11019 echo "You need to fetch lib$ipv6lib.a from appropriate"
11020 echo 'ipv6 kit and compile beforehand.'
11021 exit 1
11022 fi
11023 fi
11024fi
11025
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11027$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029/* end confdefs.h. */
11030 /* CAN_RAW_FD_FRAMES available check */
11031#include <linux/can/raw.h>
11032int
11033main ()
11034{
11035int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11036 ;
11037 return 0;
11038}
11039_ACEOF
11040if ac_fn_c_try_compile "$LINENO"; then :
11041
11042
11043$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11044
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11046$as_echo "yes" >&6; }
11047
11048else
11049
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11051$as_echo "no" >&6; }
11052
11053fi
11054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
11057$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
11058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011059/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011060
11061 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011062int
11063main ()
11064{
11065FSIORefNum fRef = 0
11066 ;
11067 return 0;
11068}
Matthias Kloseb159a552010-04-25 21:00:44 +000011069
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011071if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011072
Matthias Kloseb159a552010-04-25 21:00:44 +000011073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11077$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011078
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011079else
Matthias Kloseb159a552010-04-25 21:00:44 +000011080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011083
11084fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11086
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011087# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11089$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011092if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093 withval=$with_doc_strings;
11094fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011095
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011096
11097if test -z "$with_doc_strings"
11098then with_doc_strings="yes"
11099fi
11100if test "$with_doc_strings" != "no"
11101then
11102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011104
11105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11107$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011108
Antoine Pitrou042b1282010-08-13 21:15:58 +000011109# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11111$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011114if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011115 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011116if test "$withval" != no
11117then
11118
Matthias Kloseb9621712010-04-24 17:59:49 +000011119$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11122$as_echo "yes" >&6; }
11123else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011125fi
11126else
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11128$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129fi
11130
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011131
11132# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11134$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011136# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011137if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138 withval=$with_pymalloc;
11139fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011140
Neil Schemenauera35c6882001-02-27 04:45:05 +000011141
Neil Schemenauer16c22972002-03-22 15:34:49 +000011142if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011143then
11144 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011145fi
11146if test "$with_pymalloc" != "no"
11147then
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011150
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011151 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11154$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011155
Benjamin Peterson05159c42009-12-03 03:01:27 +000011156# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11158$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011159
11160# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011161if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011162 withval=$with_valgrind;
11163else
11164 with_valgrind=no
11165fi
11166
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11168$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011169if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 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 +020011171if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011172
Matthias Kloseb9621712010-04-24 17:59:49 +000011173$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011174
11175else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011176 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011177
11178fi
11179
11180
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011181 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011182fi
11183
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011184# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011185
Guido van Rossum98935bf2001-09-05 19:13:16 +000011186DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011187
Guido van Rossume97ee181999-12-20 21:27:22 +000011188# the dlopen() function means we might want to use dynload_shlib.o. some
11189# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011190for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011191do :
11192 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011193if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011195#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011196_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011197
Guido van Rossume97ee181999-12-20 21:27:22 +000011198fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011199done
Guido van Rossume97ee181999-12-20 21:27:22 +000011200
Michael W. Hudson54241132001-12-07 15:38:26 +000011201
Guido van Rossume97ee181999-12-20 21:27:22 +000011202# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11203# loading of modules.
11204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11206$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011207if test -z "$DYNLOADFILE"
11208then
11209 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011210 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11211 if test "$ac_cv_func_dlopen" = yes
11212 then DYNLOADFILE="dynload_shlib.o"
11213 else DYNLOADFILE="dynload_aix.o"
11214 fi
11215 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011216 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011217 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11218 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011219 *)
11220 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11221 # out any dynamic loading
11222 if test "$ac_cv_func_dlopen" = yes
11223 then DYNLOADFILE="dynload_shlib.o"
11224 else DYNLOADFILE="dynload_stub.o"
11225 fi
11226 ;;
11227 esac
11228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11230$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011231if test "$DYNLOADFILE" != "dynload_stub.o"
11232then
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011235
11236fi
11237
Neil Schemenauer4e425612001-06-19 15:44:15 +000011238# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11239
Michael W. Hudson54241132001-12-07 15:38:26 +000011240
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11242$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011243if test -z "$MACHDEP_OBJS"
11244then
Jack Jansene578a632001-08-15 01:27:14 +000011245 MACHDEP_OBJS=$extra_machdep_objs
11246else
11247 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011248fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011249if test -z "$MACHDEP_OBJS"; then
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11251$as_echo "none" >&6; }
11252else
11253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11254$as_echo "$MACHDEP_OBJS" >&6; }
11255fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011256
Guido van Rossum627b2d71993-12-24 10:39:16 +000011257# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011258for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011259 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011260 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011261 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011262 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011263 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011264 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011265 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11266 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011267 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011268 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011269 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011270 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011271 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011272 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011273 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11274 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011275 sigaction sigaltstack siginterrupt sigpending sigrelse \
11276 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011277 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011278 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011279 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011280do :
11281 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11282ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011283if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011286_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011287
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011288fi
11289done
11290
Michael W. Hudson54241132001-12-07 15:38:26 +000011291
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011292ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11293 #include <dirent.h>
11294"
11295if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11296
11297$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11298
11299fi
11300
11301
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011302# For some functions, having a definition is not sufficient, since
11303# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11305$as_echo_n "checking for chroot... " >&6; }
11306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011307/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011308#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309int
11310main ()
11311{
11312void *x=chroot
11313 ;
11314 return 0;
11315}
11316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320
Matthias Kloseb159a552010-04-25 21:00:44 +000011321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011322$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011323else
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011326
11327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11330$as_echo_n "checking for link... " >&6; }
11331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011332/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011333#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334int
11335main ()
11336{
11337void *x=link
11338 ;
11339 return 0;
11340}
11341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011345
Matthias Kloseb159a552010-04-25 21:00:44 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011347$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011348else
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011351
11352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11355$as_echo_n "checking for symlink... " >&6; }
11356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011357/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011358#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011359int
11360main ()
11361{
11362void *x=symlink
11363 ;
11364 return 0;
11365}
11366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011368
Matthias Kloseb9621712010-04-24 17:59:49 +000011369$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011370
Matthias Kloseb159a552010-04-25 21:00:44 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011372$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011373else
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11375$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011376
11377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11380$as_echo_n "checking for fchdir... " >&6; }
11381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011382/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011383#include <unistd.h>
11384int
11385main ()
11386{
11387void *x=fchdir
11388 ;
11389 return 0;
11390}
11391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011393
Matthias Kloseb9621712010-04-24 17:59:49 +000011394$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011395
Matthias Kloseb159a552010-04-25 21:00:44 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011397$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011398else
Matthias Kloseb9621712010-04-24 17:59:49 +000011399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11400$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011401
11402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11405$as_echo_n "checking for fsync... " >&6; }
11406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011407/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011408#include <unistd.h>
11409int
11410main ()
11411{
11412void *x=fsync
11413 ;
11414 return 0;
11415}
11416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011418
Matthias Kloseb9621712010-04-24 17:59:49 +000011419$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011420
Matthias Kloseb159a552010-04-25 21:00:44 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011422$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011423else
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11425$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011426
11427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11430$as_echo_n "checking for fdatasync... " >&6; }
11431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011432/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011433#include <unistd.h>
11434int
11435main ()
11436{
11437void *x=fdatasync
11438 ;
11439 return 0;
11440}
11441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011443
Matthias Kloseb9621712010-04-24 17:59:49 +000011444$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011445
Matthias Kloseb159a552010-04-25 21:00:44 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011447$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011448else
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11450$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011451
11452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11455$as_echo_n "checking for epoll... " >&6; }
11456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011457/* end confdefs.h. */
11458#include <sys/epoll.h>
11459int
11460main ()
11461{
11462void *x=epoll_create
11463 ;
11464 return 0;
11465}
11466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011470
Matthias Kloseb159a552010-04-25 21:00:44 +000011471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011472$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011473else
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11475$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011476
11477fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11480$as_echo_n "checking for epoll_create1... " >&6; }
11481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11482/* end confdefs.h. */
11483#include <sys/epoll.h>
11484int
11485main ()
11486{
11487void *x=epoll_create1
11488 ;
11489 return 0;
11490}
11491_ACEOF
11492if ac_fn_c_try_compile "$LINENO"; then :
11493
11494$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11495
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11497$as_echo "yes" >&6; }
11498else
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
11501
11502fi
11503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11505$as_echo_n "checking for kqueue... " >&6; }
11506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011507/* end confdefs.h. */
11508
11509#include <sys/types.h>
11510#include <sys/event.h>
11511
11512int
11513main ()
11514{
11515int x=kqueue()
11516 ;
11517 return 0;
11518}
11519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011520if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011523
Matthias Kloseb159a552010-04-25 21:00:44 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011525$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011526else
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011529
11530fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11533$as_echo_n "checking for prlimit... " >&6; }
11534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11535/* end confdefs.h. */
11536
11537#include <sys/time.h>
11538#include <sys/resource.h>
11539
11540int
11541main ()
11542{
11543void *x=prlimit
11544 ;
11545 return 0;
11546}
11547_ACEOF
11548if ac_fn_c_try_compile "$LINENO"; then :
11549
11550$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11551
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11553$as_echo "yes" >&6; }
11554else
11555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11556$as_echo "no" >&6; }
11557
11558fi
11559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11560
Martin v. Löwisd5843682002-11-21 20:41:28 +000011561# On some systems (eg. FreeBSD 5), we would find a definition of the
11562# functions ctermid_r, setgroups in the library, but no prototype
11563# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11564# address to avoid compiler warnings and potential miscompilations
11565# because of the missing prototypes.
11566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11568$as_echo_n "checking for ctermid_r... " >&6; }
11569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011570/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011571
Martin v. Löwisd5843682002-11-21 20:41:28 +000011572#include <stdio.h>
11573
Martin v. Löwisd5843682002-11-21 20:41:28 +000011574int
11575main ()
11576{
11577void* p = ctermid_r
11578 ;
11579 return 0;
11580}
11581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011583
Matthias Kloseb9621712010-04-24 17:59:49 +000011584$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011585
Matthias Kloseb159a552010-04-25 21:00:44 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011587$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011588else
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11590$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011591
11592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11594
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11596$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011597if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011598 $as_echo_n "(cached) " >&6
11599else
11600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011601/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011602#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011603int
11604main ()
11605{
11606void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011607
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011608 ;
11609 return 0;
11610}
11611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011612if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011613 ac_cv_flock_decl=yes
11614else
11615 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011616
11617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011619
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011620fi
11621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11622$as_echo "$ac_cv_flock_decl" >&6; }
11623if test "x${ac_cv_flock_decl}" = xyes; then
11624 for ac_func in flock
11625do :
11626 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011627if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011628 cat >>confdefs.h <<_ACEOF
11629#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011630_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011631
Antoine Pitroua3000072010-09-07 14:52:42 +000011632else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011634$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011635if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011636 $as_echo_n "(cached) " >&6
11637else
11638 ac_check_lib_save_LIBS=$LIBS
11639LIBS="-lbsd $LIBS"
11640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11641/* end confdefs.h. */
11642
11643/* Override any GCC internal prototype to avoid an error.
11644 Use char because int might match the return type of a GCC
11645 builtin and then its argument prototype would still apply. */
11646#ifdef __cplusplus
11647extern "C"
11648#endif
11649char flock ();
11650int
11651main ()
11652{
11653return flock ();
11654 ;
11655 return 0;
11656}
11657_ACEOF
11658if ac_fn_c_try_link "$LINENO"; then :
11659 ac_cv_lib_bsd_flock=yes
11660else
11661 ac_cv_lib_bsd_flock=no
11662fi
11663rm -f core conftest.err conftest.$ac_objext \
11664 conftest$ac_exeext conftest.$ac_ext
11665LIBS=$ac_check_lib_save_LIBS
11666fi
11667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11668$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011669if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011670 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011671
11672
11673$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11674
11675
11676fi
11677
11678
11679fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011680done
11681
Antoine Pitroua3000072010-09-07 14:52:42 +000011682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11685$as_echo_n "checking for getpagesize... " >&6; }
11686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011687/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011688
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011689#include <unistd.h>
11690
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011691int
11692main ()
11693{
11694void* p = getpagesize
11695 ;
11696 return 0;
11697}
11698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011699if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011702
Matthias Kloseb159a552010-04-25 21:00:44 +000011703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11707$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011708
11709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011711
Victor Stinner984890f2011-11-24 13:53:38 +010011712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11713$as_echo_n "checking for broken unsetenv... " >&6; }
11714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11715/* end confdefs.h. */
11716
11717#include <stdlib.h>
11718
11719int
11720main ()
11721{
11722int res = unsetenv("DUMMY")
11723 ;
11724 return 0;
11725}
11726_ACEOF
11727if ac_fn_c_try_compile "$LINENO"; then :
11728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11729$as_echo "no" >&6; }
11730else
11731
11732$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11733
11734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11735$as_echo "yes" >&6; }
11736
11737fi
11738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11739
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011740for ac_prog in true
11741do
11742 # Extract the first word of "$ac_prog", so it can be a program name with args.
11743set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011746if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011748else
11749 if test -n "$TRUE"; then
11750 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11751else
11752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11753for as_dir in $PATH
11754do
11755 IFS=$as_save_IFS
11756 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011759 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 $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 +000011761 break 2
11762 fi
11763done
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011765IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011766
11767fi
11768fi
11769TRUE=$ac_cv_prog_TRUE
11770if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11772$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11775$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011776fi
11777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011778
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011779 test -n "$TRUE" && break
11780done
11781test -n "$TRUE" || TRUE="/bin/true"
11782
11783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11785$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011786if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788else
11789 ac_check_lib_save_LIBS=$LIBS
11790LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011792/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794/* Override any GCC internal prototype to avoid an error.
11795 Use char because int might match the return type of a GCC
11796 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797#ifdef __cplusplus
11798extern "C"
11799#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801int
11802main ()
11803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011804return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011810 ac_cv_lib_c_inet_aton=yes
11811else
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011814rm -f core conftest.err conftest.$ac_objext \
11815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011816LIBS=$ac_check_lib_save_LIBS
11817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11819$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011820if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011821 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11824$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011825if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011826 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011827else
11828 ac_check_lib_save_LIBS=$LIBS
11829LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011831/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011833/* Override any GCC internal prototype to avoid an error.
11834 Use char because int might match the return type of a GCC
11835 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836#ifdef __cplusplus
11837extern "C"
11838#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011839char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840int
11841main ()
11842{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844 ;
11845 return 0;
11846}
11847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011849 ac_cv_lib_resolv_inet_aton=yes
11850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011853rm -f core conftest.err conftest.$ac_objext \
11854 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011855LIBS=$ac_check_lib_save_LIBS
11856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11858$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011859if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011860 cat >>confdefs.h <<_ACEOF
11861#define HAVE_LIBRESOLV 1
11862_ACEOF
11863
11864 LIBS="-lresolv $LIBS"
11865
11866fi
11867
11868
11869fi
11870
11871
Christian Heimesd0764e22007-12-04 15:00:33 +000011872# On Tru64, chflags seems to be present, but calling it will
11873# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11875$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011876if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011880 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011883/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011884
Christian Heimesd0764e22007-12-04 15:00:33 +000011885#include <sys/stat.h>
11886#include <unistd.h>
11887int main(int argc, char*argv[])
11888{
11889 if(chflags(argv[0], 0) != 0)
11890 return 1;
11891 return 0;
11892}
Ned Deily3eb67d52011-06-28 00:00:28 -070011893
Christian Heimesd0764e22007-12-04 15:00:33 +000011894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011895if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011896 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011897else
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011902fi
11903
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011904
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11907$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011908if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011910if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011911 ac_cv_have_chflags="yes"
11912else
11913 ac_cv_have_chflags="no"
11914fi
11915
11916fi
11917if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011918
Matthias Kloseb9621712010-04-24 17:59:49 +000011919$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011920
11921fi
11922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11924$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011925if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011927else
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011929 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011930else
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011932/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011933
Christian Heimesd0764e22007-12-04 15:00:33 +000011934#include <sys/stat.h>
11935#include <unistd.h>
11936int main(int argc, char*argv[])
11937{
11938 if(lchflags(argv[0], 0) != 0)
11939 return 1;
11940 return 0;
11941}
Ned Deily3eb67d52011-06-28 00:00:28 -070011942
Christian Heimesd0764e22007-12-04 15:00:33 +000011943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011945 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11950 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011951fi
11952
11953
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11956$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011957if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011959if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011960 ac_cv_have_lchflags="yes"
11961else
11962 ac_cv_have_lchflags="no"
11963fi
11964
11965fi
11966if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011967
Matthias Kloseb9621712010-04-24 17:59:49 +000011968$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011969
11970fi
11971
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011972case $ac_sys_system/$ac_sys_release in
11973Darwin/*)
11974 _CUR_CFLAGS="${CFLAGS}"
11975 _CUR_LDFLAGS="${LDFLAGS}"
11976 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11977 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11978 ;;
11979esac
11980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11982$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011983if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011984 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011985else
11986 ac_check_lib_save_LIBS=$LIBS
11987LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011989/* end confdefs.h. */
11990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991/* Override any GCC internal prototype to avoid an error.
11992 Use char because int might match the return type of a GCC
11993 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011994#ifdef __cplusplus
11995extern "C"
11996#endif
11997char inflateCopy ();
11998int
11999main ()
12000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012001return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012002 ;
12003 return 0;
12004}
12005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012006if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012007 ac_cv_lib_z_inflateCopy=yes
12008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012011rm -f core conftest.err conftest.$ac_objext \
12012 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012013LIBS=$ac_check_lib_save_LIBS
12014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12016$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012017if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012018
Matthias Kloseb9621712010-04-24 17:59:49 +000012019$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012020
12021fi
12022
12023
12024case $ac_sys_system/$ac_sys_release in
12025Darwin/*)
12026 CFLAGS="${_CUR_CFLAGS}"
12027 LDFLAGS="${_CUR_LDFLAGS}"
12028 ;;
12029esac
12030
Matthias Kloseb9621712010-04-24 17:59:49 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12032$as_echo_n "checking for hstrerror... " >&6; }
12033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012034/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012035
Martin v. Löwise9416172003-05-03 10:12:45 +000012036#include <netdb.h>
12037
Martin v. Löwise9416172003-05-03 10:12:45 +000012038int
12039main ()
12040{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012041void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012042 ;
12043 return 0;
12044}
12045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012049
Matthias Kloseb159a552010-04-25 21:00:44 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012052else
Matthias Kloseb9621712010-04-24 17:59:49 +000012053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012055
12056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012057rm -f core conftest.err conftest.$ac_objext \
12058 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12061$as_echo_n "checking for inet_aton... " >&6; }
12062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012064
Martin v. Löwis86d66262006-02-17 08:40:11 +000012065#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012066#include <sys/socket.h>
12067#include <netinet/in.h>
12068#include <arpa/inet.h>
12069
Martin v. Löwise9416172003-05-03 10:12:45 +000012070int
12071main ()
12072{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012073void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012074 ;
12075 return 0;
12076}
12077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012081
Matthias Kloseb159a552010-04-25 21:00:44 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12086$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012087
12088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012089rm -f core conftest.err conftest.$ac_objext \
12090 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12093$as_echo_n "checking for inet_pton... " >&6; }
12094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012095/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012096
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012097#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012098#include <sys/socket.h>
12099#include <netinet/in.h>
12100#include <arpa/inet.h>
12101
Martin v. Löwise9416172003-05-03 10:12:45 +000012102int
12103main ()
12104{
12105void* p = inet_pton
12106 ;
12107 return 0;
12108}
12109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012113
Matthias Kloseb159a552010-04-25 21:00:44 +000012114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012115$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12118$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012119
12120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012122
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012123# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12125$as_echo_n "checking for setgroups... " >&6; }
12126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012127/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012128
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012129#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012130#ifdef HAVE_GRP_H
12131#include <grp.h>
12132#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012133
Martin v. Löwisd5843682002-11-21 20:41:28 +000012134int
12135main ()
12136{
12137void* p = setgroups
12138 ;
12139 return 0;
12140}
12141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012142if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012145
Matthias Kloseb159a552010-04-25 21:00:44 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012147$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12150$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012151
12152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012154
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012155# check for openpty and forkpty
12156
12157for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012158do :
12159 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012160if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012163_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012164
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12167$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012168if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012170else
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012172LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176/* Override any GCC internal prototype to avoid an error.
12177 Use char because int might match the return type of a GCC
12178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012179#ifdef __cplusplus
12180extern "C"
12181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012182char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012183int
12184main ()
12185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 ;
12188 return 0;
12189}
12190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012196rm -f core conftest.err conftest.$ac_objext \
12197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012198LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12201$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012202if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012204 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012205else
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12207$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012208if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012210else
12211 ac_check_lib_save_LIBS=$LIBS
12212LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012214/* end confdefs.h. */
12215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216/* Override any GCC internal prototype to avoid an error.
12217 Use char because int might match the return type of a GCC
12218 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012219#ifdef __cplusplus
12220extern "C"
12221#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012222char openpty ();
12223int
12224main ()
12225{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227 ;
12228 return 0;
12229}
12230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012231if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012232 ac_cv_lib_bsd_openpty=yes
12233else
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012236rm -f core conftest.err conftest.$ac_objext \
12237 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012238LIBS=$ac_check_lib_save_LIBS
12239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12241$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012242if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012244 LIBS="$LIBS -lbsd"
12245fi
12246
12247
12248fi
12249
Fred Drake8cef4cf2000-06-28 16:40:38 +000012250
12251fi
12252done
12253
12254for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012255do :
12256 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012257if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012258 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012259#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012260_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012261
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262else
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12264$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012265if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012267else
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012269LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273/* Override any GCC internal prototype to avoid an error.
12274 Use char because int might match the return type of a GCC
12275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012276#ifdef __cplusplus
12277extern "C"
12278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012279char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012280int
12281main ()
12282{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012284 ;
12285 return 0;
12286}
12287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012288if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012290else
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012293rm -f core conftest.err conftest.$ac_objext \
12294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012295LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12298$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012299if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012301 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12304$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012305if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012307else
12308 ac_check_lib_save_LIBS=$LIBS
12309LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012311/* end confdefs.h. */
12312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313/* Override any GCC internal prototype to avoid an error.
12314 Use char because int might match the return type of a GCC
12315 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012316#ifdef __cplusplus
12317extern "C"
12318#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012319char forkpty ();
12320int
12321main ()
12322{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012324 ;
12325 return 0;
12326}
12327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012329 ac_cv_lib_bsd_forkpty=yes
12330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012333rm -f core conftest.err conftest.$ac_objext \
12334 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012335LIBS=$ac_check_lib_save_LIBS
12336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12338$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012339if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012341 LIBS="$LIBS -lbsd"
12342fi
12343
12344
12345fi
12346
Fred Drake8cef4cf2000-06-28 16:40:38 +000012347
12348fi
12349done
12350
Jack Jansendd19cf82001-12-06 22:36:17 +000012351
Christian Heimesb186d002008-03-18 15:15:01 +000012352# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012353for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012354do :
12355 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012356if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012357 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012359_ACEOF
12360
12361fi
12362done
12363
12364
Michael W. Hudson54241132001-12-07 15:38:26 +000012365# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012366for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012367do :
12368 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12369ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012370if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012372#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012373_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012374
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012375fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012376done
12377
Michael W. Hudson54241132001-12-07 15:38:26 +000012378
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012379ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012380if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012381 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012382
Martin v. Löwis1142de32002-03-29 16:28:31 +000012383else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012385 *" dup2.$ac_objext "* ) ;;
12386 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012387 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012388esac
12389
Martin v. Löwis1142de32002-03-29 16:28:31 +000012390fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012391
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012392ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012393if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012394 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12395
12396else
12397 case " $LIBOBJS " in
12398 *" strdup.$ac_objext "* ) ;;
12399 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12400 ;;
12401esac
12402
12403fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012404
12405
12406for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012407do :
12408 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012409if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012416int
12417main ()
12418{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 ;
12421 return 0;
12422}
12423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Matthias Kloseb9621712010-04-24 17:59:49 +000012426$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012427
Guido van Rossum627b2d71993-12-24 10:39:16 +000012428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012430
Guido van Rossum627b2d71993-12-24 10:39:16 +000012431fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012432done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012433
Jack Jansen150753c2003-03-29 22:07:47 +000012434for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012435do :
12436 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012437if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012438 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012443#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012444int
12445main ()
12446{
12447setpgrp(0,0);
12448 ;
12449 return 0;
12450}
12451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012455
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012458
12459fi
12460done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012461
Thomas Wouters3a584202000-08-05 23:28:51 +000012462for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012463do :
12464 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012465if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012470/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012471#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012472int
12473main ()
12474{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_compile "$LINENO"; then :
12481
Guido van Rossum627b2d71993-12-24 10:39:16 +000012482else
Skip Montanaro6dead952003-09-25 14:50:04 +000012483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012485
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Guido van Rossum627b2d71993-12-24 10:39:16 +000012487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012489
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012490fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012491done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492
Michael W. Hudson54241132001-12-07 15:38:26 +000012493
Victor Stinnere0be4232011-10-25 13:06:09 +020012494for ac_func in clock_gettime
12495do :
12496 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12497if test "x$ac_cv_func_clock_gettime" = xyes; then :
12498 cat >>confdefs.h <<_ACEOF
12499#define HAVE_CLOCK_GETTIME 1
12500_ACEOF
12501
12502else
12503
12504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12505$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12506if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12507 $as_echo_n "(cached) " >&6
12508else
12509 ac_check_lib_save_LIBS=$LIBS
12510LIBS="-lrt $LIBS"
12511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512/* end confdefs.h. */
12513
12514/* Override any GCC internal prototype to avoid an error.
12515 Use char because int might match the return type of a GCC
12516 builtin and then its argument prototype would still apply. */
12517#ifdef __cplusplus
12518extern "C"
12519#endif
12520char clock_gettime ();
12521int
12522main ()
12523{
12524return clock_gettime ();
12525 ;
12526 return 0;
12527}
12528_ACEOF
12529if ac_fn_c_try_link "$LINENO"; then :
12530 ac_cv_lib_rt_clock_gettime=yes
12531else
12532 ac_cv_lib_rt_clock_gettime=no
12533fi
12534rm -f core conftest.err conftest.$ac_objext \
12535 conftest$ac_exeext conftest.$ac_ext
12536LIBS=$ac_check_lib_save_LIBS
12537fi
12538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12539$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12540if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12541
Victor Stinner7efb8332014-08-29 15:41:08 +020012542 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012543 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12544
12545
12546$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12547
12548
12549fi
12550
12551
12552fi
12553done
12554
12555
12556for ac_func in clock_getres
12557do :
12558 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12559if test "x$ac_cv_func_clock_getres" = xyes; then :
12560 cat >>confdefs.h <<_ACEOF
12561#define HAVE_CLOCK_GETRES 1
12562_ACEOF
12563
12564else
12565
12566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12567$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12568if ${ac_cv_lib_rt_clock_getres+:} false; then :
12569 $as_echo_n "(cached) " >&6
12570else
12571 ac_check_lib_save_LIBS=$LIBS
12572LIBS="-lrt $LIBS"
12573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574/* end confdefs.h. */
12575
12576/* Override any GCC internal prototype to avoid an error.
12577 Use char because int might match the return type of a GCC
12578 builtin and then its argument prototype would still apply. */
12579#ifdef __cplusplus
12580extern "C"
12581#endif
12582char clock_getres ();
12583int
12584main ()
12585{
12586return clock_getres ();
12587 ;
12588 return 0;
12589}
12590_ACEOF
12591if ac_fn_c_try_link "$LINENO"; then :
12592 ac_cv_lib_rt_clock_getres=yes
12593else
12594 ac_cv_lib_rt_clock_getres=no
12595fi
12596rm -f core conftest.err conftest.$ac_objext \
12597 conftest$ac_exeext conftest.$ac_ext
12598LIBS=$ac_check_lib_save_LIBS
12599fi
12600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12601$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12602if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12603
12604 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12605
12606
12607fi
12608
12609
12610fi
12611done
12612
12613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12615$as_echo_n "checking for major... " >&6; }
12616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012617/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012618
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012619#if defined(MAJOR_IN_MKDEV)
12620#include <sys/mkdev.h>
12621#elif defined(MAJOR_IN_SYSMACROS)
12622#include <sys/sysmacros.h>
12623#else
12624#include <sys/types.h>
12625#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012626
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012627int
12628main ()
12629{
12630
12631 makedev(major(0),minor(0));
12632
12633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012638
12639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012641
Matthias Kloseb9621712010-04-24 17:59:49 +000012642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12643$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012644
12645else
Skip Montanaro6dead952003-09-25 14:50:04 +000012646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12648$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012649
12650fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012651rm -f core conftest.err conftest.$ac_objext \
12652 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012653
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012654# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012655# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12657$as_echo_n "checking for getaddrinfo... " >&6; }
12658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012660
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012661#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012662#include <sys/socket.h>
12663#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012664#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012665
Martin v. Löwis11437992002-04-12 09:54:03 +000012666int
12667main ()
12668{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012669getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012674if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012675 have_getaddrinfo=yes
12676else
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012679rm -f core conftest.err conftest.$ac_objext \
12680 conftest$ac_exeext conftest.$ac_ext
12681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12682$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012683if test $have_getaddrinfo = yes
12684then
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12686$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012687 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012688 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012689else
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012691
12692if test "${enable_ipv6+set}" = set; then
12693 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12694else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012695 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012696fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012697else
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012699/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012700
Stefan Krah19c21392012-11-22 23:47:32 +010012701#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012702#include <sys/types.h>
12703#include <netdb.h>
12704#include <string.h>
12705#include <sys/socket.h>
12706#include <netinet/in.h>
12707
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012708int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012709{
12710 int passive, gaierr, inet4 = 0, inet6 = 0;
12711 struct addrinfo hints, *ai, *aitop;
12712 char straddr[INET6_ADDRSTRLEN], strport[16];
12713
12714 for (passive = 0; passive <= 1; passive++) {
12715 memset(&hints, 0, sizeof(hints));
12716 hints.ai_family = AF_UNSPEC;
12717 hints.ai_flags = passive ? AI_PASSIVE : 0;
12718 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012719 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012720 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12721 (void)gai_strerror(gaierr);
12722 goto bad;
12723 }
12724 for (ai = aitop; ai; ai = ai->ai_next) {
12725 if (ai->ai_addr == NULL ||
12726 ai->ai_addrlen == 0 ||
12727 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12728 straddr, sizeof(straddr), strport, sizeof(strport),
12729 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12730 goto bad;
12731 }
12732 switch (ai->ai_family) {
12733 case AF_INET:
12734 if (strcmp(strport, "54321") != 0) {
12735 goto bad;
12736 }
12737 if (passive) {
12738 if (strcmp(straddr, "0.0.0.0") != 0) {
12739 goto bad;
12740 }
12741 } else {
12742 if (strcmp(straddr, "127.0.0.1") != 0) {
12743 goto bad;
12744 }
12745 }
12746 inet4++;
12747 break;
12748 case AF_INET6:
12749 if (strcmp(strport, "54321") != 0) {
12750 goto bad;
12751 }
12752 if (passive) {
12753 if (strcmp(straddr, "::") != 0) {
12754 goto bad;
12755 }
12756 } else {
12757 if (strcmp(straddr, "::1") != 0) {
12758 goto bad;
12759 }
12760 }
12761 inet6++;
12762 break;
12763 case AF_UNSPEC:
12764 goto bad;
12765 break;
12766 default:
12767 /* another family support? */
12768 break;
12769 }
12770 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012771 freeaddrinfo(aitop);
12772 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012773 }
12774
12775 if (!(inet4 == 0 || inet4 == 2))
12776 goto bad;
12777 if (!(inet6 == 0 || inet6 == 2))
12778 goto bad;
12779
12780 if (aitop)
12781 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012782 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012783
12784 bad:
12785 if (aitop)
12786 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012787 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788}
12789
Martin v. Löwis11437992002-04-12 09:54:03 +000012790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012791if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012792 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793else
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012800fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012801
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12805$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12806
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012807if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012808then
12809 if test $ipv6 = yes
12810 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012811 echo 'Fatal: You must get working getaddrinfo() function.'
12812 echo ' or you can specify "--disable-ipv6"'.
12813 exit 1
12814 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012815else
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
Matthias Kloseb9621712010-04-24 17:59:49 +000012817$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012818
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012819fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012820
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012821for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012822do :
12823 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012824if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012826#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012827_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012828
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012829fi
12830done
12831
Michael W. Hudson54241132001-12-07 15:38:26 +000012832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12835$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012836if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012840/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012841#include <sys/types.h>
12842#include <sys/time.h>
12843#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012844
Martin v. Löwis11437992002-04-12 09:54:03 +000012845int
12846main ()
12847{
12848if ((struct tm *) 0)
12849return 0;
12850 ;
12851 return 0;
12852}
12853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012854if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012855 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012856else
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12862$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012863if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012866
12867fi
12868
Matthias Kloseb9621712010-04-24 17:59:49 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12870$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012871if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873else
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012875/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876#include <sys/types.h>
12877#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012878
Martin v. Löwis11437992002-04-12 09:54:03 +000012879int
12880main ()
12881{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882struct tm tm;
12883 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 ;
12886 return 0;
12887}
12888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012889if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012890 ac_cv_struct_tm=time.h
12891else
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12897$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012898if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901
12902fi
12903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904ac_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 +000012905#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012906
Matthias Kloseb9621712010-04-24 17:59:49 +000012907"
Victor Stinnere0be4232011-10-25 13:06:09 +020012908if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
12910cat >>confdefs.h <<_ACEOF
12911#define HAVE_STRUCT_TM_TM_ZONE 1
12912_ACEOF
12913
12914
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012915fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012916
Martin v. Löwis11437992002-04-12 09:54:03 +000012917if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012920
12921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12923"
Victor Stinnere0be4232011-10-25 13:06:09 +020012924if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926else
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928fi
12929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012931#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932_ACEOF
12933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12935$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012936if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938else
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 Rossum627b2d71993-12-24 10:39:16 +000012941#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942#if !HAVE_DECL_TZNAME
12943extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012945
Martin v. Löwis11437992002-04-12 09:54:03 +000012946int
12947main ()
12948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 ;
12951 return 0;
12952}
12953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012954if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012955 ac_cv_var_tzname=yes
12956else
Matthias Kloseb9621712010-04-24 17:59:49 +000012957 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012959rm -f core conftest.err conftest.$ac_objext \
12960 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12963$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012964 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012968 fi
12969fi
12970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971ac_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 +020012972if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
12974cat >>confdefs.h <<_ACEOF
12975#define HAVE_STRUCT_STAT_ST_RDEV 1
12976_ACEOF
12977
12978
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012979fi
12980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981ac_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 +020012982if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012983
Martin v. Löwis11437992002-04-12 09:54:03 +000012984cat >>confdefs.h <<_ACEOF
12985#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12986_ACEOF
12987
12988
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012989fi
12990
Matthias Kloseb9621712010-04-24 17:59:49 +000012991ac_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 +020012992if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012993
12994cat >>confdefs.h <<_ACEOF
12995#define HAVE_STRUCT_STAT_ST_FLAGS 1
12996_ACEOF
12997
12998
12999fi
13000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001ac_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 +020013002if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013003
13004cat >>confdefs.h <<_ACEOF
13005#define HAVE_STRUCT_STAT_ST_GEN 1
13006_ACEOF
13007
13008
13009fi
13010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011ac_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 +020013012if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013013
13014cat >>confdefs.h <<_ACEOF
13015#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13016_ACEOF
13017
13018
13019fi
13020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021ac_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 +020013022if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013023
Martin v. Löwis11437992002-04-12 09:54:03 +000013024cat >>confdefs.h <<_ACEOF
13025#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13026_ACEOF
13027
13028
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013029fi
13030
Michael W. Hudson54241132001-12-07 15:38:26 +000013031
Matthias Kloseb9621712010-04-24 17:59:49 +000013032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13033$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013034if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013036else
Matthias Kloseb159a552010-04-25 21:00:44 +000013037
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013039/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013040#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013041int
13042main ()
13043{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ;
13046 return 0;
13047}
13048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013049if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013050 ac_cv_header_time_altzone=yes
13051else
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056fi
13057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13059$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013060if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013063
13064fi
13065
Guido van Rossumda88dad1995-01-26 00:46:29 +000013066was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13068$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013071
13072#include <sys/types.h>
13073#include <sys/select.h>
13074#include <sys/time.h>
13075
Martin v. Löwis11437992002-04-12 09:54:03 +000013076int
13077main ()
13078{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013079;
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 ;
13081 return 0;
13082}
13083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013085
13086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013088
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013089 was_it_defined=yes
13090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13094$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13097$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013098if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013102/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013103#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013104int
13105main ()
13106{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013107struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 ;
13109 return 0;
13110}
13111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013112if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013113 ac_cv_struct_addrinfo=yes
13114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13118fi
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13121$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013122if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013123
Matthias Kloseb9621712010-04-24 17:59:49 +000013124$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013125
13126fi
13127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13129$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013130if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013132else
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013134/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135
13136# include <sys/types.h>
13137# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013138int
13139main ()
13140{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013141struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 ;
13143 return 0;
13144}
13145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147 ac_cv_struct_sockaddr_storage=yes
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13152fi
13153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13155$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013156if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159
13160fi
13161
Guido van Rossum627b2d71993-12-24 10:39:16 +000013162# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13165$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013166if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013168else
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013171$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013172int
13173main ()
13174{
13175static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013176test_array [0] = 0;
13177return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013178
13179 ;
13180 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013181}
Martin v. Löwis11437992002-04-12 09:54:03 +000013182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013183if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013184 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013185else
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13191$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013192if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013194
13195fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013196
Matthias Kloseb9621712010-04-24 17:59:49 +000013197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13198$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013199if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013201else
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013203/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013204
Martin v. Löwis11437992002-04-12 09:54:03 +000013205int
13206main ()
13207{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013208
Martin v. Löwis11437992002-04-12 09:54:03 +000013209#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013210 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013212 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214 char const *const *pcpcc;
13215 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013216 /* NEC SVR4.0.2 mips cc rejects this. */
13217 struct point {int x, y;};
13218 static struct point const zero = {0,0};
13219 /* AIX XL C 1.02.0.0 rejects this.
13220 It does not let you subtract one const X* pointer from another in
13221 an arm of an if-expression whose if-part is not a constant
13222 expression */
13223 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226 ++pcpcc;
13227 ppc = (char**) pcpcc;
13228 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013229 { /* SCO 3.2v4 cc rejects this sort of thing. */
13230 char tx;
13231 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013235 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 }
13237 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13238 int x[] = {25, 17};
13239 const int *foo = &x[0];
13240 ++foo;
13241 }
13242 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13243 typedef const int *iptr;
13244 iptr p = 0;
13245 ++p;
13246 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013247 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013248 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013249 struct s { int j; const int *ap[3]; } bx;
13250 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013251 }
13252 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13253 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013254 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013257#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013258
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 ;
13260 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013261}
Martin v. Löwis11437992002-04-12 09:54:03 +000013262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013263if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264 ac_cv_c_const=yes
13265else
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13271$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013275
13276fi
13277
Michael W. Hudson54241132001-12-07 15:38:26 +000013278
Guido van Rossumda88dad1995-01-26 00:46:29 +000013279works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13281$as_echo_n "checking for working volatile... " >&6; }
13282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013283/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013284
Martin v. Löwis11437992002-04-12 09:54:03 +000013285int
13286main ()
13287{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 ;
13290 return 0;
13291}
13292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013293if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013294 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013295else
Skip Montanaro6dead952003-09-25 14:50:04 +000013296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013298
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013299
Guido van Rossum627b2d71993-12-24 10:39:16 +000013300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13303$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013304
Guido van Rossumda88dad1995-01-26 00:46:29 +000013305works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13307$as_echo_n "checking for working signed char... " >&6; }
13308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013309/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013310
Martin v. Löwis11437992002-04-12 09:54:03 +000013311int
13312main ()
13313{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013314signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 ;
13316 return 0;
13317}
13318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013319if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013320 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013321else
Skip Montanaro6dead952003-09-25 14:50:04 +000013322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013324
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013325
Guido van Rossum7f43da71994-08-01 12:15:30 +000013326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13329$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013330
Guido van Rossumda88dad1995-01-26 00:46:29 +000013331have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13333$as_echo_n "checking for prototypes... " >&6; }
13334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013335/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013336int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013337int
13338main ()
13339{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 ;
13342 return 0;
13343}
13344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
Matthias Kloseb159a552010-04-25 21:00:44 +000013349 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13353$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354
Guido van Rossumda88dad1995-01-26 00:46:29 +000013355works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13357$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013359/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013360
13361#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013362int foo(int x, ...) {
13363 va_list va;
13364 va_start(va, x);
13365 va_arg(va, int);
13366 va_arg(va, char *);
13367 va_arg(va, double);
13368 return 0;
13369}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013370
Martin v. Löwis11437992002-04-12 09:54:03 +000013371int
13372main ()
13373{
Guido van Rossum90eea071996-08-30 20:58:57 +000013374return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 ;
13376 return 0;
13377}
13378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
13381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013384 works=yes
13385
Guido van Rossum627b2d71993-12-24 10:39:16 +000013386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13389$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390
Martin v. Löwisd6320502004-08-12 13:45:08 +000013391# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13393$as_echo_n "checking for socketpair... " >&6; }
13394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013395/* end confdefs.h. */
13396
13397#include <sys/types.h>
13398#include <sys/socket.h>
13399
13400int
13401main ()
13402{
13403void *x=socketpair
13404 ;
13405 return 0;
13406}
13407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013411
Matthias Kloseb159a552010-04-25 21:00:44 +000013412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013413$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013414else
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13416$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013417
13418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013420
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013421# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13423$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013425/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013426#include <sys/types.h>
13427#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013428int
13429main ()
13430{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013431struct sockaddr x;
13432x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 ;
13434 return 0;
13435}
13436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013437if ac_fn_c_try_compile "$LINENO"; then :
13438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13439$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013442
13443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13445$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013446
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013449
Guido van Rossumda88dad1995-01-26 00:46:29 +000013450va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13452$as_echo_n "checking whether va_list is an array... " >&6; }
13453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013454/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455
13456#ifdef HAVE_STDARG_PROTOTYPES
13457#include <stdarg.h>
13458#else
13459#include <varargs.h>
13460#endif
13461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462int
13463main ()
13464{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if ac_fn_c_try_compile "$LINENO"; then :
13471
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013472else
Skip Montanaro6dead952003-09-25 14:50:04 +000013473
Martin v. Löwis11437992002-04-12 09:54:03 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
Guido van Rossumda88dad1995-01-26 00:46:29 +000013477 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013478
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13482$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013484# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
13486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013488if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13493$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013494 OLD_CFLAGS=$CFLAGS
13495 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013498
13499# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501int
13502main ()
13503{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013504
13505 char *name;
13506 struct hostent *he, *res;
13507 char buffer[2048];
13508 int buflen = 2048;
13509 int h_errnop;
13510
13511 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013512
13513 ;
13514 return 0;
13515}
13516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013520
Martin v. Löwis11437992002-04-12 09:54:03 +000013521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13525$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013527else
Skip Montanaro6dead952003-09-25 14:50:04 +000013528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13530$as_echo "no" >&6; }
13531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13532$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013534/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013536# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013537
Martin v. Löwis11437992002-04-12 09:54:03 +000013538int
13539main ()
13540{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013541
13542 char *name;
13543 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013544 char buffer[2048];
13545 int buflen = 2048;
13546 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013547
Matthias Kloseb159a552010-04-25 21:00:44 +000013548 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
13550 ;
13551 return 0;
13552}
13553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
Matthias Kloseb159a552010-04-25 21:00:44 +000013559$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13562$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013564else
Skip Montanaro6dead952003-09-25 14:50:04 +000013565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13567$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13569$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13571/* end confdefs.h. */
13572
13573# include <netdb.h>
13574
13575int
13576main ()
13577{
13578
13579 char *name;
13580 struct hostent *he;
13581 struct hostent_data data;
13582
13583 (void) gethostbyname_r(name, he, &data);
13584
13585 ;
13586 return 0;
13587}
13588_ACEOF
13589if ac_fn_c_try_compile "$LINENO"; then :
13590
13591 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13592
13593
13594$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13595
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13597$as_echo "yes" >&6; }
13598
13599else
13600
13601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13602$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013612 CFLAGS=$OLD_CFLAGS
13613
13614else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 for ac_func in gethostbyname
13617do :
13618 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013619if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013621#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013622_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013623
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013624fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013625done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013626
Michael W. Hudson54241132001-12-07 15:38:26 +000013627
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013628fi
13629
Michael W. Hudson54241132001-12-07 15:38:26 +000013630
13631
13632
13633
13634
13635
Guido van Rossum627b2d71993-12-24 10:39:16 +000013636# checks for system services
13637# (none yet)
13638
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013639# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013640ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013641if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013642
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13645$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013646if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013648else
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013650LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654/* Override any GCC internal prototype to avoid an error.
13655 Use char because int might match the return type of a GCC
13656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013657#ifdef __cplusplus
13658extern "C"
13659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013660char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013661int
13662main ()
13663{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ;
13666 return 0;
13667}
13668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013669if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013671else
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013674rm -f core conftest.err conftest.$ac_objext \
13675 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013676LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13679$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013680if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 cat >>confdefs.h <<_ACEOF
13682#define HAVE_LIBIEEE 1
13683_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013684
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013685 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686
Guido van Rossum627b2d71993-12-24 10:39:16 +000013687fi
13688
Michael W. Hudson54241132001-12-07 15:38:26 +000013689
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013690fi
13691
Michael W. Hudson54241132001-12-07 15:38:26 +000013692
Guido van Rossum7f253911997-05-09 02:42:48 +000013693# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13695$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013700if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013701then
13702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13706$as_echo "yes" >&6; }
13707else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13708$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013709fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13712$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013713fi
13714
Guido van Rossum7f253911997-05-09 02:42:48 +000013715
Guido van Rossum7f43da71994-08-01 12:15:30 +000013716# check for --with-libm=...
13717
Guido van Rossum563e7081996-09-10 18:20:48 +000013718case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013719Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013720*) LIBM=-lm
13721esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13723$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013726if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013728if test "$withval" = no
13729then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13731$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013732elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013733then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13735$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013736else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013737fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013738else
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13740$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741fi
13742
Guido van Rossum7f43da71994-08-01 12:15:30 +000013743
13744# check for --with-libc=...
13745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13747$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013750if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013752if test "$withval" = no
13753then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13755$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013756elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013757then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13759$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013760else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013761fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13764$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013765fi
13766
Guido van Rossum7f43da71994-08-01 12:15:30 +000013767
Stefan Krah1919b7e2012-03-21 18:25:23 +010013768# **************************************
13769# * Check for gcc x64 inline assembler *
13770# **************************************
13771
13772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13773$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13775/* end confdefs.h. */
13776
13777int
13778main ()
13779{
13780
13781 __asm__ __volatile__ ("movq %rcx, %rax");
13782
13783 ;
13784 return 0;
13785}
13786_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013787if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013788 have_gcc_asm_for_x64=yes
13789else
13790 have_gcc_asm_for_x64=no
13791fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013792rm -f core conftest.err conftest.$ac_objext \
13793 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13795$as_echo "$have_gcc_asm_for_x64" >&6; }
13796if test "$have_gcc_asm_for_x64" = yes
13797then
13798
13799$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13800
13801fi
13802
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803# **************************************************
13804# * Check for various properties of floating point *
13805# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13808$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013809if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013811else
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013814 ac_cv_little_endian_double=no
13815else
Matthias Kloseb9621712010-04-24 17:59:49 +000013816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013817/* end confdefs.h. */
13818
13819#include <string.h>
13820int main() {
13821 double x = 9006104071832581.0;
13822 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13823 return 0;
13824 else
13825 return 1;
13826}
13827
13828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013829if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013830 ac_cv_little_endian_double=yes
13831else
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013836fi
13837
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013838fi
13839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13841$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013842if test "$ac_cv_little_endian_double" = yes
13843then
13844
Matthias Kloseb9621712010-04-24 17:59:49 +000013845$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013846
13847fi
13848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13850$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013851if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013853else
13854
Matthias Kloseb9621712010-04-24 17:59:49 +000013855if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856 ac_cv_big_endian_double=no
13857else
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013859/* end confdefs.h. */
13860
13861#include <string.h>
13862int main() {
13863 double x = 9006104071832581.0;
13864 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13865 return 0;
13866 else
13867 return 1;
13868}
13869
13870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013872 ac_cv_big_endian_double=yes
13873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013878fi
13879
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013880fi
13881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13883$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013884if test "$ac_cv_big_endian_double" = yes
13885then
13886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013888
13889fi
13890
13891# Some ARM platforms use a mixed-endian representation for doubles.
13892# While Python doesn't currently have full support for these platforms
13893# (see e.g., issue 1762561), we can at least make sure that float <-> string
13894# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13896$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013897if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899else
13900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902 ac_cv_mixed_endian_double=no
13903else
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013905/* end confdefs.h. */
13906
13907#include <string.h>
13908int main() {
13909 double x = 9006104071832581.0;
13910 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13911 return 0;
13912 else
13913 return 1;
13914}
13915
13916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013918 ac_cv_mixed_endian_double=yes
13919else
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924fi
13925
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013926fi
13927
Matthias Kloseb9621712010-04-24 17:59:49 +000013928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13929$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930if test "$ac_cv_mixed_endian_double" = yes
13931then
13932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013934
13935fi
13936
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013937# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013938# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013939# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013940# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013941# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013942# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013943
13944# This inline assembler syntax may also work for suncc and icc,
13945# so we try it on all platforms.
13946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13948$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013950/* end confdefs.h. */
13951
13952int
13953main ()
13954{
13955
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013956 unsigned short cw;
13957 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13958 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959
13960 ;
13961 return 0;
13962}
13963_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013964if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013965 have_gcc_asm_for_x87=yes
13966else
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013969rm -f core conftest.err conftest.$ac_objext \
13970 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13972$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013973if test "$have_gcc_asm_for_x87" = yes
13974then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013977
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13981$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13983/* end confdefs.h. */
13984
13985int
13986main ()
13987{
13988
13989 unsigned int fpcr;
13990 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13991 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13992
13993 ;
13994 return 0;
13995}
13996_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013997if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013998 have_gcc_asm_for_mc68881=yes
13999else
14000 have_gcc_asm_for_mc68881=no
14001fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014002rm -f core conftest.err conftest.$ac_objext \
14003 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14005$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14006if test "$have_gcc_asm_for_mc68881" = yes
14007then
14008
14009$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14010
14011fi
14012
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014013# Detect whether system arithmetic is subject to x87-style double
14014# rounding issues. The result of this test has little meaning on non
14015# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14016# mode is round-to-nearest and double rounding issues are present, and
14017# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14019$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014020# $BASECFLAGS may affect the result
14021ac_save_cc="$CC"
14022CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014023if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014024 ac_cv_x87_double_rounding=no
14025else
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014027/* end confdefs.h. */
14028
14029#include <stdlib.h>
14030#include <math.h>
14031int main() {
14032 volatile double x, y, z;
14033 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14034 x = 0.99999999999999989; /* 1-2**-53 */
14035 y = 1./x;
14036 if (y != 1.)
14037 exit(0);
14038 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14039 x = 1e16;
14040 y = 2.99999;
14041 z = x + y;
14042 if (z != 1e16+4.)
14043 exit(0);
14044 /* both tests show evidence of double rounding */
14045 exit(1);
14046}
14047
14048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014049if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014050 ac_cv_x87_double_rounding=no
14051else
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014056fi
14057
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014058CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14060$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014061if test "$ac_cv_x87_double_rounding" = yes
14062then
14063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014065
14066fi
14067
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014068# ************************************
14069# * Check for mathematical functions *
14070# ************************************
14071
14072LIBS_SAVE=$LIBS
14073LIBS="$LIBS $LIBM"
14074
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014075for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14076do :
14077 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14078ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014079if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014080 cat >>confdefs.h <<_ACEOF
14081#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14082_ACEOF
14083
14084fi
14085done
14086
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014087for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014088do :
14089 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14090ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014091if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014092 cat >>confdefs.h <<_ACEOF
14093#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14094_ACEOF
14095
14096fi
14097done
14098
14099ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14100"
Victor Stinnere0be4232011-10-25 13:06:09 +020014101if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014102 ac_have_decl=1
14103else
14104 ac_have_decl=0
14105fi
14106
14107cat >>confdefs.h <<_ACEOF
14108#define HAVE_DECL_ISINF $ac_have_decl
14109_ACEOF
14110ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14111"
Victor Stinnere0be4232011-10-25 13:06:09 +020014112if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014113 ac_have_decl=1
14114else
14115 ac_have_decl=0
14116fi
14117
14118cat >>confdefs.h <<_ACEOF
14119#define HAVE_DECL_ISNAN $ac_have_decl
14120_ACEOF
14121ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14122"
Victor Stinnere0be4232011-10-25 13:06:09 +020014123if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014124 ac_have_decl=1
14125else
14126 ac_have_decl=0
14127fi
14128
14129cat >>confdefs.h <<_ACEOF
14130#define HAVE_DECL_ISFINITE $ac_have_decl
14131_ACEOF
14132
14133
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014134# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14135# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14137$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014138if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014140else
14141
Matthias Kloseb9621712010-04-24 17:59:49 +000014142if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014143 ac_cv_tanh_preserves_zero_sign=no
14144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014146/* end confdefs.h. */
14147
14148#include <math.h>
14149#include <stdlib.h>
14150int main() {
14151 /* return 0 if either negative zeros don't exist
14152 on this platform or if negative zeros exist
14153 and tanh(-0.) == -0. */
14154 if (atan2(0., -1.) == atan2(-0., -1.) ||
14155 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14156 else exit(1);
14157}
14158
14159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014160if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014161 ac_cv_tanh_preserves_zero_sign=yes
14162else
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014167fi
14168
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014169fi
14170
Matthias Kloseb9621712010-04-24 17:59:49 +000014171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14172$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014173if test "$ac_cv_tanh_preserves_zero_sign" = yes
14174then
14175
Matthias Kloseb9621712010-04-24 17:59:49 +000014176$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014177
14178fi
14179
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014180if test "$ac_cv_func_log1p" = yes
14181then
14182 # On some versions of AIX, log1p(-0.) returns 0. instead of
14183 # -0. See issue #9920.
14184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14185$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014186 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014187 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014188else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014189
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014190 if test "$cross_compiling" = yes; then :
14191 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014192else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14194/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014195
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014196 #include <math.h>
14197 #include <stdlib.h>
14198 int main() {
14199 /* Fail if the signs of log1p(-0.) and -0. can be
14200 distinguished. */
14201 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14202 return 0;
14203 else
14204 return 1;
14205 }
14206
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014207_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014208if ac_fn_c_try_run "$LINENO"; then :
14209 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014210else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014211 ac_cv_log1p_drops_zero_sign=yes
14212fi
14213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14214 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014215fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014216
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014217fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014218
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14220$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14221fi
14222if test "$ac_cv_log1p_drops_zero_sign" = yes
14223then
14224
14225$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14226
14227fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014228
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014229LIBS=$LIBS_SAVE
14230
Mark Dickinsona614f042009-11-28 12:48:43 +000014231# For multiprocessing module, check that sem_open
14232# actually works. For FreeBSD versions <= 7.2,
14233# the kernel module that provides POSIX semaphores
14234# isn't loaded by default, so an attempt to call
14235# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14237$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014238if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014242 ac_cv_posix_semaphores_enabled=yes
14243else
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014245/* end confdefs.h. */
14246
14247#include <unistd.h>
14248#include <fcntl.h>
14249#include <stdio.h>
14250#include <semaphore.h>
14251#include <sys/stat.h>
14252
14253int main(void) {
14254 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14255 if (a == SEM_FAILED) {
14256 perror("sem_open");
14257 return 1;
14258 }
14259 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014260 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014261 return 0;
14262}
14263
14264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014265if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014266 ac_cv_posix_semaphores_enabled=yes
14267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14271 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014272fi
14273
14274
Mark Dickinsona614f042009-11-28 12:48:43 +000014275fi
14276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14278$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014279if test $ac_cv_posix_semaphores_enabled = no
14280then
14281
Matthias Kloseb9621712010-04-24 17:59:49 +000014282$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014283
14284fi
14285
Mark Dickinson10683072009-04-18 21:18:19 +000014286# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14288$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014289if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014291else
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014293 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014294else
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014296/* end confdefs.h. */
14297
14298#include <unistd.h>
14299#include <fcntl.h>
14300#include <stdio.h>
14301#include <semaphore.h>
14302#include <sys/stat.h>
14303
14304int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014305 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014306 int count;
14307 int res;
14308 if(a==SEM_FAILED){
14309 perror("sem_open");
14310 return 1;
14311
14312 }
14313 res = sem_getvalue(a, &count);
14314 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014315 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014316 return res==-1 ? 1 : 0;
14317}
14318
Mark Dickinson10683072009-04-18 21:18:19 +000014319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014320if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014321 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014322else
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014327fi
14328
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014330fi
14331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14333$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014334if test $ac_cv_broken_sem_getvalue = yes
14335then
14336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338
14339fi
14340
Mark Dickinsonbd792642009-03-18 20:06:12 +000014341# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14343$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014344# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014345if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014346 enableval=$enable_big_digits; case $enable_big_digits in
14347yes)
14348 enable_big_digits=30 ;;
14349no)
14350 enable_big_digits=15 ;;
1435115|30)
14352 ;;
14353*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014354 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 +000014355esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14357$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014358
14359cat >>confdefs.h <<_ACEOF
14360#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14361_ACEOF
14362
14363
14364else
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14366$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014367fi
14368
14369
Guido van Rossumef2255b2000-03-10 22:30:29 +000014370# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014371ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014372if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
14374
Matthias Kloseb9621712010-04-24 17:59:49 +000014375$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014376
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014377 wchar_h="yes"
14378
Guido van Rossumef2255b2000-03-10 22:30:29 +000014379else
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014381
14382fi
14383
Michael W. Hudson54241132001-12-07 15:38:26 +000014384
Martin v. Löwis11437992002-04-12 09:54:03 +000014385
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014386# determine wchar_t size
14387if test "$wchar_h" = yes
14388then
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14392# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14394$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014395if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014397else
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14399"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014400
Martin v. Löwis11437992002-04-12 09:54:03 +000014401else
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 if test "$ac_cv_type_wchar_t" = yes; then
14403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014405as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014406See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407 else
14408 ac_cv_sizeof_wchar_t=0
14409 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14414$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415
14416
14417
Martin v. Löwis11437992002-04-12 09:54:03 +000014418cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014419#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014420_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014421
Michael W. Hudson54241132001-12-07 15:38:26 +000014422
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014423fi
14424
Matthias Kloseb9621712010-04-24 17:59:49 +000014425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14426$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014427have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014429/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014430
14431#include <tcl.h>
14432#if TCL_UTF_MAX != 6
14433# error "NOT UCS4_TCL"
14434#endif
14435int
14436main ()
14437{
14438
14439 ;
14440 return 0;
14441}
14442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014444
14445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014447
14448 have_ucs4_tcl=yes
14449
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14453$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014454
Skip Montanaro6dead952003-09-25 14:50:04 +000014455# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014456if test "$wchar_h" = yes
14457then
14458 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14460$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014461 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014463else
14464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014466 ac_cv_wchar_t_signed=yes
14467else
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014469/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014470
14471 #include <wchar.h>
14472 int main()
14473 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014474 /* Success: exit code 0 */
14475 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014476 }
14477
14478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014479if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014480 ac_cv_wchar_t_signed=yes
14481else
Matthias Kloseb9621712010-04-24 17:59:49 +000014482 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014486fi
14487
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014488fi
14489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14491$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492fi
14493
Georg Brandl52d168a2008-01-07 18:10:24 +000014494# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014495if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014496 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014497then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014498 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014499
Matthias Kloseb9621712010-04-24 17:59:49 +000014500$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
Georg Brandl52d168a2008-01-07 18:10:24 +000014502else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014503 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014504fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14506$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014507
14508# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14510$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014511if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014513else
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 ac_cv_c_bigendian=unknown
14515 # See if we're dealing with a universal compiler.
14516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14517/* end confdefs.h. */
14518#ifndef __APPLE_CC__
14519 not a universal capable compiler
14520 #endif
14521 typedef int dummy;
14522
Skip Montanaro6dead952003-09-25 14:50:04 +000014523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014524if ac_fn_c_try_compile "$LINENO"; then :
14525
14526 # Check for potential -arch flags. It is not universal unless
14527 # there are at least two -arch flags with different values.
14528 ac_arch=
14529 ac_prev=
14530 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14531 if test -n "$ac_prev"; then
14532 case $ac_word in
14533 i?86 | x86_64 | ppc | ppc64)
14534 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14535 ac_arch=$ac_word
14536 else
14537 ac_cv_c_bigendian=universal
14538 break
14539 fi
14540 ;;
14541 esac
14542 ac_prev=
14543 elif test "x$ac_word" = "x-arch"; then
14544 ac_prev=arch
14545 fi
14546 done
14547fi
14548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14549 if test $ac_cv_c_bigendian = unknown; then
14550 # See if sys/param.h defines the BYTE_ORDER macro.
14551 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{
Matthias Kloseb9621712010-04-24 17:59:49 +000014559#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14560 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14561 && LITTLE_ENDIAN)
14562 bogus endian macros
14563 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014564
14565 ;
14566 return 0;
14567}
14568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014569if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014570 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014572/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576int
14577main ()
14578{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014579#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 not big endian
14581 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014582
14583 ;
14584 return 0;
14585}
14586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014587if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014588 ac_cv_c_bigendian=yes
14589else
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014593fi
14594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14595 fi
14596 if test $ac_cv_c_bigendian = unknown; then
14597 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014599/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014600#include <limits.h>
14601
Martin v. Löwis11437992002-04-12 09:54:03 +000014602int
14603main ()
14604{
Matthias Kloseb9621712010-04-24 17:59:49 +000014605#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14606 bogus endian macros
14607 #endif
14608
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 ;
14610 return 0;
14611}
14612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014613if ac_fn_c_try_compile "$LINENO"; then :
14614 # It does; now see whether it defined to _BIG_ENDIAN or not.
14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616/* end confdefs.h. */
14617#include <limits.h>
14618
14619int
14620main ()
14621{
14622#ifndef _BIG_ENDIAN
14623 not big endian
14624 #endif
14625
14626 ;
14627 return 0;
14628}
14629_ACEOF
14630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014631 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014632else
Matthias Kloseb9621712010-04-24 17:59:49 +000014633 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14636fi
14637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14638 fi
14639 if test $ac_cv_c_bigendian = unknown; then
14640 # Compile a test program.
14641 if test "$cross_compiling" = yes; then :
14642 # Try to guess by grepping values from an object file.
14643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14644/* end confdefs.h. */
14645short int ascii_mm[] =
14646 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14647 short int ascii_ii[] =
14648 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14649 int use_ascii (int i) {
14650 return ascii_mm[i] + ascii_ii[i];
14651 }
14652 short int ebcdic_ii[] =
14653 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14654 short int ebcdic_mm[] =
14655 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14656 int use_ebcdic (int i) {
14657 return ebcdic_mm[i] + ebcdic_ii[i];
14658 }
14659 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661int
14662main ()
14663{
14664return use_ascii (foo) == use_ebcdic (foo);
14665 ;
14666 return 0;
14667}
14668_ACEOF
14669if ac_fn_c_try_compile "$LINENO"; then :
14670 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14671 ac_cv_c_bigendian=yes
14672 fi
14673 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14674 if test "$ac_cv_c_bigendian" = unknown; then
14675 ac_cv_c_bigendian=no
14676 else
14677 # finding both strings is unlikely to happen, but who knows?
14678 ac_cv_c_bigendian=unknown
14679 fi
14680 fi
14681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014683else
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014685/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014687int
14688main ()
14689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 /* Are we little or big endian? From Harbison&Steele. */
14692 union
14693 {
14694 long int l;
14695 char c[sizeof (long int)];
14696 } u;
14697 u.l = 1;
14698 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699
14700 ;
14701 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014702}
Martin v. Löwis11437992002-04-12 09:54:03 +000014703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014704if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014705 ac_cv_c_bigendian=no
14706else
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14716$as_echo "$ac_cv_c_bigendian" >&6; }
14717 case $ac_cv_c_bigendian in #(
14718 yes)
14719 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14720;; #(
14721 no)
14722 ;; #(
14723 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014724
Matthias Kloseb9621712010-04-24 17:59:49 +000014725$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014726
Matthias Kloseb9621712010-04-24 17:59:49 +000014727 ;; #(
14728 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014729 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014730 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014732
Michael W. Hudson54241132001-12-07 15:38:26 +000014733
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014734# ABI version string for Python extension modules. This appears between the
14735# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14736# from the following attributes which affect the ABI of this Python build (in
14737# this order):
14738#
14739# * The Python implementation (always 'cpython-' for us)
14740# * The major and minor version numbers
14741# * --with-pydebug (adds a 'd')
14742# * --with-pymalloc (adds a 'm')
14743# * --with-wide-unicode (adds a 'u')
14744#
14745# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014746# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14747# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014748
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14750$as_echo_n "checking ABIFLAGS... " >&6; }
14751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14752$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14754$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014755SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14757$as_echo "$SOABI" >&6; }
14758
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014759
14760case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014761 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014762 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14763 *)
14764 EXT_SUFFIX=${SHLIB_SUFFIX};;
14765esac
14766
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14768$as_echo_n "checking LDVERSION... " >&6; }
14769LDVERSION='$(VERSION)$(ABIFLAGS)'
14770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14771$as_echo "$LDVERSION" >&6; }
14772
doko@python.org87421192013-01-26 11:39:31 +010014773
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014774LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014775
14776
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014777# Check whether right shifting a negative integer extends the sign bit
14778# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14780$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014781if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014783else
Martin v. Löwis11437992002-04-12 09:54:03 +000014784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014786 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014787else
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014789/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014790
14791int main()
14792{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014793 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014794}
14795
Martin v. Löwis11437992002-04-12 09:54:03 +000014796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014797if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014798 ac_cv_rshift_extends_sign=yes
14799else
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014804fi
14805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806fi
14807
Matthias Kloseb9621712010-04-24 17:59:49 +000014808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14809$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014810if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014811then
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
Matthias Kloseb9621712010-04-24 17:59:49 +000014813$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014814
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014815fi
14816
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014817# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14819$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014820if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014822else
Martin v. Löwis11437992002-04-12 09:54:03 +000014823
Matthias Kloseb9621712010-04-24 17:59:49 +000014824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014825/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014826#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014827int
14828main ()
14829{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014830
14831 FILE *f = fopen("/dev/null", "r");
14832 flockfile(f);
14833 getc_unlocked(f);
14834 funlockfile(f);
14835
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 ;
14837 return 0;
14838}
14839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014840if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014841 ac_cv_have_getc_unlocked=yes
14842else
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 ac_cv_have_getc_unlocked=no
14844fi
14845rm -f core conftest.err conftest.$ac_objext \
14846 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848
Matthias Kloseb9621712010-04-24 17:59:49 +000014849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14850$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014851if test "$ac_cv_have_getc_unlocked" = yes
14852then
Martin v. Löwis11437992002-04-12 09:54:03 +000014853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014855
14856fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014857
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014858# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014859# save the value of LIBS so we don't actually link Python with readline
14860LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014861
Gregory P. Smith18820942008-09-07 06:24:49 +000014862# On some systems we need to link readline to a termcap compatible
14863# library. NOTE: Keep the precedence of listed libraries synchronised
14864# with setup.py.
14865py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14867$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014868for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014869 if test -z "$py_libtermcap"; then
14870 READLINE_LIBS="-lreadline"
14871 else
14872 READLINE_LIBS="-lreadline -l$py_libtermcap"
14873 fi
14874 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014876/* end confdefs.h. */
14877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878/* Override any GCC internal prototype to avoid an error.
14879 Use char because int might match the return type of a GCC
14880 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014881#ifdef __cplusplus
14882extern "C"
14883#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014884char readline ();
14885int
14886main ()
14887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014889 ;
14890 return 0;
14891}
14892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014893if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014894 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014896rm -f core conftest.err conftest.$ac_objext \
14897 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014898 if test $py_cv_lib_readline = yes; then
14899 break
14900 fi
14901done
14902# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14903#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014904if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14906$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014907else
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14909$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014912
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014913fi
14914
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014915# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14917$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014918if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014920else
14921 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014922LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014924/* end confdefs.h. */
14925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926/* Override any GCC internal prototype to avoid an error.
14927 Use char because int might match the return type of a GCC
14928 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014929#ifdef __cplusplus
14930extern "C"
14931#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014932char rl_callback_handler_install ();
14933int
14934main ()
14935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014937 ;
14938 return 0;
14939}
14940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014941if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014942 ac_cv_lib_readline_rl_callback_handler_install=yes
14943else
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014946rm -f core conftest.err conftest.$ac_objext \
14947 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014948LIBS=$ac_check_lib_save_LIBS
14949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14951$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014952if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014955
14956fi
14957
14958
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014959# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014961/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014962#include <readline/readline.h>
14963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014964if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014965 have_readline=yes
14966else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014967 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014968
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014969fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014970rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971if test $have_readline = yes
14972then
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014974/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014975#include <readline/readline.h>
14976
14977_ACEOF
14978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014980
Matthias Kloseb9621712010-04-24 17:59:49 +000014981$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014982
14983fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014984rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014985
Matthias Kloseb9621712010-04-24 17:59:49 +000014986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014987/* end confdefs.h. */
14988#include <readline/readline.h>
14989
14990_ACEOF
14991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014993
Matthias Kloseb9621712010-04-24 17:59:49 +000014994$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014995
14996fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014997rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014998
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014999fi
15000
Martin v. Löwis0daad592001-09-30 21:09:59 +000015001# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15003$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015004if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015006else
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015008LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012/* Override any GCC internal prototype to avoid an error.
15013 Use char because int might match the return type of a GCC
15014 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015015#ifdef __cplusplus
15016extern "C"
15017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015018char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015019int
15020main ()
15021{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 ;
15024 return 0;
15025}
15026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015027if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015029else
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015032rm -f core conftest.err conftest.$ac_objext \
15033 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015034LIBS=$ac_check_lib_save_LIBS
15035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15037$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015038if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015041
Martin v. Löwis0daad592001-09-30 21:09:59 +000015042fi
15043
Michael W. Hudson54241132001-12-07 15:38:26 +000015044
Thomas Wouters89d996e2007-09-08 17:39:28 +000015045# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15047$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015048if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015050else
15051 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015052LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015054/* end confdefs.h. */
15055
15056/* Override any GCC internal prototype to avoid an error.
15057 Use char because int might match the return type of a GCC
15058 builtin and then its argument prototype would still apply. */
15059#ifdef __cplusplus
15060extern "C"
15061#endif
15062char rl_completion_display_matches_hook ();
15063int
15064main ()
15065{
15066return rl_completion_display_matches_hook ();
15067 ;
15068 return 0;
15069}
15070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015071if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015072 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15073else
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015076rm -f core conftest.err conftest.$ac_objext \
15077 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015078LIBS=$ac_check_lib_save_LIBS
15079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15081$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015082if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015083
Matthias Kloseb9621712010-04-24 17:59:49 +000015084$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015085
15086fi
15087
15088
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015089# also in 4.0, but not in editline
15090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15091$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15092if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15093 $as_echo_n "(cached) " >&6
15094else
15095 ac_check_lib_save_LIBS=$LIBS
15096LIBS="-lreadline $READLINE_LIBS $LIBS"
15097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15098/* end confdefs.h. */
15099
15100/* Override any GCC internal prototype to avoid an error.
15101 Use char because int might match the return type of a GCC
15102 builtin and then its argument prototype would still apply. */
15103#ifdef __cplusplus
15104extern "C"
15105#endif
15106char rl_resize_terminal ();
15107int
15108main ()
15109{
15110return rl_resize_terminal ();
15111 ;
15112 return 0;
15113}
15114_ACEOF
15115if ac_fn_c_try_link "$LINENO"; then :
15116 ac_cv_lib_readline_rl_resize_terminal=yes
15117else
15118 ac_cv_lib_readline_rl_resize_terminal=no
15119fi
15120rm -f core conftest.err conftest.$ac_objext \
15121 conftest$ac_exeext conftest.$ac_ext
15122LIBS=$ac_check_lib_save_LIBS
15123fi
15124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15125$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15126if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15127
15128$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15129
15130fi
15131
15132
Martin v. Löwis0daad592001-09-30 21:09:59 +000015133# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15135$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015136if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015138else
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015140LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144/* Override any GCC internal prototype to avoid an error.
15145 Use char because int might match the return type of a GCC
15146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015147#ifdef __cplusplus
15148extern "C"
15149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015150char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015151int
15152main ()
15153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 ;
15156 return 0;
15157}
15158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015161else
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015164rm -f core conftest.err conftest.$ac_objext \
15165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015166LIBS=$ac_check_lib_save_LIBS
15167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15169$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015170if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015171
Matthias Kloseb9621712010-04-24 17:59:49 +000015172$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015173
Guido van Rossum353ae582001-07-10 16:45:32 +000015174fi
15175
Jack Jansendd19cf82001-12-06 22:36:17 +000015176
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015177# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015179/* end confdefs.h. */
15180#include <readline/readline.h>
15181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015182if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015183 have_readline=yes
15184else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015185 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015186
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015188rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189if test $have_readline = yes
15190then
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015192/* end confdefs.h. */
15193#include <readline/readline.h>
15194
15195_ACEOF
15196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015197 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015200
15201fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015202rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015203
15204fi
15205
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15207$as_echo_n "checking for append_history in -lreadline... " >&6; }
15208if ${ac_cv_lib_readline_append_history+:} false; then :
15209 $as_echo_n "(cached) " >&6
15210else
15211 ac_check_lib_save_LIBS=$LIBS
15212LIBS="-lreadline $READLINE_LIBS $LIBS"
15213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15214/* end confdefs.h. */
15215
15216/* Override any GCC internal prototype to avoid an error.
15217 Use char because int might match the return type of a GCC
15218 builtin and then its argument prototype would still apply. */
15219#ifdef __cplusplus
15220extern "C"
15221#endif
15222char append_history ();
15223int
15224main ()
15225{
15226return append_history ();
15227 ;
15228 return 0;
15229}
15230_ACEOF
15231if ac_fn_c_try_link "$LINENO"; then :
15232 ac_cv_lib_readline_append_history=yes
15233else
15234 ac_cv_lib_readline_append_history=no
15235fi
15236rm -f core conftest.err conftest.$ac_objext \
15237 conftest$ac_exeext conftest.$ac_ext
15238LIBS=$ac_check_lib_save_LIBS
15239fi
15240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15241$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15242if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15243
15244$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15245
15246fi
15247
15248
Martin v. Löwis82bca632006-02-10 20:49:30 +000015249# End of readline checks: restore LIBS
15250LIBS=$LIBS_no_readline
15251
Matthias Kloseb9621712010-04-24 17:59:49 +000015252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15253$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015254if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015256else
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Matthias Kloseb9621712010-04-24 17:59:49 +000015258if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015259 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015260else
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015262/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015263
15264int main()
15265{
15266 int val1 = nice(1);
15267 if (val1 != -1 && val1 == nice(2))
15268 exit(0);
15269 exit(1);
15270}
15271
Martin v. Löwis11437992002-04-12 09:54:03 +000015272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015273if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015274 ac_cv_broken_nice=yes
15275else
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15279 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015280fi
15281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282fi
15283
Matthias Kloseb9621712010-04-24 17:59:49 +000015284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15285$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015286if test "$ac_cv_broken_nice" = yes
15287then
Martin v. Löwis11437992002-04-12 09:54:03 +000015288
Matthias Kloseb9621712010-04-24 17:59:49 +000015289$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015290
15291fi
15292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15294$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015295if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015297else
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015299 ac_cv_broken_poll=no
15300else
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015302/* end confdefs.h. */
15303
15304#include <poll.h>
15305
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015306int main()
15307{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015308 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015309 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015310
15311 close (42);
15312
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015313 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015315 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015316 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015317 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015318 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015319 return 1;
15320}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015321
15322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015323if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015324 ac_cv_broken_poll=yes
15325else
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15329 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015332fi
15333
Matthias Kloseb9621712010-04-24 17:59:49 +000015334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15335$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336if test "$ac_cv_broken_poll" = yes
15337then
15338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340
15341fi
15342
Brett Cannon43802422005-02-10 20:48:03 +000015343# 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 +000015344# (which is not required by ISO C or UNIX spec) and/or if we support
15345# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015346ac_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 +000015347#include <$ac_cv_struct_tm>
15348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349"
Victor Stinnere0be4232011-10-25 13:06:09 +020015350if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015351
15352cat >>confdefs.h <<_ACEOF
15353#define HAVE_STRUCT_TM_TM_ZONE 1
15354_ACEOF
15355
15356
15357fi
15358
15359if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15360
Matthias Kloseb9621712010-04-24 17:59:49 +000015361$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015362
15363else
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15365"
Victor Stinnere0be4232011-10-25 13:06:09 +020015366if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368else
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370fi
15371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015373#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374_ACEOF
15375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15377$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015378if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380else
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015382/* end confdefs.h. */
15383#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384#if !HAVE_DECL_TZNAME
15385extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015386#endif
15387
15388int
15389main ()
15390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015392 ;
15393 return 0;
15394}
15395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015396if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015397 ac_cv_var_tzname=yes
15398else
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015401rm -f core conftest.err conftest.$ac_objext \
15402 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15405$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015406 if test $ac_cv_var_tzname = yes; then
15407
Matthias Kloseb9621712010-04-24 17:59:49 +000015408$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015409
15410 fi
15411fi
15412
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015413
Martin v. Löwis1d459062005-03-14 21:23:33 +000015414# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15416$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015417if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015419else
15420
Matthias Kloseb9621712010-04-24 17:59:49 +000015421if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015422 ac_cv_working_tzset=no
15423else
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015425/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015426
15427#include <stdlib.h>
15428#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015429#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015430
15431#if HAVE_TZNAME
15432extern char *tzname[];
15433#endif
15434
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015435int main()
15436{
Brett Cannon18367812003-09-19 00:59:16 +000015437 /* Note that we need to ensure that not only does tzset(3)
15438 do 'something' with localtime, but it works as documented
15439 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015440 This includes making sure that tzname is set properly if
15441 tm->tm_zone does not exist since it is the alternative way
15442 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015443
15444 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015445 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015446 */
15447
Martin v. Löwis1d459062005-03-14 21:23:33 +000015448 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015449 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15450
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015451 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015452 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015453 if (localtime(&groundhogday)->tm_hour != 0)
15454 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015455#if HAVE_TZNAME
15456 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15457 if (strcmp(tzname[0], "UTC") ||
15458 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15459 exit(1);
15460#endif
Brett Cannon18367812003-09-19 00:59:16 +000015461
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015462 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015463 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015464 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015465 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015466#if HAVE_TZNAME
15467 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15468 exit(1);
15469#endif
Brett Cannon18367812003-09-19 00:59:16 +000015470
15471 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15472 tzset();
15473 if (localtime(&groundhogday)->tm_hour != 11)
15474 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015475#if HAVE_TZNAME
15476 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15477 exit(1);
15478#endif
15479
15480#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015481 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15482 exit(1);
15483 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15484 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015485#endif
Brett Cannon18367812003-09-19 00:59:16 +000015486
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015487 exit(0);
15488}
15489
15490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015491if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015492 ac_cv_working_tzset=yes
15493else
Matthias Kloseb9621712010-04-24 17:59:49 +000015494 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15497 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015498fi
15499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500fi
15501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15503$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015504if test "$ac_cv_working_tzset" = yes
15505then
15506
Matthias Kloseb9621712010-04-24 17:59:49 +000015507$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015508
15509fi
15510
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015511# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15513$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015514if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015515 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015518/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015519#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015520int
15521main ()
15522{
15523
15524struct stat st;
15525st.st_mtim.tv_nsec = 1;
15526
15527 ;
15528 return 0;
15529}
15530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015532 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015533else
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15537fi
15538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15540$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015541if test "$ac_cv_stat_tv_nsec" = yes
15542then
15543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015545
15546fi
15547
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015548# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15550$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015551if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015553else
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015555/* end confdefs.h. */
15556#include <sys/stat.h>
15557int
15558main ()
15559{
15560
15561struct stat st;
15562st.st_mtimespec.tv_nsec = 1;
15563
15564 ;
15565 return 0;
15566}
15567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015569 ac_cv_stat_tv_nsec2=yes
15570else
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15574fi
15575
Matthias Kloseb9621712010-04-24 17:59:49 +000015576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15577$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015578if test "$ac_cv_stat_tv_nsec2" = yes
15579then
15580
Matthias Kloseb9621712010-04-24 17:59:49 +000015581$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015582
15583fi
15584
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015585# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015586ac_save_cppflags="$CPPFLAGS"
15587CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015588
15589for ac_header in curses.h ncurses.h
15590do :
15591 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15592ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15593if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15594 cat >>confdefs.h <<_ACEOF
15595#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15596_ACEOF
15597
15598fi
15599
15600done
15601
15602
15603# On Solaris, term.h requires curses.h
15604for ac_header in term.h
15605do :
15606 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15607#ifdef HAVE_CURSES_H
15608#include <curses.h>
15609#endif
15610
15611"
15612if test "x$ac_cv_header_term_h" = xyes; then :
15613 cat >>confdefs.h <<_ACEOF
15614#define HAVE_TERM_H 1
15615_ACEOF
15616
15617fi
15618
15619done
15620
15621
Jack Jansen666b1e72001-10-31 12:11:48 +000015622# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15624$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015625if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015626 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015627else
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015629/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015630#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015631int
15632main ()
15633{
Jack Jansen666b1e72001-10-31 12:11:48 +000015634
15635 int rtn;
15636 rtn = mvwdelch(0,0,0);
15637
Martin v. Löwis11437992002-04-12 09:54:03 +000015638 ;
15639 return 0;
15640}
15641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015642if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015643 ac_cv_mvwdelch_is_expression=yes
15644else
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15648fi
15649
Matthias Kloseb9621712010-04-24 17:59:49 +000015650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15651$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015652
15653if test "$ac_cv_mvwdelch_is_expression" = yes
15654then
Martin v. Löwis11437992002-04-12 09:54:03 +000015655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015657
15658fi
15659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15661$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015662if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015664else
Matthias Kloseb9621712010-04-24 17:59:49 +000015665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015666/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015667#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015668int
15669main ()
15670{
Jack Jansen666b1e72001-10-31 12:11:48 +000015671
15672 WINDOW *w;
15673 w->_flags = 0;
15674
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 ;
15676 return 0;
15677}
15678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015679if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015680 ac_cv_window_has_flags=yes
15681else
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15685fi
15686
Matthias Kloseb9621712010-04-24 17:59:49 +000015687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15688$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015689
Jack Jansen666b1e72001-10-31 12:11:48 +000015690
15691if test "$ac_cv_window_has_flags" = yes
15692then
Martin v. Löwis11437992002-04-12 09:54:03 +000015693
Matthias Kloseb9621712010-04-24 17:59:49 +000015694$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015695
15696fi
15697
Matthias Kloseb9621712010-04-24 17:59:49 +000015698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15699$as_echo_n "checking for is_term_resized... " >&6; }
15700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015701/* end confdefs.h. */
15702#include <curses.h>
15703int
15704main ()
15705{
15706void *x=is_term_resized
15707 ;
15708 return 0;
15709}
15710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015712
Matthias Kloseb9621712010-04-24 17:59:49 +000015713$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015714
Matthias Kloseb159a552010-04-25 21:00:44 +000015715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015716$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015717else
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15719$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015720
15721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15723
Matthias Kloseb9621712010-04-24 17:59:49 +000015724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15725$as_echo_n "checking for resize_term... " >&6; }
15726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015727/* end confdefs.h. */
15728#include <curses.h>
15729int
15730main ()
15731{
15732void *x=resize_term
15733 ;
15734 return 0;
15735}
15736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015737if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015740
Matthias Kloseb159a552010-04-25 21:00:44 +000015741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015742$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015743else
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15745$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015746
15747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15749
Matthias Kloseb9621712010-04-24 17:59:49 +000015750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15751$as_echo_n "checking for resizeterm... " >&6; }
15752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015753/* end confdefs.h. */
15754#include <curses.h>
15755int
15756main ()
15757{
15758void *x=resizeterm
15759 ;
15760 return 0;
15761}
15762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015763if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015764
Matthias Kloseb9621712010-04-24 17:59:49 +000015765$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015766
Matthias Kloseb159a552010-04-25 21:00:44 +000015767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015768$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015769else
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15771$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015772
15773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015775# last curses configure check
15776CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15779$as_echo "$as_me: checking for device files" >&6;}
15780
15781if test "x$cross_compiling" = xyes; then
15782 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15784$as_echo_n "checking for /dev/ptmx... " >&6; }
15785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15786$as_echo "not set" >&6; }
15787 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15788 fi
15789 if test "${ac_cv_file__dev_ptc+set}" != set; then
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15791$as_echo_n "checking for /dev/ptc... " >&6; }
15792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15793$as_echo "not set" >&6; }
15794 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15795 fi
15796fi
15797
Matthias Kloseb9621712010-04-24 17:59:49 +000015798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15799$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015800if ${ac_cv_file__dev_ptmx+:} false; then :
15801 $as_echo_n "(cached) " >&6
15802else
15803 test "$cross_compiling" = yes &&
15804 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15805if test -r "/dev/ptmx"; then
15806 ac_cv_file__dev_ptmx=yes
15807else
15808 ac_cv_file__dev_ptmx=no
15809fi
15810fi
15811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15812$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15813if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015814
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015815fi
15816
15817if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015818
Matthias Kloseb9621712010-04-24 17:59:49 +000015819$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015820
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15823$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015824if ${ac_cv_file__dev_ptc+:} false; then :
15825 $as_echo_n "(cached) " >&6
15826else
15827 test "$cross_compiling" = yes &&
15828 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15829if test -r "/dev/ptc"; then
15830 ac_cv_file__dev_ptc=yes
15831else
15832 ac_cv_file__dev_ptc=no
15833fi
15834fi
15835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15836$as_echo "$ac_cv_file__dev_ptc" >&6; }
15837if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015838
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015839fi
15840
15841if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015844
Neal Norwitz865400f2003-03-21 01:42:58 +000015845fi
15846
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015847if test "$have_long_long" = yes
15848then
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15850$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015851 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015852 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015853else
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015855 ac_cv_have_long_long_format="cross -- assuming no"
15856 if test x$GCC = xyes; then
15857 save_CFLAGS=$CFLAGS
15858 CFLAGS="$CFLAGS -Werror -Wformat"
15859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15860/* end confdefs.h. */
15861
15862 #include <stdio.h>
15863 #include <stddef.h>
15864
15865int
15866main ()
15867{
15868
15869 char *buffer;
15870 sprintf(buffer, "%lld", (long long)123);
15871 sprintf(buffer, "%lld", (long long)-123);
15872 sprintf(buffer, "%llu", (unsigned long long)123);
15873
15874 ;
15875 return 0;
15876}
15877_ACEOF
15878if ac_fn_c_try_compile "$LINENO"; then :
15879 ac_cv_have_long_long_format=yes
15880
15881fi
15882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15883 CFLAGS=$save_CFLAGS
15884 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015885else
Matthias Kloseb9621712010-04-24 17:59:49 +000015886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015887/* end confdefs.h. */
15888
15889 #include <stdio.h>
15890 #include <stddef.h>
15891 #include <string.h>
15892
15893 #ifdef HAVE_SYS_TYPES_H
15894 #include <sys/types.h>
15895 #endif
15896
15897 int main()
15898 {
15899 char buffer[256];
15900
15901 if (sprintf(buffer, "%lld", (long long)123) < 0)
15902 return 1;
15903 if (strcmp(buffer, "123"))
15904 return 1;
15905
15906 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15907 return 1;
15908 if (strcmp(buffer, "-123"))
15909 return 1;
15910
15911 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15912 return 1;
15913 if (strcmp(buffer, "123"))
15914 return 1;
15915
15916 return 0;
15917 }
15918
15919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015920if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015921 ac_cv_have_long_long_format=yes
15922else
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015927fi
15928
15929
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015930fi
15931
Matthias Kloseb9621712010-04-24 17:59:49 +000015932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15933$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015934fi
15935
Mark Dickinson89d7d412009-12-31 20:50:59 +000015936if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015937then
15938
Matthias Kloseb9621712010-04-24 17:59:49 +000015939$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015940
15941fi
15942
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015943if test $ac_sys_system = Darwin
15944then
15945 LIBS="$LIBS -framework CoreFoundation"
15946fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15949$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015950if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015951 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015952else
Matthias Kloseb9621712010-04-24 17:59:49 +000015953 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015954 ac_cv_have_size_t_format="cross -- assuming yes"
15955
Thomas Wouters477c8d52006-05-27 19:21:47 +000015956else
Matthias Kloseb9621712010-04-24 17:59:49 +000015957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015958/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015959
Thomas Wouters477c8d52006-05-27 19:21:47 +000015960#include <stdio.h>
15961#include <stddef.h>
15962#include <string.h>
15963
Christian Heimes2c181612007-12-17 20:04:13 +000015964#ifdef HAVE_SYS_TYPES_H
15965#include <sys/types.h>
15966#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015967
15968#ifdef HAVE_SSIZE_T
15969typedef ssize_t Py_ssize_t;
15970#elif SIZEOF_VOID_P == SIZEOF_LONG
15971typedef long Py_ssize_t;
15972#else
15973typedef int Py_ssize_t;
15974#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015975
Christian Heimes2c181612007-12-17 20:04:13 +000015976int main()
15977{
15978 char buffer[256];
15979
Thomas Wouters477c8d52006-05-27 19:21:47 +000015980 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15981 return 1;
15982
Thomas Wouters89f507f2006-12-13 04:49:30 +000015983 if (strcmp(buffer, "123"))
15984 return 1;
15985
15986 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15987 return 1;
15988
15989 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015990 return 1;
15991
15992 return 0;
15993}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015994
Thomas Wouters477c8d52006-05-27 19:21:47 +000015995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015996if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015997 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015998else
Matthias Kloseb9621712010-04-24 17:59:49 +000015999 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016003fi
16004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16007$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016008if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016011
16012fi
16013
Matthias Kloseb9621712010-04-24 17:59:49 +000016014ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016015#ifdef HAVE_SYS_TYPES_H
16016#include <sys/types.h>
16017#endif
16018#ifdef HAVE_SYS_SOCKET_H
16019#include <sys/socket.h>
16020#endif
16021
Matthias Kloseb9621712010-04-24 17:59:49 +000016022"
Victor Stinnere0be4232011-10-25 13:06:09 +020016023if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016024
Martin v. Löwis11437992002-04-12 09:54:03 +000016025else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016026
Matthias Kloseb9621712010-04-24 17:59:49 +000016027$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016028
16029fi
16030
Michael W. Hudson54241132001-12-07 15:38:26 +000016031
Matthias Kloseb9621712010-04-24 17:59:49 +000016032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16033$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016034if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016035 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016036else
Matthias Kloseb9621712010-04-24 17:59:49 +000016037 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016038 ac_cv_broken_mbstowcs=no
16039else
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016041/* end confdefs.h. */
16042
Stefan Krah19c21392012-11-22 23:47:32 +010016043#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016044#include<stdlib.h>
16045int main() {
16046 size_t len = -1;
16047 const char *str = "text";
16048 len = mbstowcs(NULL, str, 0);
16049 return (len != 4);
16050}
16051
16052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016053if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016054 ac_cv_broken_mbstowcs=no
16055else
Matthias Kloseb9621712010-04-24 17:59:49 +000016056 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16059 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016060fi
16061
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016062fi
16063
Matthias Kloseb9621712010-04-24 17:59:49 +000016064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16065$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016066if test "$ac_cv_broken_mbstowcs" = yes
16067then
16068
Matthias Kloseb9621712010-04-24 17:59:49 +000016069$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016070
16071fi
16072
Antoine Pitroub52ec782009-01-25 16:34:23 +000016073# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16075$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016076
16077# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016078if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016079 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016080if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016081then
16082
Matthias Kloseb9621712010-04-24 17:59:49 +000016083$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016084
Matthias Kloseb9621712010-04-24 17:59:49 +000016085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16086$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016087fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016088if test "$withval" = no
16089then
16090
16091$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16092
Matthias Kloseb9621712010-04-24 17:59:49 +000016093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16094$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016095fi
16096
Antoine Pitrou042b1282010-08-13 21:15:58 +000016097else
16098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16099$as_echo "no value specified" >&6; }
16100fi
16101
Antoine Pitroub52ec782009-01-25 16:34:23 +000016102
Matthias Kloseb17289e2012-03-15 19:51:34 +010016103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16104$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16105if ${ac_cv_computed_gotos+:} false; then :
16106 $as_echo_n "(cached) " >&6
16107else
16108 if test "$cross_compiling" = yes; then :
16109 if test "${with_computed_gotos+set}" = set; then
16110 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16111 else
16112 ac_cv_computed_gotos=no
16113 fi
16114else
16115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16116/* end confdefs.h. */
16117
16118int main(int argc, char **argv)
16119{
16120 static void *targets[1] = { &&LABEL1 };
16121 goto LABEL2;
16122LABEL1:
16123 return 0;
16124LABEL2:
16125 goto *targets[0];
16126 return 1;
16127}
16128
16129_ACEOF
16130if ac_fn_c_try_run "$LINENO"; then :
16131 ac_cv_computed_gotos=yes
16132else
16133 ac_cv_computed_gotos=no
16134fi
16135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16136 conftest.$ac_objext conftest.beam conftest.$ac_ext
16137fi
16138
16139fi
16140
16141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16142$as_echo "$ac_cv_computed_gotos" >&6; }
16143case "$ac_cv_computed_gotos" in yes*)
16144
16145$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16146
16147esac
16148
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016149case $ac_sys_system in
16150AIX*)
16151
16152$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16153 ;;
16154esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016155
Michael W. Hudson54241132001-12-07 15:38:26 +000016156
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016157
16158
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016159for h in `(cd $srcdir;echo Python/thread_*.h)`
16160do
16161 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16162done
16163
Michael W. Hudson54241132001-12-07 15:38:26 +000016164
Ned Deily0db50cf2014-07-25 12:41:31 -070016165SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16167$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016168for dir in $SRCDIRS; do
16169 if test ! -d $dir; then
16170 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016171 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016172done
Matthias Kloseb9621712010-04-24 17:59:49 +000016173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16174$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016175
Stefan Krah1919b7e2012-03-21 18:25:23 +010016176# Availability of -O2:
16177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16178$as_echo_n "checking for -O2... " >&6; }
16179saved_cflags="$CFLAGS"
16180CFLAGS="-O2"
16181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16182/* end confdefs.h. */
16183
16184int
16185main ()
16186{
16187
16188
16189 ;
16190 return 0;
16191}
16192_ACEOF
16193if ac_fn_c_try_compile "$LINENO"; then :
16194 have_O2=yes
16195else
16196 have_O2=no
16197fi
16198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16200$as_echo "$have_O2" >&6; }
16201CFLAGS="$saved_cflags"
16202
16203# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16204# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16206$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16207saved_cflags="$CFLAGS"
16208CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16209if test "$have_O2" = no; then
16210 CFLAGS=""
16211fi
16212if test "$cross_compiling" = yes; then :
16213 have_glibc_memmove_bug=undefined
16214else
16215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16216/* end confdefs.h. */
16217
16218#include <stdio.h>
16219#include <stdlib.h>
16220#include <string.h>
16221void foo(void *p, void *q) { memmove(p, q, 19); }
16222int main() {
16223 char a[32] = "123456789000000000";
16224 foo(&a[9], a);
16225 if (strcmp(a, "123456789123456789000000000") != 0)
16226 return 1;
16227 foo(a, &a[9]);
16228 if (strcmp(a, "123456789000000000") != 0)
16229 return 1;
16230 return 0;
16231}
16232
16233_ACEOF
16234if ac_fn_c_try_run "$LINENO"; then :
16235 have_glibc_memmove_bug=no
16236else
16237 have_glibc_memmove_bug=yes
16238fi
16239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16240 conftest.$ac_objext conftest.beam conftest.$ac_ext
16241fi
16242
16243CFLAGS="$saved_cflags"
16244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16245$as_echo "$have_glibc_memmove_bug" >&6; }
16246if test "$have_glibc_memmove_bug" = yes; then
16247
16248$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16249
16250fi
16251
16252if test "$have_gcc_asm_for_x87" = yes; then
16253 # Some versions of gcc miscompile inline asm:
16254 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16255 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16256 case $CC in
16257 *gcc*)
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16259$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16260 saved_cflags="$CFLAGS"
16261 CFLAGS="-O2"
16262 if test "$cross_compiling" = yes; then :
16263 have_ipa_pure_const_bug=undefined
16264else
16265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16266/* end confdefs.h. */
16267
16268 __attribute__((noinline)) int
16269 foo(int *p) {
16270 int r;
16271 asm ( "movl \$6, (%1)\n\t"
16272 "xorl %0, %0\n\t"
16273 : "=r" (r) : "r" (p) : "memory"
16274 );
16275 return r;
16276 }
16277 int main() {
16278 int p = 8;
16279 if ((foo(&p) ? : p) != 6)
16280 return 1;
16281 return 0;
16282 }
16283
16284_ACEOF
16285if ac_fn_c_try_run "$LINENO"; then :
16286 have_ipa_pure_const_bug=no
16287else
16288 have_ipa_pure_const_bug=yes
16289fi
16290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16291 conftest.$ac_objext conftest.beam conftest.$ac_ext
16292fi
16293
16294 CFLAGS="$saved_cflags"
16295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16296$as_echo "$have_ipa_pure_const_bug" >&6; }
16297 if test "$have_ipa_pure_const_bug" = yes; then
16298
16299$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16300
16301 fi
16302 ;;
16303 esac
16304fi
16305
Victor Stinner4f5366e2015-01-09 02:13:19 +010016306# Check for stdatomic.h
16307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16308$as_echo_n "checking for stdatomic.h... " >&6; }
16309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16310/* end confdefs.h. */
16311
16312
16313 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016314 atomic_int value = ATOMIC_VAR_INIT(1);
16315 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016316 int main() {
16317 int loaded_value = atomic_load(&value);
16318 return 0;
16319 }
16320
16321
16322_ACEOF
16323if ac_fn_c_try_link "$LINENO"; then :
16324 have_stdatomic_h=yes
16325else
16326 have_stdatomic_h=no
16327fi
16328rm -f core conftest.err conftest.$ac_objext \
16329 conftest$ac_exeext conftest.$ac_ext
16330
16331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16332$as_echo "$have_stdatomic_h" >&6; }
16333
16334if test "$have_stdatomic_h" = yes; then
16335
16336$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16337
16338fi
16339
16340# Check for GCC >= 4.7 __atomic builtins
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16342$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16344/* end confdefs.h. */
16345
16346
16347 volatile int val = 1;
16348 int main() {
16349 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16350 return 0;
16351 }
16352
16353
16354_ACEOF
16355if ac_fn_c_try_link "$LINENO"; then :
16356 have_builtin_atomic=yes
16357else
16358 have_builtin_atomic=no
16359fi
16360rm -f core conftest.err conftest.$ac_objext \
16361 conftest$ac_exeext conftest.$ac_ext
16362
16363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16364$as_echo "$have_builtin_atomic" >&6; }
16365
16366if test "$have_builtin_atomic" = yes; then
16367
16368$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16369
16370fi
16371
Ned Deily322f5ba2013-11-21 23:01:59 -080016372# ensurepip option
16373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16374$as_echo_n "checking for ensurepip... " >&6; }
16375
16376# Check whether --with-ensurepip was given.
16377if test "${with_ensurepip+set}" = set; then :
16378 withval=$with_ensurepip;
16379else
16380 with_ensurepip=upgrade
16381fi
16382
16383case $with_ensurepip in #(
16384 yes|upgrade) :
16385 ENSUREPIP=upgrade ;; #(
16386 install) :
16387 ENSUREPIP=install ;; #(
16388 no) :
16389 ENSUREPIP=no ;; #(
16390 *) :
16391 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16392esac
16393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16394$as_echo "$ENSUREPIP" >&6; }
16395
16396
Victor Stinner35a97c02015-03-08 02:59:09 +010016397# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16399$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16401/* end confdefs.h. */
16402
16403
16404 #include <dirent.h>
16405
16406 int main() {
16407 struct dirent entry;
16408 return entry.d_type == DT_UNKNOWN;
16409 }
16410
16411
16412_ACEOF
16413if ac_fn_c_try_link "$LINENO"; then :
16414 have_dirent_d_type=yes
16415else
16416 have_dirent_d_type=no
16417fi
16418rm -f core conftest.err conftest.$ac_objext \
16419 conftest$ac_exeext conftest.$ac_ext
16420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16421$as_echo "$have_dirent_d_type" >&6; }
16422
16423if test "$have_dirent_d_type" = yes; then
16424
16425$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16426
16427fi
16428
Victor Stinner9eb57c52015-03-19 22:21:49 +010016429# check if the Linux getrandom() syscall is available
16430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16431$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16433/* end confdefs.h. */
16434
16435
Victor Stinner1b80b242016-04-12 22:34:58 +020016436 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016437 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016438 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016439
16440 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016441 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016442 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016443 const int flags = GRND_NONBLOCK;
16444 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016445 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016446 return 0;
16447 }
16448
16449
16450_ACEOF
16451if ac_fn_c_try_link "$LINENO"; then :
16452 have_getrandom_syscall=yes
16453else
16454 have_getrandom_syscall=no
16455fi
16456rm -f core conftest.err conftest.$ac_objext \
16457 conftest$ac_exeext conftest.$ac_ext
16458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16459$as_echo "$have_getrandom_syscall" >&6; }
16460
16461if test "$have_getrandom_syscall" = yes; then
16462
16463$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16464
16465fi
16466
Victor Stinnerbae2d622015-10-01 09:47:30 +020016467# check if the getrandom() function is available
16468# the test was written for the Solaris function of <sys/random.h>
16469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16470$as_echo_n "checking for the getrandom() function... " >&6; }
16471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16472/* end confdefs.h. */
16473
16474
16475 #include <sys/random.h>
16476
16477 int main() {
16478 char buffer[1];
16479 const size_t buflen = sizeof(buffer);
16480 const int flags = 0;
16481 /* ignore the result, Python checks for ENOSYS at runtime */
16482 (void)getrandom(buffer, buflen, flags);
16483 return 0;
16484 }
16485
16486
16487_ACEOF
16488if ac_fn_c_try_link "$LINENO"; then :
16489 have_getrandom=yes
16490else
16491 have_getrandom=no
16492fi
16493rm -f core conftest.err conftest.$ac_objext \
16494 conftest$ac_exeext conftest.$ac_ext
16495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16496$as_echo "$have_getrandom" >&6; }
16497
16498if test "$have_getrandom" = yes; then
16499
16500$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16501
16502fi
16503
Guido van Rossum627b2d71993-12-24 10:39:16 +000016504# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016505ac_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 +000016506
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016507ac_config_files="$ac_config_files Modules/ld_so_aix"
16508
Martin v. Löwis11437992002-04-12 09:54:03 +000016509cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016510# This file is a shell script that caches the results of configure
16511# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016512# scripts and configure runs, see configure's option --config-cache.
16513# It is not useful on other systems. If it contains results you don't
16514# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016515#
Martin v. Löwis11437992002-04-12 09:54:03 +000016516# config.status only pays attention to the cache file if you give it
16517# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016518#
Skip Montanaro6dead952003-09-25 14:50:04 +000016519# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016520# loading this file, other *unset* `ac_cv_foo' will be assigned the
16521# following values.
16522
16523_ACEOF
16524
Guido van Rossumf78abae1997-01-21 22:02:36 +000016525# The following way of writing the cache mishandles newlines in values,
16526# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016528# Ultrix sh set writes to stderr and can't be redirected directly,
16529# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530(
16531 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16532 eval ac_val=\$$ac_var
16533 case $ac_val in #(
16534 *${as_nl}*)
16535 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016536 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16537$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538 esac
16539 case $ac_var in #(
16540 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016541 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16542 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543 esac ;;
16544 esac
16545 done
16546
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16549 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016550 # `set' does not quote correctly, so add quotes: double-quote
16551 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016552 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016553 "s/'/'\\\\''/g;
16554 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 *)
16557 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016559 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560 esac |
16561 sort
16562) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016563 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016566 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016567 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16568 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016569 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16570 :end' >>confcache
16571if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16572 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016573 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016574 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16575$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016576 if test ! -f "$cache_file" || test -h "$cache_file"; then
16577 cat confcache >"$cache_file"
16578 else
16579 case $cache_file in #(
16580 */* | ?:*)
16581 mv -f confcache "$cache_file"$$ &&
16582 mv -f "$cache_file"$$ "$cache_file" ;; #(
16583 *)
16584 mv -f confcache "$cache_file" ;;
16585 esac
16586 fi
16587 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016588 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016589 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16590$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016591 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016592fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016593rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016594
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016595test "x$prefix" = xNONE && prefix=$ac_default_prefix
16596# Let make expand exec_prefix.
16597test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016599DEFS=-DHAVE_CONFIG_H
16600
Skip Montanaro6dead952003-09-25 14:50:04 +000016601ac_libobjs=
16602ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016603U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016604for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16605 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016607 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16609 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016610 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16611 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016612done
16613LIBOBJS=$ac_libobjs
16614
16615LTLIBOBJS=$ac_ltlibobjs
16616
16617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618
Matthias Kloseb9621712010-04-24 17:59:49 +000016619
Victor Stinnere0be4232011-10-25 13:06:09 +020016620: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016621ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016622ac_clean_files_save=$ac_clean_files
16623ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016624{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16625$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16626as_write_fail=0
16627cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016628#! $SHELL
16629# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016630# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016631# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016632# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016633
Martin v. Löwis11437992002-04-12 09:54:03 +000016634debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016635ac_cs_recheck=false
16636ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016637
Matthias Kloseb9621712010-04-24 17:59:49 +000016638SHELL=\${CONFIG_SHELL-$SHELL}
16639export SHELL
16640_ASEOF
16641cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16642## -------------------- ##
16643## M4sh Initialization. ##
16644## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016646# Be more Bourne compatible
16647DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016648if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 emulate sh
16650 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016651 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016652 # is contrary to our usage. Disable this feature.
16653 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016655else
Matthias Kloseb9621712010-04-24 17:59:49 +000016656 case `(set -o) 2>/dev/null` in #(
16657 *posix*) :
16658 set -o posix ;; #(
16659 *) :
16660 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016662fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016663
16664
Matthias Kloseb9621712010-04-24 17:59:49 +000016665as_nl='
16666'
16667export as_nl
16668# Printing a long string crashes Solaris 7 /usr/bin/printf.
16669as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16670as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16671as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16672# Prefer a ksh shell builtin over an external printf program on Solaris,
16673# but without wasting forks for bash or zsh.
16674if test -z "$BASH_VERSION$ZSH_VERSION" \
16675 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16676 as_echo='print -r --'
16677 as_echo_n='print -rn --'
16678elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16679 as_echo='printf %s\n'
16680 as_echo_n='printf %s'
16681else
16682 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16683 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16684 as_echo_n='/usr/ucb/echo -n'
16685 else
16686 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16687 as_echo_n_body='eval
16688 arg=$1;
16689 case $arg in #(
16690 *"$as_nl"*)
16691 expr "X$arg" : "X\\(.*\\)$as_nl";
16692 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16693 esac;
16694 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16695 '
16696 export as_echo_n_body
16697 as_echo_n='sh -c $as_echo_n_body as_echo'
16698 fi
16699 export as_echo_body
16700 as_echo='sh -c $as_echo_body as_echo'
16701fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016702
16703# The user is always right.
16704if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016705 PATH_SEPARATOR=:
16706 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16707 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16708 PATH_SEPARATOR=';'
16709 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712
16713# IFS
16714# We need space, tab and new line, in precisely that order. Quoting is
16715# there to prevent editors from complaining about space-tab.
16716# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16717# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718IFS=" "" $as_nl"
16719
16720# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016721as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016722case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723 *[\\/]* ) as_myself=$0 ;;
16724 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016725for as_dir in $PATH
16726do
16727 IFS=$as_save_IFS
16728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16730 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733 ;;
16734esac
16735# We did not find ourselves, most probably we were run as `sh COMMAND'
16736# in which case we are not to be found in the path.
16737if test "x$as_myself" = x; then
16738 as_myself=$0
16739fi
16740if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016741 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16742 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743fi
16744
Matthias Kloseb9621712010-04-24 17:59:49 +000016745# Unset variables that we do not need and which cause bugs (e.g. in
16746# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16747# suppresses any "Segmentation fault" message there. '((' could
16748# trigger a bug in pdksh 5.2.14.
16749for as_var in BASH_ENV ENV MAIL MAILPATH
16750do eval test x\${$as_var+set} = xset \
16751 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752done
16753PS1='$ '
16754PS2='> '
16755PS4='+ '
16756
16757# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016758LC_ALL=C
16759export LC_ALL
16760LANGUAGE=C
16761export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762
Matthias Kloseb9621712010-04-24 17:59:49 +000016763# CDPATH.
16764(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16765
16766
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016767# as_fn_error STATUS ERROR [LINENO LOG_FD]
16768# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016769# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16770# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016771# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016772as_fn_error ()
16773{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016774 as_status=$1; test $as_status -eq 0 && as_status=1
16775 if test "$4"; then
16776 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16777 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016778 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016779 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016780 as_fn_exit $as_status
16781} # as_fn_error
16782
16783
16784# as_fn_set_status STATUS
16785# -----------------------
16786# Set $? to STATUS, without forking.
16787as_fn_set_status ()
16788{
16789 return $1
16790} # as_fn_set_status
16791
16792# as_fn_exit STATUS
16793# -----------------
16794# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16795as_fn_exit ()
16796{
16797 set +e
16798 as_fn_set_status $1
16799 exit $1
16800} # as_fn_exit
16801
16802# as_fn_unset VAR
16803# ---------------
16804# Portably unset VAR.
16805as_fn_unset ()
16806{
16807 { eval $1=; unset $1;}
16808}
16809as_unset=as_fn_unset
16810# as_fn_append VAR VALUE
16811# ----------------------
16812# Append the text in VALUE to the end of the definition contained in VAR. Take
16813# advantage of any shell optimizations that allow amortized linear growth over
16814# repeated appends, instead of the typical quadratic growth present in naive
16815# implementations.
16816if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16817 eval 'as_fn_append ()
16818 {
16819 eval $1+=\$2
16820 }'
16821else
16822 as_fn_append ()
16823 {
16824 eval $1=\$$1\$2
16825 }
16826fi # as_fn_append
16827
16828# as_fn_arith ARG...
16829# ------------------
16830# Perform arithmetic evaluation on the ARGs, and store the result in the
16831# global $as_val. Take advantage of shells that can avoid forks. The arguments
16832# must be portable across $(()) and expr.
16833if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16834 eval 'as_fn_arith ()
16835 {
16836 as_val=$(( $* ))
16837 }'
16838else
16839 as_fn_arith ()
16840 {
16841 as_val=`expr "$@" || test $? -eq 1`
16842 }
16843fi # as_fn_arith
16844
16845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016846if expr a : '\(a\)' >/dev/null 2>&1 &&
16847 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16848 as_expr=expr
16849else
16850 as_expr=false
16851fi
16852
16853if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16854 as_basename=basename
16855else
16856 as_basename=false
16857fi
16858
Matthias Kloseb9621712010-04-24 17:59:49 +000016859if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16860 as_dirname=dirname
16861else
16862 as_dirname=false
16863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865as_me=`$as_basename -- "$0" ||
16866$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16867 X"$0" : 'X\(//\)$' \| \
16868 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016869$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016870 sed '/^.*\/\([^/][^/]*\)\/*$/{
16871 s//\1/
16872 q
16873 }
16874 /^X\/\(\/\/\)$/{
16875 s//\1/
16876 q
16877 }
16878 /^X\/\(\/\).*/{
16879 s//\1/
16880 q
16881 }
16882 s/.*/./; q'`
16883
Matthias Kloseb9621712010-04-24 17:59:49 +000016884# Avoid depending upon Character Ranges.
16885as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16886as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16887as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16888as_cr_digits='0123456789'
16889as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890
16891ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016892case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016894 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016896 xy) ECHO_C='\c';;
16897 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16898 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899 esac;;
16900*)
16901 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016903
Martin v. Löwis11437992002-04-12 09:54:03 +000016904rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905if test -d conf$$.dir; then
16906 rm -f conf$$.dir/conf$$.file
16907else
16908 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016909 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016911if (echo >conf$$.file) 2>/dev/null; then
16912 if ln -s conf$$.file conf$$ 2>/dev/null; then
16913 as_ln_s='ln -s'
16914 # ... but there are two gotchas:
16915 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16916 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016917 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016918 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016919 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016920 elif ln conf$$.file conf$$ 2>/dev/null; then
16921 as_ln_s=ln
16922 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016923 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016924 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016925else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016926 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016928rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16929rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016930
Matthias Kloseb9621712010-04-24 17:59:49 +000016931
16932# as_fn_mkdir_p
16933# -------------
16934# Create "$as_dir" as a directory, including parents if necessary.
16935as_fn_mkdir_p ()
16936{
16937
16938 case $as_dir in #(
16939 -*) as_dir=./$as_dir;;
16940 esac
16941 test -d "$as_dir" || eval $as_mkdir_p || {
16942 as_dirs=
16943 while :; do
16944 case $as_dir in #(
16945 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16946 *) as_qdir=$as_dir;;
16947 esac
16948 as_dirs="'$as_qdir' $as_dirs"
16949 as_dir=`$as_dirname -- "$as_dir" ||
16950$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16951 X"$as_dir" : 'X\(//\)[^/]' \| \
16952 X"$as_dir" : 'X\(//\)$' \| \
16953 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16954$as_echo X"$as_dir" |
16955 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16956 s//\1/
16957 q
16958 }
16959 /^X\(\/\/\)[^/].*/{
16960 s//\1/
16961 q
16962 }
16963 /^X\(\/\/\)$/{
16964 s//\1/
16965 q
16966 }
16967 /^X\(\/\).*/{
16968 s//\1/
16969 q
16970 }
16971 s/.*/./; q'`
16972 test -d "$as_dir" && break
16973 done
16974 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016975 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016976
16977
16978} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016979if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016980 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016981else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016982 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016983 as_mkdir_p=false
16984fi
16985
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016986
16987# as_fn_executable_p FILE
16988# -----------------------
16989# Test if FILE is an executable regular file.
16990as_fn_executable_p ()
16991{
16992 test -f "$1" && test -x "$1"
16993} # as_fn_executable_p
16994as_test_x='test -x'
16995as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016996
16997# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016998as_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 +000016999
17000# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017001as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017002
17003
Martin v. Löwis11437992002-04-12 09:54:03 +000017004exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017005## ----------------------------------- ##
17006## Main body of $CONFIG_STATUS script. ##
17007## ----------------------------------- ##
17008_ASEOF
17009test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017010
Matthias Kloseb9621712010-04-24 17:59:49 +000017011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17012# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017013# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014# values after options handling.
17015ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040017016This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017017generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017018
17019 CONFIG_FILES = $CONFIG_FILES
17020 CONFIG_HEADERS = $CONFIG_HEADERS
17021 CONFIG_LINKS = $CONFIG_LINKS
17022 CONFIG_COMMANDS = $CONFIG_COMMANDS
17023 $ $0 $@
17024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025on `(hostname || uname -n) 2>/dev/null | sed 1q`
17026"
17027
Martin v. Löwis11437992002-04-12 09:54:03 +000017028_ACEOF
17029
Matthias Kloseb9621712010-04-24 17:59:49 +000017030case $ac_config_files in *"
17031"*) set x $ac_config_files; shift; ac_config_files=$*;;
17032esac
17033
17034case $ac_config_headers in *"
17035"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17036esac
17037
17038
17039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017040# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017041config_files="$ac_config_files"
17042config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017045
Matthias Kloseb9621712010-04-24 17:59:49 +000017046cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017047ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017048\`$as_me' instantiates files and other configuration actions
17049from templates according to the current configuration. Unless the files
17050and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017051
Matthias Kloseb9621712010-04-24 17:59:49 +000017052Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017053
17054 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 --config print configuration, then exit
17057 -q, --quiet, --silent
17058 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 -d, --debug don't remove temporary files
17060 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 --file=FILE[:TEMPLATE]
17062 instantiate the configuration file FILE
17063 --header=FILE[:TEMPLATE]
17064 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017065
17066Configuration files:
17067$config_files
17068
17069Configuration headers:
17070$config_headers
17071
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017072Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017075cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17076ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017077ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040017078python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017079configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017081
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017082Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017083This config.status script is free software; the Free Software Foundation
17084gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085
17086ac_pwd='$ac_pwd'
17087srcdir='$srcdir'
17088INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017089MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017090test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017091_ACEOF
17092
Matthias Kloseb9621712010-04-24 17:59:49 +000017093cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17094# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017095ac_need_defaults=:
17096while test $# != 0
17097do
17098 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017099 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017100 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17101 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017102 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017104 --*=)
17105 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17106 ac_optarg=
17107 ac_shift=:
17108 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017110 ac_option=$1
17111 ac_optarg=$2
17112 ac_shift=shift
17113 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017114 esac
17115
Skip Montanaro6dead952003-09-25 14:50:04 +000017116 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017118 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17119 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017121 $as_echo "$ac_cs_version"; exit ;;
17122 --config | --confi | --conf | --con | --co | --c )
17123 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017125 debug=: ;;
17126 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017127 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017128 case $ac_optarg in
17129 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017130 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 esac
17132 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017133 ac_need_defaults=false;;
17134 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017135 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017136 case $ac_optarg in
17137 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17138 esac
17139 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017140 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017141 --he | --h)
17142 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017143 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017144Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017146 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17148 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17149 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017150
17151 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017152 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017153Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
Matthias Kloseb9621712010-04-24 17:59:49 +000017155 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017156 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017157
17158 esac
17159 shift
17160done
17161
Skip Montanaro6dead952003-09-25 14:50:04 +000017162ac_configure_extra_args=
17163
17164if $ac_cs_silent; then
17165 exec 6>/dev/null
17166 ac_configure_extra_args="$ac_configure_extra_args --silent"
17167fi
17168
17169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017170cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017171if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017172 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017173 shift
17174 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17175 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017177 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017178fi
17179
Martin v. Löwis11437992002-04-12 09:54:03 +000017180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182exec 5>>config.log
17183{
17184 echo
17185 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17186## Running $as_me. ##
17187_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017188 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017194
Matthias Kloseb9621712010-04-24 17:59:49 +000017195cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196
17197# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017198for ac_config_target in $ac_config_targets
17199do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200 case $ac_config_target in
17201 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17202 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17203 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017204 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17205 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17207 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017208 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017209 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017210 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211
Victor Stinnere0be4232011-10-25 13:06:09 +020017212 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 esac
17214done
17215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216
Martin v. Löwis11437992002-04-12 09:54:03 +000017217# If the user did not use the arguments to specify the items to instantiate,
17218# then the envvar interface is used. Set only those that are not.
17219# We use the long form for the default assignment because of an extremely
17220# bizarre bug on SunOS 4.1.3.
17221if $ac_need_defaults; then
17222 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17223 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17224fi
17225
Skip Montanaro6dead952003-09-25 14:50:04 +000017226# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017227# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017228# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229# Hook for its removal unless debugging.
17230# Note that there is a small window in which the directory will not be cleaned:
17231# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017232$debug ||
17233{
Victor Stinnere0be4232011-10-25 13:06:09 +020017234 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017235 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017236 : "${ac_tmp:=$tmp}"
17237 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017239 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017240}
Martin v. Löwis11437992002-04-12 09:54:03 +000017241# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017242
Martin v. Löwis11437992002-04-12 09:54:03 +000017243{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017245 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017246} ||
17247{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248 tmp=./conf$$-$RANDOM
17249 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017250} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017251ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017252
Matthias Kloseb9621712010-04-24 17:59:49 +000017253# Set up the scripts for CONFIG_FILES section.
17254# No need to generate them if there are no CONFIG_FILES.
17255# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017257
Matthias Kloseb9621712010-04-24 17:59:49 +000017258
17259ac_cr=`echo X | tr X '\015'`
17260# On cygwin, bash can eat \r inside `` if the user requested igncr.
17261# But we know of no other shell where ac_cr would be empty at this
17262# point, so we can use a bashism as a fallback.
17263if test "x$ac_cr" = x; then
17264 eval ac_cr=\$\'\\r\'
17265fi
17266ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17267if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017268 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017269else
17270 ac_cs_awk_cr=$ac_cr
17271fi
17272
Victor Stinnere0be4232011-10-25 13:06:09 +020017273echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017274_ACEOF
17275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276
Matthias Kloseb9621712010-04-24 17:59:49 +000017277{
17278 echo "cat >conf$$subs.awk <<_ACEOF" &&
17279 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17280 echo "_ACEOF"
17281} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017282 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17283ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017284ac_delim='%!_!# '
17285for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017286 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017287 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288
Matthias Kloseb9621712010-04-24 17:59:49 +000017289 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17290 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291 break
17292 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017293 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294 else
17295 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017296 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297done
Matthias Kloseb9621712010-04-24 17:59:49 +000017298rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299
Matthias Kloseb9621712010-04-24 17:59:49 +000017300cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017301cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017303sed -n '
17304h
17305s/^/S["/; s/!.*/"]=/
17306p
17307g
17308s/^[^!]*!//
17309:repl
17310t repl
17311s/'"$ac_delim"'$//
17312t delim
17313:nl
17314h
17315s/\(.\{148\}\)..*/\1/
17316t more1
17317s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17318p
17319n
17320b repl
17321:more1
17322s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17323p
17324g
17325s/.\{148\}//
17326t nl
17327:delim
17328h
17329s/\(.\{148\}\)..*/\1/
17330t more2
17331s/["\\]/\\&/g; s/^/"/; s/$/"/
17332p
17333b
17334:more2
17335s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17336p
17337g
17338s/.\{148\}//
17339t delim
17340' <conf$$subs.awk | sed '
17341/^[^""]/{
17342 N
17343 s/\n//
17344}
17345' >>$CONFIG_STATUS || ac_write_fail=1
17346rm -f conf$$subs.awk
17347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17348_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017349cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 for (key in S) S_is_set[key] = 1
17351 FS = ""
17352
17353}
17354{
17355 line = $ 0
17356 nfields = split(line, field, "@")
17357 substed = 0
17358 len = length(field[1])
17359 for (i = 2; i < nfields; i++) {
17360 key = field[i]
17361 keylen = length(key)
17362 if (S_is_set[key]) {
17363 value = S[key]
17364 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17365 len += length(value) + length(field[++i])
17366 substed = 1
17367 } else
17368 len += 1 + keylen
17369 }
17370
17371 print line
17372}
17373
17374_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17377if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17378 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17379else
17380 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017381fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017382 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017383_ACEOF
17384
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017385# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17386# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387# trailing colons and then remove the whole line if VPATH becomes empty
17388# (actually we leave an empty line to preserve line numbers).
17389if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017390 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17391h
17392s///
17393s/^/:/
17394s/[ ]*$/:/
17395s/:\$(srcdir):/:/g
17396s/:\${srcdir}:/:/g
17397s/:@srcdir@:/:/g
17398s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017400x
17401s/\(=[ ]*\).*/\1/
17402G
17403s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404s/^[^=]*=[ ]*$//
17405}'
17406fi
17407
Matthias Kloseb9621712010-04-24 17:59:49 +000017408cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017409fi # test -n "$CONFIG_FILES"
17410
Matthias Kloseb9621712010-04-24 17:59:49 +000017411# Set up the scripts for CONFIG_HEADERS section.
17412# No need to generate them if there are no CONFIG_HEADERS.
17413# This happens for instance with `./config.status Makefile'.
17414if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017415cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017416BEGIN {
17417_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418
Matthias Kloseb9621712010-04-24 17:59:49 +000017419# Transform confdefs.h into an awk script `defines.awk', embedded as
17420# here-document in config.status, that substitutes the proper values into
17421# config.h.in to produce config.h.
17422
17423# Create a delimiter string that does not exist in confdefs.h, to ease
17424# handling of long lines.
17425ac_delim='%!_!# '
17426for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017427 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17428 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017429 break
17430 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017431 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017432 else
17433 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17434 fi
17435done
17436
17437# For the awk script, D is an array of macro values keyed by name,
17438# likewise P contains macro parameters if any. Preserve backslash
17439# newline sequences.
17440
17441ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17442sed -n '
17443s/.\{148\}/&'"$ac_delim"'/g
17444t rset
17445:rset
17446s/^[ ]*#[ ]*define[ ][ ]*/ /
17447t def
17448d
17449:def
17450s/\\$//
17451t bsnl
17452s/["\\]/\\&/g
17453s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17454D["\1"]=" \3"/p
17455s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17456d
17457:bsnl
17458s/["\\]/\\&/g
17459s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17460D["\1"]=" \3\\\\\\n"\\/p
17461t cont
17462s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17463t cont
17464d
17465:cont
17466n
17467s/.\{148\}/&'"$ac_delim"'/g
17468t clear
17469:clear
17470s/\\$//
17471t bsnlc
17472s/["\\]/\\&/g; s/^/"/; s/$/"/p
17473d
17474:bsnlc
17475s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17476b cont
17477' <confdefs.h | sed '
17478s/'"$ac_delim"'/"\\\
17479"/g' >>$CONFIG_STATUS || ac_write_fail=1
17480
17481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17482 for (key in D) D_is_set[key] = 1
17483 FS = ""
17484}
17485/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17486 line = \$ 0
17487 split(line, arg, " ")
17488 if (arg[1] == "#") {
17489 defundef = arg[2]
17490 mac1 = arg[3]
17491 } else {
17492 defundef = substr(arg[1], 2)
17493 mac1 = arg[2]
17494 }
17495 split(mac1, mac2, "(") #)
17496 macro = mac2[1]
17497 prefix = substr(line, 1, index(line, defundef) - 1)
17498 if (D_is_set[macro]) {
17499 # Preserve the white space surrounding the "#".
17500 print prefix "define", macro P[macro] D[macro]
17501 next
17502 } else {
17503 # Replace #undef with comments. This is necessary, for example,
17504 # in the case of _POSIX_SOURCE, which is predefined and required
17505 # on some systems where configure will not decide to define it.
17506 if (defundef == "undef") {
17507 print "/*", prefix defundef, macro, "*/"
17508 next
17509 }
17510 }
17511}
17512{ print }
17513_ACAWK
17514_ACEOF
17515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017516 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017517fi # test -n "$CONFIG_HEADERS"
17518
17519
17520eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17521shift
17522for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523do
17524 case $ac_tag in
17525 :[FHLC]) ac_mode=$ac_tag; continue;;
17526 esac
17527 case $ac_mode$ac_tag in
17528 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017529 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530 :[FH]-) ac_tag=-:-;;
17531 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17532 esac
17533 ac_save_IFS=$IFS
17534 IFS=:
17535 set x $ac_tag
17536 IFS=$ac_save_IFS
17537 shift
17538 ac_file=$1
17539 shift
17540
17541 case $ac_mode in
17542 :L) ac_source=$1;;
17543 :[FH])
17544 ac_file_inputs=
17545 for ac_f
17546 do
17547 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017548 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549 *) # Look for the file first in the build tree, then in the source tree
17550 # (if the path is not absolute). The absolute path cannot be DOS-style,
17551 # because $ac_f cannot contain `:'.
17552 test -f "$ac_f" ||
17553 case $ac_f in
17554 [\\/$]*) false;;
17555 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17556 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017557 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017559 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17560 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561 done
17562
17563 # Let's still pretend it is `configure' which instantiates (i.e., don't
17564 # use $as_me), people would be surprised to read:
17565 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017566 configure_input='Generated from '`
17567 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17568 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569 if test x"$ac_file" != x-; then
17570 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017571 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17572$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017574 # Neutralize special characters interpreted by sed in replacement strings.
17575 case $configure_input in #(
17576 *\&* | *\|* | *\\* )
17577 ac_sed_conf_input=`$as_echo "$configure_input" |
17578 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17579 *) ac_sed_conf_input=$configure_input;;
17580 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581
17582 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017583 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17584 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585 esac
17586 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017587 esac
17588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017590$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017591 X"$ac_file" : 'X\(//\)[^/]' \| \
17592 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017593 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017594$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17596 s//\1/
17597 q
17598 }
17599 /^X\(\/\/\)[^/].*/{
17600 s//\1/
17601 q
17602 }
17603 /^X\(\/\/\)$/{
17604 s//\1/
17605 q
17606 }
17607 /^X\(\/\).*/{
17608 s//\1/
17609 q
17610 }
17611 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017612 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017613 ac_builddir=.
17614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615case "$ac_dir" in
17616.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17617*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017620 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017621 case $ac_top_builddir_sub in
17622 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17623 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17624 esac ;;
17625esac
17626ac_abs_top_builddir=$ac_pwd
17627ac_abs_builddir=$ac_pwd$ac_dir_suffix
17628# for backward compatibility:
17629ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017630
17631case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634 ac_top_srcdir=$ac_top_builddir_sub
17635 ac_abs_top_srcdir=$ac_pwd ;;
17636 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638 ac_top_srcdir=$srcdir
17639 ac_abs_top_srcdir=$srcdir ;;
17640 *) # Relative name.
17641 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17642 ac_top_srcdir=$ac_top_build_prefix$srcdir
17643 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017644esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017645ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017646
Martin v. Löwis11437992002-04-12 09:54:03 +000017647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648 case $ac_mode in
17649 :F)
17650 #
17651 # CONFIG_FILE
17652 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017653
17654 case $INSTALL in
17655 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017657 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017658 ac_MKDIR_P=$MKDIR_P
17659 case $MKDIR_P in
17660 [\\/$]* | ?:[\\/]* ) ;;
17661 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17662 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017663_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664
Matthias Kloseb9621712010-04-24 17:59:49 +000017665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666# If the template does not know about datarootdir, expand it.
17667# FIXME: This hack should be removed a few years after 2.60.
17668ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017669ac_sed_dataroot='
17670/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 p
17672 q
17673}
17674/@datadir@/p
17675/@docdir@/p
17676/@infodir@/p
17677/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017678/@mandir@/p'
17679case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680*datarootdir*) ac_datarootdir_seen=yes;;
17681*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017682 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17683$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017685cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686 ac_datarootdir_hack='
17687 s&@datadir@&$datadir&g
17688 s&@docdir@&$docdir&g
17689 s&@infodir@&$infodir&g
17690 s&@localedir@&$localedir&g
17691 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017692 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693esac
17694_ACEOF
17695
17696# Neutralize VPATH when `$srcdir' = `.'.
17697# Shell code in configure.ac might set extrasub.
17698# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017699cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17700ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017701$extrasub
17702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017703cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017704:t
17705/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017706s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017708s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709s&@srcdir@&$ac_srcdir&;t t
17710s&@abs_srcdir@&$ac_abs_srcdir&;t t
17711s&@top_srcdir@&$ac_top_srcdir&;t t
17712s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17713s&@builddir@&$ac_builddir&;t t
17714s&@abs_builddir@&$ac_abs_builddir&;t t
17715s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17716s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017717s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017719"
Victor Stinnere0be4232011-10-25 13:06:09 +020017720eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17721 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017724 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17725 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17726 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017728which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017729$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017730which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017731
Victor Stinnere0be4232011-10-25 13:06:09 +020017732 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017733 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017734 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17735 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017736 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017737 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738 ;;
17739 :H)
17740 #
17741 # CONFIG_HEADER
17742 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017743 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017744 {
17745 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017746 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17747 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017748 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017749 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017750 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17751$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017754 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017755 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 fi
17757 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017758 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017759 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017760 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017761 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764
17765 esac
17766
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017767
17768 case $ac_file$ac_mode in
17769 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17770
17771 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772done # for ac_tag
17773
Guido van Rossum627b2d71993-12-24 10:39:16 +000017774
Matthias Kloseb9621712010-04-24 17:59:49 +000017775as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017776_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017777ac_clean_files=$ac_clean_files_save
17778
Matthias Kloseb9621712010-04-24 17:59:49 +000017779test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017780 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017781
Martin v. Löwis11437992002-04-12 09:54:03 +000017782
17783# configure is writing to config.log, and then calls config.status.
17784# config.status does its own redirection, appending to config.log.
17785# Unfortunately, on DOS this fails, as config.log is still kept open
17786# by configure, so config.status won't be able to write to it; its
17787# output is simply discarded. So we exec the FD to /dev/null,
17788# effectively closing config.log, so it can be properly (re)opened and
17789# appended to by config.status. When coming back to configure, we
17790# need to make the FD available again.
17791if test "$no_create" != yes; then
17792 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017793 ac_config_status_args=
17794 test "$silent" = yes &&
17795 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017796 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017797 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017798 exec 5>>config.log
17799 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17800 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017801 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017802fi
17803if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17805$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017806fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017807
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017808
Christian Heimes75ed8902013-11-20 01:11:18 +010017809echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017810if test ! -f Modules/Setup
17811then
17812 cp $srcdir/Modules/Setup.dist Modules/Setup
17813fi
17814
Christian Heimes75ed8902013-11-20 01:11:18 +010017815echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017816if test ! -f Modules/Setup.local
17817then
17818 echo "# Edit this file for local setup changes" >Modules/Setup.local
17819fi
17820
Christian Heimes75ed8902013-11-20 01:11:18 +010017821echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017822$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17823 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017824 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017825mv config.c Modules
Brett Cannon8c94f972016-09-06 17:15:21 -070017826
17827if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17828 echo "" >&6
17829 echo "" >&6
17830 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017831 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon8c94f972016-09-06 17:15:21 -070017832 echo "" >&6
17833 echo "" >&6
17834fi
17835