blob: 19fcbd128becff127374b3af4dc56f09f1e207a3 [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
Brett Cannon8c94f972016-09-06 17:15:21 -0700818with_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
Benjamin Peterson076ed002010-10-31 17:11:02 +00001489 --enable-loadable-sqlite-extensions
1490 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --enable-ipv6 Enable ipv6 (with ipv4) support
1492 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001493 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496Optional Packages:
1497 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1498 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001499 --with-universal-archs=ARCH
1500 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001501 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001502 --with-framework-name=FRAMEWORK
1503 specify an alternate name of the framework built
1504 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001506 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001507 --with-cxx-main=<compiler>
1508 compile main() and link python executable with C++
1509 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-suffix=.exe set executable suffix
1511 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00001512 --with-optimizations Enable expensive optimizations (PGO, maybe LTO,
Brett Cannon8c94f972016-09-06 17:15:21 -07001513 etc). Disabled by default.
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'
6546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6547$as_echo_n "checking for --with-optimizations... " >&6; }
6548
6549# Check whether --with-optimizations was given.
6550if test "${with_optimizations+set}" = set; then :
6551 withval=$with_optimizations;
6552if test "$withval" != no
6553then
6554 Py_OPT='true'
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6556$as_echo "yes" >&6; };
6557else
6558 Py_OPT='false'
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6560$as_echo "no" >&6; };
6561fi
6562else
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
6567if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006568 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6569 # compile working code using it and both test_distutils and test_gdb are
6570 # broken when you do managed to get a toolchain that works with it. People
6571 # who want LTO need to use --with-lto themselves.
Brett Cannon8c94f972016-09-06 17:15:21 -07006572 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006573 REQUIRE_PGO="yes"
Brett Cannon8c94f972016-09-06 17:15:21 -07006574 DEF_MAKE_RULE="build_all"
6575else
6576 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006577 REQUIRE_PGO="no"
Brett Cannon8c94f972016-09-06 17:15:21 -07006578 DEF_MAKE_RULE="all"
6579fi
6580
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006581# Enable LTO flags
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6584$as_echo_n "checking for --with-lto... " >&6; }
6585
6586# Check whether --with-lto was given.
6587if test "${with_lto+set}" = set; then :
6588 withval=$with_lto;
6589if test "$withval" != no
6590then
6591 Py_LTO='true'
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6593$as_echo "yes" >&6; };
6594else
6595 Py_LTO='false'
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6597$as_echo "no" >&6; };
6598fi
6599else
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6601$as_echo "no" >&6; }
6602fi
6603
6604if test "$Py_LTO" = 'true' ; then
6605 case $CC in
6606 *clang*)
6607 # Any changes made here should be reflected in the GCC+Darwin case below
6608 LTOFLAGS="-flto"
6609 ;;
6610 *gcc*)
6611 case $ac_sys_system in
6612 Darwin*)
6613 LTOFLAGS="-flto"
6614 ;;
6615 *)
6616 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6617 ;;
6618 esac
6619 ;;
6620 esac
6621fi
6622
Brett Cannon7188a3e2015-09-18 15:13:44 -07006623# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006624
6625
6626
6627
6628
Gregory P. Smith799520c2016-09-07 16:10:00 -07006629# Make this work on systems where llvm tools are not installed with their
6630# normal names in the default $PATH (ie: Ubuntu). They exist under the
6631# non-suffixed name in their versioned llvm directory.
6632llvm_bin_dir=''
6633llvm_path="${PATH}"
6634if test "${CC}" = "clang"
6635then
6636 clang_bin=`which clang`
6637 # Some systems install clang elsewhere as a symlink to the real path
6638 # which is where the related llvm tools are located.
6639 if test -L "${clang_bin}"
6640 then
6641 clang_dir=`dirname "${clang_bin}"`
6642 clang_bin=`readlink "${clang_bin}"`
6643 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6644 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6645 fi
6646fi
Zachary Ware5af85642015-12-21 12:09:17 -06006647
Gregory P. Smith799520c2016-09-07 16:10:00 -07006648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6649$as_echo_n "checking target system type... " >&6; }
6650if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006651 $as_echo_n "(cached) " >&6
6652else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006653 if test "x$target_alias" = x; then
6654 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006656 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6657 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6658fi
6659
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6662$as_echo "$ac_cv_target" >&6; }
6663case $ac_cv_target in
6664*-*-*) ;;
6665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6666esac
6667target=$ac_cv_target
6668ac_save_IFS=$IFS; IFS='-'
6669set x $ac_cv_target
6670shift
6671target_cpu=$1
6672target_vendor=$2
6673shift; shift
6674# Remember, the first character of IFS is used to create $*,
6675# except with old shells:
6676target_os=$*
6677IFS=$ac_save_IFS
6678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6679
6680
6681# The aliases save the names the user supplied, while $host etc.
6682# will get canonicalized.
6683test -n "$target_alias" &&
6684 test "$program_prefix$program_suffix$program_transform_name" = \
6685 NONENONEs,x,x, &&
6686 program_prefix=${target_alias}-
6687# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6688set dummy $target_alias-llvm-profdata; ac_word=$2
6689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6690$as_echo_n "checking for $ac_word... " >&6; }
6691if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6692 $as_echo_n "(cached) " >&6
6693else
6694 case $LLVM_PROFDATA in
6695 [\\/]* | ?:[\\/]*)
6696 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6697 ;;
6698 *)
6699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6700for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006701do
6702 IFS=$as_save_IFS
6703 test -z "$as_dir" && as_dir=.
6704 for ac_exec_ext in '' $ac_executable_extensions; do
6705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006706 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6708 break 2
6709 fi
6710done
6711 done
6712IFS=$as_save_IFS
6713
Gregory P. Smith799520c2016-09-07 16:10:00 -07006714 ;;
6715esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006716fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006717LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6718if test -n "$LLVM_PROFDATA"; then
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6720$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006721else
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723$as_echo "no" >&6; }
6724fi
6725
6726
Gregory P. Smith799520c2016-09-07 16:10:00 -07006727if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6728 if test "$build" = "$target"; then
6729 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6730 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6731set dummy llvm-profdata; ac_word=$2
6732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6733$as_echo_n "checking for $ac_word... " >&6; }
6734if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6735 $as_echo_n "(cached) " >&6
6736else
6737 case $ac_pt_LLVM_PROFDATA in
6738 [\\/]* | ?:[\\/]*)
6739 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6740 ;;
6741 *)
6742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6743for as_dir in ${llvm_path}
6744do
6745 IFS=$as_save_IFS
6746 test -z "$as_dir" && as_dir=.
6747 for ac_exec_ext in '' $ac_executable_extensions; do
6748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6749 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6751 break 2
6752 fi
6753done
6754 done
6755IFS=$as_save_IFS
6756
6757 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6758 ;;
6759esac
6760fi
6761ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6762if test -n "$ac_pt_LLVM_PROFDATA"; then
6763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6764$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6765else
6766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6767$as_echo "no" >&6; }
6768fi
6769
6770 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6771 else
6772 LLVM_PROFDATA="''"
6773 fi
6774else
6775 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6776fi
6777
6778
6779if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6780then
6781 LLVM_PROF_FOUND="found"
6782else
6783 LLVM_PROF_FOUND="not-found"
6784fi
6785if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6786then
6787 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6788 if test -n "${found_llvm_profdata}"
6789 then
6790 # llvm-profdata isn't directly in $PATH in some cases.
6791 # https://apple.stackexchange.com/questions/197053/
6792 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6793 LLVM_PROF_FOUND=found
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6795$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6796 fi
6797fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006798LLVM_PROF_ERR=no
6799case $CC in
6800 *clang*)
6801 # Any changes made here should be reflected in the GCC+Darwin case below
6802 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6803 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006805 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6806 if test $LLVM_PROF_FOUND = not-found
6807 then
6808 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006809 if test "${REQUIRE_PGO}" = "yes"
6810 then
6811 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6812 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813 fi
6814 ;;
6815 *gcc*)
6816 case $ac_sys_system in
6817 Darwin*)
6818 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6819 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006821 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006822 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006823 then
6824 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006825 if test "${REQUIRE_PGO}" = "yes"
6826 then
6827 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6828 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006829 fi
6830 ;;
6831 *)
6832 PGO_PROF_GEN_FLAG="-fprofile-generate"
6833 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6834 LLVM_PROF_MERGER="true"
6835 LLVM_PROF_FILE=""
6836 ;;
6837 esac
6838 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006839 *icc*)
6840 PGO_PROF_GEN_FLAG="-prof-gen"
6841 PGO_PROF_USE_FLAG="-prof-use"
6842 LLVM_PROF_MERGER="true"
6843 LLVM_PROF_FILE=""
6844 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006845esac
6846
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6848# merged with this chunk of code?
6849
6850# Optimizer/debugger flags
6851# ------------------------
6852# (The following bit of code is complicated enough - please keep things
6853# indented properly. Just pretend you're editing Python code. ;-)
6854
6855# There are two parallel sets of case statements below, one that checks to
6856# see if OPT was set and one that does BASECFLAGS setting based upon
6857# compiler and platform. BASECFLAGS tweaks need to be made even if the
6858# user set OPT.
6859
6860# tweak OPT based on compiler and platform, only if the user didn't set
6861# it on the command line
6862
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006863if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864then
6865 case $GCC in
6866 yes)
6867 if test "$CC" != 'g++' ; then
6868 STRICT_PROTO="-Wstrict-prototypes"
6869 fi
6870 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6871 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6872 WRAP="-fwrapv"
6873 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006874
6875 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006876 case $CC in
6877 *clang*) WRAP="-fwrapv"
6878 ;;
6879 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881 case $ac_cv_prog_cc_g in
6882 yes)
6883 if test "$Py_DEBUG" = 'true' ; then
6884 # Optimization messes up debuggers, so turn it off for
6885 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006886 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6887 OPT="-g -Og -Wall $STRICT_PROTO"
6888 else
6889 OPT="-g -O0 -Wall $STRICT_PROTO"
6890 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 else
6892 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6893 fi
6894 ;;
6895 *)
6896 OPT="-O3 -Wall $STRICT_PROTO"
6897 ;;
6898 esac
6899 case $ac_sys_system in
6900 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6901 ;;
6902 esac
6903 ;;
6904
6905 *)
6906 OPT="-O"
6907 ;;
6908 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909fi
6910
6911
6912
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914# The -arch flags for universal builds on OSX
6915UNIVERSAL_ARCH_FLAGS=
6916
6917
6918# tweak BASECFLAGS based on compiler and platform
6919case $GCC in
6920yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006921 # Python doesn't violate C99 aliasing rules, but older versions of
6922 # GCC produce warnings for legal Python code. Enable
6923 # -fno-strict-aliasing on versions of GCC that support but produce
6924 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6926$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927 ac_save_cc="$CC"
6928 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006929 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006930 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006932else
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006935
Matthias Kloseb159a552010-04-25 21:00:44 +00006936
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006937int
6938main ()
6939{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006940
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006941 ;
6942 return 0;
6943}
Matthias Kloseb159a552010-04-25 21:00:44 +00006944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006946if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006947
6948 CC="$ac_save_cc -fstrict-aliasing"
6949 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006951/* end confdefs.h. */
6952
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006953 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006954int
6955main ()
6956{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006957double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006958 ;
6959 return 0;
6960}
Matthias Kloseb159a552010-04-25 21:00:44 +00006961
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006963if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006964
6965 ac_cv_no_strict_aliasing=no
6966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967else
Matthias Kloseb159a552010-04-25 21:00:44 +00006968
6969 ac_cv_no_strict_aliasing=yes
6970
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006971fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006973
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006974else
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
6976 ac_cv_no_strict_aliasing=no
6977
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006980fi
6981
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006983 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6985$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006986 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006987 then
6988 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6989 fi
6990
Zachary Ware5af85642015-12-21 12:09:17 -06006991 # ICC doesn't recognize the option, but only emits a warning
6992 ## XXX does it emit an unused result warning and can it be disabled?
6993 case "$CC" in
6994 *icc*)
6995 ac_cv_disable_unused_result_warning=no
6996 ;;
6997 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6999$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7000 ac_save_cc="$CC"
7001 CC="$CC -Wunused-result -Werror"
7002 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007003 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007004 $as_echo_n "(cached) " >&6
7005else
7006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7007/* end confdefs.h. */
7008
7009
7010int
7011main ()
7012{
7013
7014 ;
7015 return 0;
7016}
7017
7018_ACEOF
7019if ac_fn_c_try_compile "$LINENO"; then :
7020
7021 ac_cv_disable_unused_result_warning=yes
7022
7023else
7024
7025 ac_cv_disable_unused_result_warning=no
7026
7027fi
7028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7029fi
7030
7031 CFLAGS="$save_CFLAGS"
7032 CC="$ac_save_cc"
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7034$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007035 ;;
7036 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007037
7038 if test $ac_cv_disable_unused_result_warning = yes
7039 then
7040 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
7041 fi
7042
Benjamin Petersoncc00e012013-05-20 08:22:04 -07007043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
7044$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
7045 ac_save_cc="$CC"
7046 CC="$CC -Werror=declaration-after-statement"
7047 save_CFLAGS="$CFLAGS"
7048 if ${ac_cv_declaration_after_statement_warning+:} false; then :
7049 $as_echo_n "(cached) " >&6
7050else
7051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7052/* end confdefs.h. */
7053
7054
7055int
7056main ()
7057{
7058
7059 ;
7060 return 0;
7061}
7062
7063_ACEOF
7064if ac_fn_c_try_compile "$LINENO"; then :
7065
7066 ac_cv_declaration_after_statement_warning=yes
7067
7068else
7069
7070 ac_cv_declaration_after_statement_warning=no
7071
7072fi
7073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7074fi
7075
7076 CFLAGS="$save_CFLAGS"
7077 CC="$ac_save_cc"
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
7079$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
7080
7081 if test $ac_cv_declaration_after_statement_warning = yes
7082 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007083 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07007084 fi
7085
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7087$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7088 ac_save_cc="$CC"
7089 CC="$CC -Wsign-compare"
7090 save_CFLAGS="$CFLAGS"
7091 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7092 $as_echo_n "(cached) " >&6
7093else
7094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7095/* end confdefs.h. */
7096
7097
7098int
7099main ()
7100{
7101
7102 ;
7103 return 0;
7104}
7105
7106_ACEOF
7107if ac_fn_c_try_compile "$LINENO"; then :
7108
7109 ac_cv_enable_sign_compare_warning=yes
7110
7111else
7112
7113 ac_cv_enable_sign_compare_warning=no
7114
7115fi
7116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117fi
7118
7119 CFLAGS="$save_CFLAGS"
7120 CC="$ac_save_cc"
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7122$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7123
7124 if test $ac_cv_enable_sign_compare_warning = yes
7125 then
7126 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7127 fi
7128
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7130$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7131 ac_save_cc="$CC"
7132 CC="$CC -Wunreachable-code"
7133 save_CFLAGS="$CFLAGS"
7134 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7135 $as_echo_n "(cached) " >&6
7136else
7137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7138/* end confdefs.h. */
7139
7140
7141int
7142main ()
7143{
7144
7145 ;
7146 return 0;
7147}
7148
7149_ACEOF
7150if ac_fn_c_try_compile "$LINENO"; then :
7151
7152 ac_cv_enable_unreachable_code_warning=yes
7153
7154else
7155
7156 ac_cv_enable_unreachable_code_warning=no
7157
7158fi
7159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7160fi
7161
7162 CFLAGS="$save_CFLAGS"
7163 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007164
7165 # Don't enable unreachable code warning in debug mode, since it usually
7166 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007167 # Issue #24324: Unfortunately, the unreachable code warning does not work
7168 # correctly on gcc and has been silently removed from the compiler.
7169 # It is supported on clang but on OS X systems gcc may be an alias
7170 # for clang. Try to determine if the compiler is not really gcc and,
7171 # if so, only then enable the warning.
7172 if test $ac_cv_enable_unreachable_code_warning = yes && \
7173 test "$Py_DEBUG" != "true" && \
7174 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007175 then
7176 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007177 else
7178 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007179 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7181$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007182
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007183 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7184 # support. Without this, treatment of subnormals doesn't follow
7185 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007186 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007187 alpha*)
7188 BASECFLAGS="$BASECFLAGS -mieee"
7189 ;;
7190 esac
7191
7192 case $ac_sys_system in
7193 SCO_SV*)
7194 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7195 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007196
7197 # is there any other compiler on Darwin besides gcc?
7198 Darwin*)
7199 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7200 # used to be here, but non-Apple gcc doesn't accept them.
7201 if test "${CC}" = gcc
7202 then
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007204$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007205 case "${UNIVERSALSDK}" in
7206 */MacOSX10.4u.sdk)
7207 # Build using 10.4 SDK, force usage of gcc when the
7208 # compiler is gcc, otherwise the user will get very
7209 # confusing error messages when building on OSX 10.6
7210 CC=gcc-4.0
7211 CPP=cpp-4.0
7212 ;;
7213 esac
7214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007215$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007216 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217
Ned Deily87adb6e2013-10-18 21:09:56 -07007218 if test "${enable_universalsdk}"
7219 then
7220 case "$UNIVERSAL_ARCHS" in
7221 32-bit)
7222 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7223 LIPO_32BIT_FLAGS=""
7224 ARCH_RUN_32BIT=""
7225 ;;
7226 64-bit)
7227 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7228 LIPO_32BIT_FLAGS=""
7229 ARCH_RUN_32BIT="true"
7230 ;;
7231 all)
7232 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7233 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7234 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7235 ;;
7236 intel)
7237 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7238 LIPO_32BIT_FLAGS="-extract i386"
7239 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7240 ;;
7241 intel-32)
7242 UNIVERSAL_ARCH_FLAGS="-arch i386"
7243 LIPO_32BIT_FLAGS=""
7244 ARCH_RUN_32BIT=""
7245 ;;
7246 3-way)
7247 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7248 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7249 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7250 ;;
7251 *)
7252 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7253 ;;
7254 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255
Ned Deily87adb6e2013-10-18 21:09:56 -07007256 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7257 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7258 if test "${UNIVERSALSDK}" != "/"
7259 then
7260 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7261 fi
7262 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263
Ned Deily87adb6e2013-10-18 21:09:56 -07007264 # Calculate an appropriate deployment target for this build:
7265 # The deployment target value is used explicitly to enable certain
7266 # features are enabled (such as builtin libedit support for readline)
Martin Panter0be894b2016-09-07 12:03:06 +00007267 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007268 # component of the string returned by distutils.get_platform().
7269 #
7270 # Use the value from:
7271 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7272 # 2. the operating system version of the build machine if >= 10.6
7273 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7274 # below to pick either 10.3, 10.4, or 10.5 as the target.
7275 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007276
Ned Deily87adb6e2013-10-18 21:09:56 -07007277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7278$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007279 cur_target_major=`sw_vers -productVersion | \
7280 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7281 cur_target_minor=`sw_vers -productVersion | \
7282 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7283 cur_target="${cur_target_major}.${cur_target_minor}"
7284 if test ${cur_target_major} -eq 10 && \
7285 test ${cur_target_minor} -ge 3 && \
7286 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007287 then
Ned Deily36820b62014-06-25 13:44:22 -07007288 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007289 cur_target=10.3
7290 if test ${enable_universalsdk}
7291 then
7292 case "$UNIVERSAL_ARCHS" in
7293 all|3-way|intel|64-bit)
7294 # These configurations were first supported in 10.5
7295 cur_target='10.5'
7296 ;;
7297 esac
7298 else
7299 if test `/usr/bin/arch` = "i386"
7300 then
7301 # 10.4 was the first release to support Intel archs
7302 cur_target="10.4"
7303 fi
7304 fi
7305 fi
7306 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007307
Ned Deily87adb6e2013-10-18 21:09:56 -07007308 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7309 # environment with a value that is the same as what we'll use
7310 # in the Makefile to ensure that we'll get the same compiler
7311 # environment during configure and build time.
7312 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7313 export MACOSX_DEPLOYMENT_TARGET
7314 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7316$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007317
Ned Deily87adb6e2013-10-18 21:09:56 -07007318 # end of Darwin* tests
7319 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320 esac
7321 ;;
7322
7323*)
7324 case $ac_sys_system in
7325 OpenUNIX*|UnixWare*)
7326 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7327 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007328 SCO_SV*)
7329 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7330 ;;
7331 esac
7332 ;;
7333esac
7334
Zachary Ware5af85642015-12-21 12:09:17 -06007335# ICC needs -fp-model strict or floats behave badly
7336case "$CC" in
7337*icc*)
7338 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7339 ;;
7340esac
7341
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342if test "$Py_DEBUG" = 'true'; then
7343 :
7344else
7345 OPT="-DNDEBUG $OPT"
7346fi
7347
7348if test "$ac_arch_flags"
7349then
7350 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7351fi
7352
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353# On some compilers, pthreads are available without further options
7354# (e.g. MacOS X). On some of these systems, the compiler will not
7355# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7356# So we have to see first whether pthreads are available without
7357# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7359$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007360if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362else
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364 ac_cv_pthread_is_default=no
7365else
Matthias Kloseb9621712010-04-24 17:59:49 +00007366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367/* end confdefs.h. */
7368
Stefan Krah7dba5942012-11-22 22:49:11 +01007369#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370#include <pthread.h>
7371
7372void* routine(void* p){return NULL;}
7373
7374int main(){
7375 pthread_t p;
7376 if(pthread_create(&p,NULL,routine,NULL)!=0)
7377 return 1;
7378 (void)pthread_detach(p);
7379 return 0;
7380}
7381
7382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007383if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384
7385 ac_cv_pthread_is_default=yes
7386 ac_cv_kthread=no
7387 ac_cv_pthread=no
7388
7389else
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394fi
7395
7396
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397fi
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7400$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401
7402
7403if test $ac_cv_pthread_is_default = yes
7404then
7405 ac_cv_kpthread=no
7406else
7407# -Kpthread, if available, provides the right #defines
7408# and linker options to make pthread_create available
7409# Some compilers won't report that they do not support -Kpthread,
7410# so we need to run a program to see whether it really made the
7411# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7413$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007414if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416else
7417 ac_save_cc="$CC"
7418CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007419if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420 ac_cv_kpthread=no
7421else
Matthias Kloseb9621712010-04-24 17:59:49 +00007422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423/* end confdefs.h. */
7424
Stefan Krah7dba5942012-11-22 22:49:11 +01007425#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426#include <pthread.h>
7427
7428void* routine(void* p){return NULL;}
7429
7430int main(){
7431 pthread_t p;
7432 if(pthread_create(&p,NULL,routine,NULL)!=0)
7433 return 1;
7434 (void)pthread_detach(p);
7435 return 0;
7436}
7437
7438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007439if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440 ac_cv_kpthread=yes
7441else
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446fi
7447
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448CC="$ac_save_cc"
7449fi
7450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7452$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453fi
7454
7455if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7456then
7457# -Kthread, if available, provides the right #defines
7458# and linker options to make pthread_create available
7459# Some compilers won't report that they do not support -Kthread,
7460# so we need to run a program to see whether it really made the
7461# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7463$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007464if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466else
7467 ac_save_cc="$CC"
7468CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007469if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470 ac_cv_kthread=no
7471else
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473/* end confdefs.h. */
7474
Stefan Krah7dba5942012-11-22 22:49:11 +01007475#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476#include <pthread.h>
7477
7478void* routine(void* p){return NULL;}
7479
7480int main(){
7481 pthread_t p;
7482 if(pthread_create(&p,NULL,routine,NULL)!=0)
7483 return 1;
7484 (void)pthread_detach(p);
7485 return 0;
7486}
7487
7488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007489if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490 ac_cv_kthread=yes
7491else
Matthias Kloseb9621712010-04-24 17:59:49 +00007492 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496fi
7497
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498CC="$ac_save_cc"
7499fi
7500
Matthias Kloseb9621712010-04-24 17:59:49 +00007501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7502$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503fi
7504
7505if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7506then
7507# -pthread, if available, provides the right #defines
7508# and linker options to make pthread_create available
7509# Some compilers won't report that they do not support -pthread,
7510# so we need to run a program to see whether it really made the
7511# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7513$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007514if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007515 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516else
7517 ac_save_cc="$CC"
7518CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007519if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520 ac_cv_pthread=no
7521else
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523/* end confdefs.h. */
7524
Stefan Krah7dba5942012-11-22 22:49:11 +01007525#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526#include <pthread.h>
7527
7528void* routine(void* p){return NULL;}
7529
7530int main(){
7531 pthread_t p;
7532 if(pthread_create(&p,NULL,routine,NULL)!=0)
7533 return 1;
7534 (void)pthread_detach(p);
7535 return 0;
7536}
7537
7538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007539if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540 ac_cv_pthread=yes
7541else
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
7547
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548CC="$ac_save_cc"
7549fi
7550
Matthias Kloseb9621712010-04-24 17:59:49 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7552$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553fi
7554
7555# If we have set a CC compiler flag for thread support then
7556# check if it works for CXX, too.
7557ac_cv_cxx_thread=no
7558if test ! -z "$CXX"
7559then
Matthias Kloseb9621712010-04-24 17:59:49 +00007560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7561$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562ac_save_cxx="$CXX"
7563
7564if test "$ac_cv_kpthread" = "yes"
7565then
7566 CXX="$CXX -Kpthread"
7567 ac_cv_cxx_thread=yes
7568elif test "$ac_cv_kthread" = "yes"
7569then
7570 CXX="$CXX -Kthread"
7571 ac_cv_cxx_thread=yes
7572elif test "$ac_cv_pthread" = "yes"
7573then
7574 CXX="$CXX -pthread"
7575 ac_cv_cxx_thread=yes
7576fi
7577
7578if test $ac_cv_cxx_thread = yes
7579then
7580 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7581 $CXX -c conftest.$ac_ext 2>&5
7582 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7583 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7584 then
7585 ac_cv_cxx_thread=yes
7586 else
7587 ac_cv_cxx_thread=no
7588 fi
7589 rm -fr conftest*
7590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7592$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593fi
7594CXX="$ac_save_cxx"
7595
7596
7597# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7599$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007600if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007601 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602else
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604/* end confdefs.h. */
7605#include <stdlib.h>
7606#include <stdarg.h>
7607#include <string.h>
7608#include <float.h>
7609
7610int
7611main ()
7612{
7613
7614 ;
7615 return 0;
7616}
7617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007618if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619 ac_cv_header_stdc=yes
7620else
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7624
7625if test $ac_cv_header_stdc = yes; then
7626 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628/* end confdefs.h. */
7629#include <string.h>
7630
7631_ACEOF
7632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 $EGREP "memchr" >/dev/null 2>&1; then :
7634
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635else
7636 ac_cv_header_stdc=no
7637fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007638rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639
7640fi
7641
7642if test $ac_cv_header_stdc = yes; then
7643 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645/* end confdefs.h. */
7646#include <stdlib.h>
7647
7648_ACEOF
7649if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 $EGREP "free" >/dev/null 2>&1; then :
7651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652else
7653 ac_cv_header_stdc=no
7654fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007655rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656
7657fi
7658
7659if test $ac_cv_header_stdc = yes; then
7660 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662 :
7663else
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665/* end confdefs.h. */
7666#include <ctype.h>
7667#include <stdlib.h>
7668#if ((' ' & 0x0FF) == 0x020)
7669# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7670# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7671#else
7672# define ISLOWER(c) \
7673 (('a' <= (c) && (c) <= 'i') \
7674 || ('j' <= (c) && (c) <= 'r') \
7675 || ('s' <= (c) && (c) <= 'z'))
7676# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7677#endif
7678
7679#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7680int
7681main ()
7682{
7683 int i;
7684 for (i = 0; i < 256; i++)
7685 if (XOR (islower (i), ISLOWER (i))
7686 || toupper (i) != TOUPPER (i))
7687 return 2;
7688 return 0;
7689}
7690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007691if ac_fn_c_try_run "$LINENO"; then :
7692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693else
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698fi
7699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700fi
7701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7703$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704if test $ac_cv_header_stdc = yes; then
7705
Matthias Kloseb9621712010-04-24 17:59:49 +00007706$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707
7708fi
7709
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007710for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007711fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007712ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007713sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007714unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007715poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007716sys/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 +01007717sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007718sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007719sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007720sys/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 -07007721libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007722bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007723sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007724do :
7725 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7726ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007727if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007729#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007730_ACEOF
7731
7732fi
7733
Guido van Rossum627b2d71993-12-24 10:39:16 +00007734done
7735
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007737for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7740$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007741if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007743else
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007745/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007746#include <sys/types.h>
7747#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007748
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
7751{
7752if ((DIR *) 0)
7753return 0;
7754 ;
7755 return 0;
7756}
7757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007758if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765eval ac_res=\$$as_ac_Header
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7767$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007768if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007770#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007771_ACEOF
7772
7773ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007775
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776done
7777# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7778if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7780$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007781if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007783else
Martin v. Löwis11437992002-04-12 09:54:03 +00007784 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788/* Override any GCC internal prototype to avoid an error.
7789 Use char because int might match the return type of a GCC
7790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007791#ifdef __cplusplus
7792extern "C"
7793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007794char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007795int
7796main ()
7797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 ;
7800 return 0;
7801}
7802_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803for ac_lib in '' dir; do
7804 if test -z "$ac_lib"; then
7805 ac_res="none required"
7806 else
7807 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007808 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007813rm -f core conftest.err conftest.$ac_objext \
7814 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007815 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818done
Victor Stinnere0be4232011-10-25 13:06:09 +02007819if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821else
7822 ac_cv_search_opendir=no
7823fi
7824rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007825LIBS=$ac_func_search_save_LIBS
7826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7828$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007830if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007832
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007833fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007834
Michael W. Hudson54241132001-12-07 15:38:26 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7837$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007838if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007840else
7841 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845/* Override any GCC internal prototype to avoid an error.
7846 Use char because int might match the return type of a GCC
7847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007848#ifdef __cplusplus
7849extern "C"
7850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007851char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007852int
7853main ()
7854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 ;
7857 return 0;
7858}
7859_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860for ac_lib in '' x; do
7861 if test -z "$ac_lib"; then
7862 ac_res="none required"
7863 else
7864 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007865 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870rm -f core conftest.err conftest.$ac_objext \
7871 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007872 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875done
Victor Stinnere0be4232011-10-25 13:06:09 +02007876if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878else
7879 ac_cv_search_opendir=no
7880fi
7881rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007882LIBS=$ac_func_search_save_LIBS
7883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7885$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007887if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007889
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007890fi
7891
7892fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007893
Matthias Kloseb9621712010-04-24 17:59:49 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7895$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007896if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007898else
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007900/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007901#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007902int
7903main ()
7904{
7905return makedev(0, 0);
7906 ;
7907 return 0;
7908}
7909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007910if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007911 ac_cv_header_sys_types_h_makedev=yes
7912else
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915rm -f core conftest.err conftest.$ac_objext \
7916 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007917
7918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7920$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007921
7922if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007923ac_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 +02007924if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007925
Matthias Kloseb9621712010-04-24 17:59:49 +00007926$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007927
7928fi
7929
7930
7931
7932 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 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 +02007934if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007935
Matthias Kloseb9621712010-04-24 17:59:49 +00007936$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007937
7938fi
7939
7940
7941 fi
7942fi
7943
Michael W. Hudson54241132001-12-07 15:38:26 +00007944
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007945# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7946for ac_header in net/if.h
7947do :
7948 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7949#ifdef STDC_HEADERS
7950# include <stdlib.h>
7951# include <stddef.h>
7952#else
7953# ifdef HAVE_STDLIB_H
7954# include <stdlib.h>
7955# endif
7956#endif
7957#ifdef HAVE_SYS_SOCKET_H
7958# include <sys/socket.h>
7959#endif
7960
7961"
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007963 cat >>confdefs.h <<_ACEOF
7964#define HAVE_NET_IF_H 1
7965_ACEOF
7966
7967fi
7968
7969done
7970
7971
Martin v. Löwis11017b12006-01-14 18:12:57 +00007972# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007973for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007974do :
7975 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 +00007976#ifdef HAVE_ASM_TYPES_H
7977#include <asm/types.h>
7978#endif
7979#ifdef HAVE_SYS_SOCKET_H
7980#include <sys/socket.h>
7981#endif
7982
Matthias Kloseb9621712010-04-24 17:59:49 +00007983"
Victor Stinnere0be4232011-10-25 13:06:09 +02007984if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007985 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007986#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007987_ACEOF
7988
7989fi
7990
7991done
7992
7993
Charles-François Natali47413c12011-10-06 19:47:44 +02007994# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007995for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007996do :
7997 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7998ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7999#ifdef HAVE_SYS_SOCKET_H
8000#include <sys/socket.h>
8001#endif
8002
8003"
8004if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8005 cat >>confdefs.h <<_ACEOF
8006#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8007_ACEOF
8008
8009fi
8010
8011done
8012
8013
Guido van Rossum627b2d71993-12-24 10:39:16 +00008014# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008015was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8017$as_echo_n "checking for clock_t in time.h... " >&6; }
8018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008019/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008020#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008021
8022_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008025 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008026else
Martin v. Löwis11437992002-04-12 09:54:03 +00008027
8028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008030
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008031
Guido van Rossum627b2d71993-12-24 10:39:16 +00008032fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008033rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8036$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8039$as_echo_n "checking for makedev... " >&6; }
8040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008041/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008042
Jesus Cea740f53a2010-04-28 11:35:30 +00008043#if defined(MAJOR_IN_MKDEV)
8044#include <sys/mkdev.h>
8045#elif defined(MAJOR_IN_SYSMACROS)
8046#include <sys/sysmacros.h>
8047#else
8048#include <sys/types.h>
8049#endif
8050
Neal Norwitz11690112002-07-30 01:08:28 +00008051int
8052main ()
8053{
Jesus Cea740f53a2010-04-28 11:35:30 +00008054
8055 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008056 ;
8057 return 0;
8058}
Matthias Kloseb159a552010-04-25 21:00:44 +00008059
Neal Norwitz11690112002-07-30 01:08:28 +00008060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008061if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008062 ac_cv_has_makedev=yes
8063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008066rm -f core conftest.err conftest.$ac_objext \
8067 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8069$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008070if test "$ac_cv_has_makedev" = "yes"; then
8071
Matthias Kloseb9621712010-04-24 17:59:49 +00008072$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008073
8074fi
8075
Christian Heimes985ecdc2013-11-20 11:46:18 +01008076# byte swapping
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8078$as_echo_n "checking for le64toh... " >&6; }
8079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8080/* end confdefs.h. */
8081
8082#ifdef HAVE_ENDIAN_H
8083#include <endian.h>
8084#elif defined(HAVE_SYS_ENDIAN_H)
8085#include <sys/endian.h>
8086#endif
8087
8088int
8089main ()
8090{
8091
8092 le64toh(1)
8093 ;
8094 return 0;
8095}
8096
8097_ACEOF
8098if ac_fn_c_try_link "$LINENO"; then :
8099 ac_cv_has_le64toh=yes
8100else
8101 ac_cv_has_le64toh=no
8102fi
8103rm -f core conftest.err conftest.$ac_objext \
8104 conftest$ac_exeext conftest.$ac_ext
8105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8106$as_echo "$ac_cv_has_le64toh" >&6; }
8107if test "$ac_cv_has_le64toh" = "yes"; then
8108
8109$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8110
8111fi
8112
Martin v. Löwis399a6892002-10-04 10:22:02 +00008113# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8114# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8115# defined, but the compiler does not support pragma redefine_extname,
8116# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8117# structures (such as rlimit64) without declaring them. As a
8118# work-around, disable LFS on such configurations
8119
8120use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8122$as_echo_n "checking Solaris LFS bug... " >&6; }
8123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008124/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008125
8126#define _LARGEFILE_SOURCE 1
8127#define _FILE_OFFSET_BITS 64
8128#include <sys/resource.h>
8129
Martin v. Löwis399a6892002-10-04 10:22:02 +00008130int
8131main ()
8132{
8133struct rlimit foo;
8134 ;
8135 return 0;
8136}
8137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008139 sol_lfs_bug=no
8140else
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8145$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008146if test "$sol_lfs_bug" = "yes"; then
8147 use_lfs=no
8148fi
8149
8150if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008151# Two defines needed to enable largefile support on various platforms
8152# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008153case $ac_sys_system/$ac_sys_release in
8154AIX*)
8155
8156$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8157
8158 ;;
8159esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008165
Martin v. Löwis399a6892002-10-04 10:22:02 +00008166fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008167
Guido van Rossum84e7b241996-08-19 21:59:00 +00008168# Add some code to confdefs.h so that the test for off_t works on SCO
8169cat >> confdefs.h <<\EOF
8170#if defined(SCO_DS)
8171#undef _OFF_T
8172#endif
8173EOF
8174
Guido van Rossumef2255b2000-03-10 22:30:29 +00008175# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008176ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008177if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008179else
Martin v. Löwis11437992002-04-12 09:54:03 +00008180
8181cat >>confdefs.h <<_ACEOF
8182#define mode_t int
8183_ACEOF
8184
8185fi
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008188if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008190else
Martin v. Löwis11437992002-04-12 09:54:03 +00008191
8192cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008194_ACEOF
8195
8196fi
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008199if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008201else
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
8203cat >>confdefs.h <<_ACEOF
8204#define pid_t int
8205_ACEOF
8206
8207fi
8208
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008209
Martin v. Löwis11437992002-04-12 09:54:03 +00008210cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008211#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008212_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008215if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008217else
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
8219cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008221_ACEOF
8222
8223fi
8224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8226$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008227if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008231/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008232#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008233
8234_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008237 ac_cv_type_uid_t=yes
8238else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008239 ac_cv_type_uid_t=no
8240fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008241rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008242
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8245$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008246if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
8250
Matthias Kloseb9621712010-04-24 17:59:49 +00008251$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008252
8253fi
8254
Mark Dickinson983bc162012-12-02 12:11:38 +00008255
8256# There are two separate checks for each of the exact-width integer types we
8257# need. First we check whether the type is available using the usual
8258# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8259# and <stdint.h> where available). We then also use the special type checks of
8260# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8261# directly, #define's uint32_t to be a suitable type.
8262
8263ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8264if test "x$ac_cv_type_uint32_t" = xyes; then :
8265
8266$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8267
8268fi
8269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8271case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008272 no|yes) ;; #(
8273 *)
8274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008276
8277
8278cat >>confdefs.h <<_ACEOF
8279#define uint32_t $ac_cv_c_uint32_t
8280_ACEOF
8281;;
8282 esac
8283
Mark Dickinson983bc162012-12-02 12:11:38 +00008284
8285ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8286if test "x$ac_cv_type_uint64_t" = xyes; then :
8287
8288$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8289
8290fi
8291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8293case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008294 no|yes) ;; #(
8295 *)
8296
Matthias Kloseb9621712010-04-24 17:59:49 +00008297$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008298
8299
8300cat >>confdefs.h <<_ACEOF
8301#define uint64_t $ac_cv_c_uint64_t
8302_ACEOF
8303;;
8304 esac
8305
Mark Dickinson983bc162012-12-02 12:11:38 +00008306
8307ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8308if test "x$ac_cv_type_int32_t" = xyes; then :
8309
8310$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8311
8312fi
8313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8315case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008316 no|yes) ;; #(
8317 *)
8318
8319cat >>confdefs.h <<_ACEOF
8320#define int32_t $ac_cv_c_int32_t
8321_ACEOF
8322;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008323esac
8324
Mark Dickinson983bc162012-12-02 12:11:38 +00008325
8326ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8327if test "x$ac_cv_type_int64_t" = xyes; then :
8328
8329$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8330
8331fi
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8334case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008335 no|yes) ;; #(
8336 *)
8337
8338cat >>confdefs.h <<_ACEOF
8339#define int64_t $ac_cv_c_int64_t
8340_ACEOF
8341;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008342esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008343
Mark Dickinson983bc162012-12-02 12:11:38 +00008344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008346if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008349
8350fi
8351
Stefan Krah1919b7e2012-03-21 18:25:23 +01008352ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8353if test "x$ac_cv_type___uint128_t" = xyes; then :
8354
8355$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8356
8357fi
8358
Jack Jansendd19cf82001-12-06 22:36:17 +00008359
Michael W. Hudson54241132001-12-07 15:38:26 +00008360# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008361# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362# The cast to long int works around a bug in the HP C Compiler
8363# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8364# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8365# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8367$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 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 +00008372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 if test "$ac_cv_type_int" = yes; then
8375 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008377as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008378See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379 else
8380 ac_cv_sizeof_int=0
8381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008383
Martin v. Löwis11437992002-04-12 09:54:03 +00008384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8386$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387
8388
8389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008391#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008392_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008393
8394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395# The cast to long int works around a bug in the HP C Compiler
8396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8398# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8400$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008401if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008403else
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 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 +00008405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406else
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 if test "$ac_cv_type_long" = yes; then
8408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008410as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008411See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412 else
8413 ac_cv_sizeof_long=0
8414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8419$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420
8421
8422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008424#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008425_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008426
8427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428# The cast to long int works around a bug in the HP C Compiler
8429# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8430# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8431# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8433$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008434if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008436else
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 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 +00008438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439else
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 if test "$ac_cv_type_void_p" = yes; then
8441 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8442$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008443as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008444See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445 else
8446 ac_cv_sizeof_void_p=0
8447 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449
Martin v. Löwis11437992002-04-12 09:54:03 +00008450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8452$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453
8454
8455
Martin v. Löwis11437992002-04-12 09:54:03 +00008456cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008457#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008458_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008459
8460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461# The cast to long int works around a bug in the HP C Compiler
8462# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8463# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8464# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8466$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008467if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008469else
Matthias Kloseb9621712010-04-24 17:59:49 +00008470 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 +00008471
Martin v. Löwis11437992002-04-12 09:54:03 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 if test "$ac_cv_type_short" = yes; then
8474 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008476as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008477See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478 else
8479 ac_cv_sizeof_short=0
8480 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8485$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486
8487
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008490#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008491_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008492
8493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494# The cast to long int works around a bug in the HP C Compiler
8495# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8496# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8497# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8499$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008500if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008502else
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 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 +00008504
Martin v. Löwis11437992002-04-12 09:54:03 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 if test "$ac_cv_type_float" = yes; then
8507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008509as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008510See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511 else
8512 ac_cv_sizeof_float=0
8513 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8518$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519
8520
8521
Martin v. Löwis11437992002-04-12 09:54:03 +00008522cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008523#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008524_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008525
8526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527# The cast to long int works around a bug in the HP C Compiler
8528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8530# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8532$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008533if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008535else
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 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 +00008537
Martin v. Löwis11437992002-04-12 09:54:03 +00008538else
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 if test "$ac_cv_type_double" = yes; then
8540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008542as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008543See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544 else
8545 ac_cv_sizeof_double=0
8546 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008548
Martin v. Löwis11437992002-04-12 09:54:03 +00008549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8551$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552
8553
8554
Martin v. Löwis11437992002-04-12 09:54:03 +00008555cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008556#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008557_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008558
8559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560# The cast to long int works around a bug in the HP C Compiler
8561# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8562# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8563# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8565$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008566if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008568else
Matthias Kloseb9621712010-04-24 17:59:49 +00008569 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 +00008570
Martin v. Löwis11437992002-04-12 09:54:03 +00008571else
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 if test "$ac_cv_type_fpos_t" = yes; then
8573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008575as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008576See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577 else
8578 ac_cv_sizeof_fpos_t=0
8579 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8584$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585
8586
8587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008589#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008590_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008591
Michael W. Hudson54241132001-12-07 15:38:26 +00008592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593# The cast to long int works around a bug in the HP C Compiler
8594# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8595# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8596# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8598$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008599if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008601else
Matthias Kloseb9621712010-04-24 17:59:49 +00008602 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 +00008603
Martin v. Löwis18e16552006-02-15 17:27:45 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 if test "$ac_cv_type_size_t" = yes; then
8606 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008608as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008609See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 else
8611 ac_cv_sizeof_size_t=0
8612 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008614
Martin v. Löwis18e16552006-02-15 17:27:45 +00008615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8617$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618
8619
8620
Martin v. Löwis18e16552006-02-15 17:27:45 +00008621cat >>confdefs.h <<_ACEOF
8622#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8623_ACEOF
8624
8625
Christian Heimes400adb02008-02-01 08:12:03 +00008626# The cast to long int works around a bug in the HP C Compiler
8627# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8628# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8629# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8631$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008632if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008634else
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 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 +00008636
Christian Heimes400adb02008-02-01 08:12:03 +00008637else
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 if test "$ac_cv_type_pid_t" = yes; then
8639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008641as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008642See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008643 else
8644 ac_cv_sizeof_pid_t=0
8645 fi
8646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008647
Christian Heimes400adb02008-02-01 08:12:03 +00008648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8650$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008651
8652
8653
8654cat >>confdefs.h <<_ACEOF
8655#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8656_ACEOF
8657
8658
Michael W. Hudson54241132001-12-07 15:38:26 +00008659
Matthias Kloseb9621712010-04-24 17:59:49 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8661$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008662have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008664/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008665
Martin v. Löwis11437992002-04-12 09:54:03 +00008666int
8667main ()
8668{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008669long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ;
8671 return 0;
8672}
8673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008675
8676
Matthias Kloseb9621712010-04-24 17:59:49 +00008677$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008678
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008679 have_long_long=yes
8680
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8684$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008685if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686# The cast to long int works around a bug in the HP C Compiler
8687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8691$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008692if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 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 +00008696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 if test "$ac_cv_type_long_long" = yes; then
8699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008701as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008702See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703 else
8704 ac_cv_sizeof_long_long=0
8705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707
Martin v. Löwis11437992002-04-12 09:54:03 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8710$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711
8712
8713
Martin v. Löwis11437992002-04-12 09:54:03 +00008714cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008715#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008716_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008717
Michael W. Hudson54241132001-12-07 15:38:26 +00008718
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008719fi
8720
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8722$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008723have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008725/* end confdefs.h. */
8726
8727int
8728main ()
8729{
8730long double x; x = (long double)0;
8731 ;
8732 return 0;
8733}
8734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008735if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008736
8737
Matthias Kloseb9621712010-04-24 17:59:49 +00008738$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008739
8740 have_long_double=yes
8741
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008742fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8745$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747# The cast to long int works around a bug in the HP C Compiler
8748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8750# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8752$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008753if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 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 +00008757
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 if test "$ac_cv_type_long_double" = yes; then
8760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008762as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008763See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008764 else
8765 ac_cv_sizeof_long_double=0
8766 fi
8767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008768
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8771$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008772
8773
8774
8775cat >>confdefs.h <<_ACEOF
8776#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8777_ACEOF
8778
8779
8780fi
8781
8782
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8784$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008785have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008787/* end confdefs.h. */
8788
8789int
8790main ()
8791{
8792_Bool x; x = (_Bool)0;
8793 ;
8794 return 0;
8795}
8796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008797if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008798
8799
Matthias Kloseb9621712010-04-24 17:59:49 +00008800$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008801
8802 have_c99_bool=yes
8803
Thomas Woutersb2137042007-02-01 18:02:27 +00008804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8807$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008808if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809# The cast to long int works around a bug in the HP C Compiler
8810# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8811# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8812# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8814$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008815if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008817else
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 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 +00008819
Thomas Woutersb2137042007-02-01 18:02:27 +00008820else
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 if test "$ac_cv_type__Bool" = yes; then
8822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008824as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008825See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826 else
8827 ac_cv_sizeof__Bool=0
8828 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830
Thomas Woutersb2137042007-02-01 18:02:27 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8833$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834
8835
8836
Thomas Woutersb2137042007-02-01 18:02:27 +00008837cat >>confdefs.h <<_ACEOF
8838#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8839_ACEOF
8840
8841
8842fi
8843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008845 #include <stdint.h>
8846 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008847 #ifdef HAVE_INTTYPES_H
8848 #include <inttypes.h>
8849 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008850"
Victor Stinnere0be4232011-10-25 13:06:09 +02008851if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008852
8853cat >>confdefs.h <<_ACEOF
8854#define HAVE_UINTPTR_T 1
8855_ACEOF
8856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857# The cast to long int works around a bug in the HP C Compiler
8858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8862$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008863if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008865else
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 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 +00008867
Martin v. Löwis11437992002-04-12 09:54:03 +00008868else
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 if test "$ac_cv_type_uintptr_t" = yes; then
8870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008872as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008873See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008874 else
8875 ac_cv_sizeof_uintptr_t=0
8876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008878
Martin v. Löwis11437992002-04-12 09:54:03 +00008879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8881$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882
8883
8884
Martin v. Löwis11437992002-04-12 09:54:03 +00008885cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008886#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008887_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008888
Michael W. Hudson54241132001-12-07 15:38:26 +00008889
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008890fi
8891
Thomas Wouters89f507f2006-12-13 04:49:30 +00008892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008893# The cast to long int works around a bug in the HP C Compiler
8894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8896# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8898$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008899if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901else
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903#ifdef HAVE_SYS_TYPES_H
8904#include <sys/types.h>
8905#endif
8906
Matthias Kloseb9621712010-04-24 17:59:49 +00008907"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909else
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 if test "$ac_cv_type_off_t" = yes; then
8911 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8912$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008913as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008914See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008915 else
8916 ac_cv_sizeof_off_t=0
8917 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8922$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008923
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924
8925
Martin v. Löwis11437992002-04-12 09:54:03 +00008926cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008927#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008928_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008929
Michael W. Hudson54241132001-12-07 15:38:26 +00008930
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8933$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008934if test "$have_long_long" = yes
8935then
8936if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008937 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008938
Matthias Kloseb9621712010-04-24 17:59:49 +00008939$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008940
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8942$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008943else
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8945$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008946fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008947else
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8949$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008950fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008951
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952# The cast to long int works around a bug in the HP C Compiler
8953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8955# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8957$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008958if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962#ifdef HAVE_SYS_TYPES_H
8963#include <sys/types.h>
8964#endif
8965#ifdef HAVE_TIME_H
8966#include <time.h>
8967#endif
8968
Matthias Kloseb9621712010-04-24 17:59:49 +00008969"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008971else
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 if test "$ac_cv_type_time_t" = yes; then
8973 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8974$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008975as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008976See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977 else
8978 ac_cv_sizeof_time_t=0
8979 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008981
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8984$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986
8987
Martin v. Löwis11437992002-04-12 09:54:03 +00008988cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008989#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008990_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008991
Michael W. Hudson54241132001-12-07 15:38:26 +00008992
8993
Trent Mick635f6fb2000-08-23 21:33:05 +00008994# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008995ac_save_cc="$CC"
8996if test "$ac_cv_kpthread" = "yes"
8997then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008998elif test "$ac_cv_kthread" = "yes"
8999then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009000elif test "$ac_cv_pthread" = "yes"
9001then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009002fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9005$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009006have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009008/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009009
9010 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009011int
9012main ()
9013{
Guido van Rossum12580492000-09-24 16:47:19 +00009014pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 ;
9016 return 0;
9017}
Matthias Kloseb159a552010-04-25 21:00:44 +00009018
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009020if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009021 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9025$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009026if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009028# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9029# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9030# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9032$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009033if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009035else
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009037#ifdef HAVE_PTHREAD_H
9038#include <pthread.h>
9039#endif
9040
Matthias Kloseb9621712010-04-24 17:59:49 +00009041"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009043else
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 if test "$ac_cv_type_pthread_t" = yes; then
9045 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009047as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009048See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009049 else
9050 ac_cv_sizeof_pthread_t=0
9051 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009053
Trent Mick635f6fb2000-08-23 21:33:05 +00009054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9056$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009058
9059
Martin v. Löwis11437992002-04-12 09:54:03 +00009060cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009061#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009062_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009064
Trent Mick635f6fb2000-08-23 21:33:05 +00009065fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009066CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009067
Michael W. Hudson54241132001-12-07 15:38:26 +00009068
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009069case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009070 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009071 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9072 ;;
9073 Darwin/*)
9074 OTHER_LIBTOOL_OPT=""
9075 ;;
9076esac
9077
9078
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009079
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009080case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009081 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009082 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9083 if test "${enable_universalsdk}"; then
9084 :
9085 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009086 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009087 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009088 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009089 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009090 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009091 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009092 if test ${gcc_version} '<' 4.0
9093 then
9094 LIBTOOL_CRUFT="-lcc_dynamic"
9095 else
9096 LIBTOOL_CRUFT=""
9097 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009099 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009100else
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009102/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009103
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009104 #include <unistd.h>
9105 int main(int argc, char*argv[])
9106 {
9107 if (sizeof(long) == 4) {
9108 return 0;
9109 } else {
9110 return 1;
9111 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009112 }
9113
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009115if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009116 ac_osx_32bit=yes
9117else
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9121 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009122fi
9123
9124
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009125 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009126 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009127 i386)
9128 MACOSX_DEFAULT_ARCH="i386"
9129 ;;
9130 ppc)
9131 MACOSX_DEFAULT_ARCH="ppc"
9132 ;;
9133 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009134 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009135 ;;
9136 esac
9137 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009138 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009139 i386)
9140 MACOSX_DEFAULT_ARCH="x86_64"
9141 ;;
9142 ppc)
9143 MACOSX_DEFAULT_ARCH="ppc64"
9144 ;;
9145 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009146 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009147 ;;
9148 esac
9149
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009150 fi
9151
9152 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009153 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009154 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009155esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9157$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009158if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009159then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009160 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009162 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009163
Matthias Kloseb9621712010-04-24 17:59:49 +00009164$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009165
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9167$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009168 if test $enable_shared = "yes"
9169 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009170 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 +00009171 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009172else
Matthias Kloseb9621712010-04-24 17:59:49 +00009173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009175fi
9176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9178$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009179case $ac_sys_system/$ac_sys_release in
9180 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009181
Matthias Kloseb9621712010-04-24 17:59:49 +00009182$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009183
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9185$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009186 ;;
9187 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9189$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009190 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009191esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009192
Guido van Rossum0a516c91994-09-12 10:58:40 +00009193# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009194
Michael W. Hudson54241132001-12-07 15:38:26 +00009195
9196
9197
9198
Benjamin Peterson99f03762010-04-11 22:15:28 +00009199
Thomas Wouters477c8d52006-05-27 19:21:47 +00009200
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009201# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9202# -- usually .so, .sl on HP-UX, .dll on Cygwin
9203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9204$as_echo_n "checking the extension of shared libraries... " >&6; }
9205if test -z "$SHLIB_SUFFIX"; then
9206 case $ac_sys_system in
9207 hp*|HP*)
9208 case `uname -m` in
9209 ia64) SHLIB_SUFFIX=.so;;
9210 *) SHLIB_SUFFIX=.sl;;
9211 esac
9212 ;;
9213 CYGWIN*) SHLIB_SUFFIX=.dll;;
9214 *) SHLIB_SUFFIX=.so;;
9215 esac
9216fi
9217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9218$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009219
Guido van Rossum0a516c91994-09-12 10:58:40 +00009220# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009221# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009222# (Shared libraries in this instance are shared modules to be loaded into
9223# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9225$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009226if test -z "$LDSHARED"
9227then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009228 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009229 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009230 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009231 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009232 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009233 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009234 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236 if test "$GCC" = "yes" ; then
9237 LDSHARED='$(CC) -shared'
9238 LDCXXSHARED='$(CXX) -shared'
9239 else
9240 LDSHARED='$(CC) -G'
9241 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009242 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009243 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009244 if test "$GCC" = "yes" ; then
9245 LDSHARED='$(CC) -shared'
9246 LDCXXSHARED='$(CXX) -shared'
9247 else
9248 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009249 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009250 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009251 LDSHARED='$(CC) -bundle'
9252 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009253 if test "$enable_framework" ; then
9254 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009255 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9256 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009257 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009258 else
9259 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009260 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009261 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009262 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009263 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009264 LDSHARED='$(CC) -bundle'
9265 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009266 if test "$enable_framework" ; then
9267 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009268 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9269 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009270 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009271 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009272 # No framework, use the Python app as bundle-loader
9273 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009274 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009275 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009276 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009277 Darwin/*)
9278 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9279 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009280
Ned Deily36820b62014-06-25 13:44:22 -07009281 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9282 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9283 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9284 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9285 if test ${dep_target_major} -eq 10 && \
9286 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009287 then
Ned Deily36820b62014-06-25 13:44:22 -07009288 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009289 LDSHARED='$(CC) -bundle'
9290 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009291 if test "$enable_framework" ; then
9292 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009293 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9294 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009295 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009296 else
9297 # No framework, use the Python app as bundle-loader
9298 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9299 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009300 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009301 fi
Ned Deily36820b62014-06-25 13:44:22 -07009302 else
9303 # building for OS X 10.3 and later
9304 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9305 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9306 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009307 fi
9308 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009309 Linux*|GNU*|QNX*)
9310 LDSHARED='$(CC) -shared'
9311 LDCXXSHARED='$(CXX) -shared';;
9312 BSD/OS*/4*)
9313 LDSHARED="gcc -shared"
9314 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009315 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009316 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009317 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009318 LDSHARED='$(CC) -shared'
9319 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009320 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009321 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009322 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009323 OpenBSD*)
9324 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9325 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009326 LDSHARED='$(CC) -shared $(CCSHARED)'
9327 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009328 else
9329 case `uname -r` in
9330 [01].* | 2.[0-7] | 2.[0-7].*)
9331 LDSHARED="ld -Bshareable ${LDFLAGS}"
9332 ;;
9333 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009334 LDSHARED='$(CC) -shared $(CCSHARED)'
9335 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009336 ;;
9337 esac
9338 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009339 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009340 LDSHARED='$(CC) -shared'
9341 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009342 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009343 if test "$GCC" = "yes" ; then
9344 LDSHARED='$(CC) -shared'
9345 LDCXXSHARED='$(CXX) -shared'
9346 else
9347 LDSHARED='$(CC) -G'
9348 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009349 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009350 SCO_SV*)
9351 LDSHARED='$(CC) -Wl,-G,-Bexport'
9352 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9353 CYGWIN*)
9354 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9355 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009356 *) LDSHARED="ld";;
9357 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9360$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009361LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009362BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009363# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009364# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9366$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009367if test -z "$CCSHARED"
9368then
Guido van Rossum07397971997-04-29 21:49:50 +00009369 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009370 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009371 then CCSHARED="-fPIC";
9372 elif test `uname -p` = sparc;
9373 then CCSHARED="-xcode=pic32";
9374 else CCSHARED="-Kpic";
9375 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009376 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009377 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009378 else CCSHARED="+z";
9379 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009380 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009381 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009382 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009383 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009384 if test "$GCC" = "yes"
9385 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009386 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009387 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009388 SCO_SV*)
9389 if test "$GCC" = "yes"
9390 then CCSHARED="-fPIC"
9391 else CCSHARED="-Kpic -belf"
9392 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009393 IRIX*/6*) case $CC in
9394 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009395 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009396 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9400$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009401# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009402# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9404$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009405if test -z "$LINKFORSHARED"
9406then
Guido van Rossum07397971997-04-29 21:49:50 +00009407 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009408 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009409 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009410 LINKFORSHARED="-Wl,-E -Wl,+s";;
9411# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009412 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009413 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009414 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009416 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009417
9418 # Issue #18075: the default maximum stack size (8MBytes) is too
9419 # small for the default recursion limit. Increase the stack size
9420 # to ensure that tests don't crash
9421 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9422
Jack Jansene578a632001-08-15 01:27:14 +00009423 if test "$enable_framework"
9424 then
Jack Jansenda49e192005-01-07 13:08:22 +00009425 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009426 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009427 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009428 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009429 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009430 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009431 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009432 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9433 then
9434 LINKFORSHARED="-Wl,--export-dynamic"
9435 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009436 SunOS/5*) case $CC in
9437 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009438 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009439 then
9440 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009441 fi;;
9442 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009443 CYGWIN*)
9444 if test $enable_shared = "no"
9445 then
9446 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9447 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009448 QNX*)
9449 # -Wl,-E causes the symbols to be added to the dynamic
9450 # symbol table so that they can be found when a module
9451 # is loaded. -N 2048K causes the stack size to be set
9452 # to 2048 kilobytes so that the stack doesn't overflow
9453 # when running test_compile.py.
9454 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009455 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9458$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009459
Michael W. Hudson54241132001-12-07 15:38:26 +00009460
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009461
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9463$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009464if test ! "$LIBRARY" = "$LDLIBRARY"
9465then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009466 case $ac_sys_system in
9467 CYGWIN*)
9468 # Cygwin needs CCSHARED when building extension DLLs
9469 # but not when building the interpreter DLL.
9470 CFLAGSFORSHARED='';;
9471 *)
9472 CFLAGSFORSHARED='$(CCSHARED)'
9473 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9476$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009477
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009478# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9479# library (with --enable-shared).
9480# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009481# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9482# if it is not required, since it creates a dependency of the shared library
9483# to LIBS. This, in turn, means that applications linking the shared libpython
9484# don't need to link LIBS explicitly. The default should be only changed
9485# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009486
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9488$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009489case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009490 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009491 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009492esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9494$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009495
9496
Guido van Rossum627b2d71993-12-24 10:39:16 +00009497# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9499$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009500if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009501 $as_echo_n "(cached) " >&6
9502else
9503 ac_check_lib_save_LIBS=$LIBS
9504LIBS="-lsendfile $LIBS"
9505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9506/* end confdefs.h. */
9507
9508/* Override any GCC internal prototype to avoid an error.
9509 Use char because int might match the return type of a GCC
9510 builtin and then its argument prototype would still apply. */
9511#ifdef __cplusplus
9512extern "C"
9513#endif
9514char sendfile ();
9515int
9516main ()
9517{
9518return sendfile ();
9519 ;
9520 return 0;
9521}
9522_ACEOF
9523if ac_fn_c_try_link "$LINENO"; then :
9524 ac_cv_lib_sendfile_sendfile=yes
9525else
9526 ac_cv_lib_sendfile_sendfile=no
9527fi
9528rm -f core conftest.err conftest.$ac_objext \
9529 conftest$ac_exeext conftest.$ac_ext
9530LIBS=$ac_check_lib_save_LIBS
9531fi
9532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9533$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009534if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009535 cat >>confdefs.h <<_ACEOF
9536#define HAVE_LIBSENDFILE 1
9537_ACEOF
9538
9539 LIBS="-lsendfile $LIBS"
9540
9541fi
9542
Matthias Kloseb9621712010-04-24 17:59:49 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9544$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009545if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009546 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009547else
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009549LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553/* Override any GCC internal prototype to avoid an error.
9554 Use char because int might match the return type of a GCC
9555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556#ifdef __cplusplus
9557extern "C"
9558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009559char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009560int
9561main ()
9562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ;
9565 return 0;
9566}
9567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009570else
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009573rm -f core conftest.err conftest.$ac_objext \
9574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9578$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009579if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 cat >>confdefs.h <<_ACEOF
9581#define HAVE_LIBDL 1
9582_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009583
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009584 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009586fi
9587 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9589$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009590if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009591 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009592else
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009594LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598/* Override any GCC internal prototype to avoid an error.
9599 Use char because int might match the return type of a GCC
9600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009601#ifdef __cplusplus
9602extern "C"
9603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009604char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009605int
9606main ()
9607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 ;
9610 return 0;
9611}
9612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009615else
Matthias Kloseb9621712010-04-24 17:59:49 +00009616 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009618rm -f core conftest.err conftest.$ac_objext \
9619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009620LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9623$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009624if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 cat >>confdefs.h <<_ACEOF
9626#define HAVE_LIBDLD 1
9627_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009628
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009629 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009631fi
9632 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009633
Georg Brandlb1441c72009-01-03 22:33:39 +00009634# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009635if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9637$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009638if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009639 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009640else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009641 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645/* Override any GCC internal prototype to avoid an error.
9646 Use char because int might match the return type of a GCC
9647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009648#ifdef __cplusplus
9649extern "C"
9650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009651char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009652int
9653main ()
9654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009656 ;
9657 return 0;
9658}
9659_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660for ac_lib in '' pthread rt posix4; do
9661 if test -z "$ac_lib"; then
9662 ac_res="none required"
9663 else
9664 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009665 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009667 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009670rm -f core conftest.err conftest.$ac_objext \
9671 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009672 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675done
Victor Stinnere0be4232011-10-25 13:06:09 +02009676if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678else
9679 ac_cv_search_sem_init=no
9680fi
9681rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009682LIBS=$ac_func_search_save_LIBS
9683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9685$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009687if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009689
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009690fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009691 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009692 # posix4 on Solaris 2.6
9693 # pthread (first!) on Linux
9694fi
9695
Martin v. Löwis19d17342003-06-14 21:03:05 +00009696# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9698$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009699if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009701else
9702 ac_check_lib_save_LIBS=$LIBS
9703LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009705/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707/* Override any GCC internal prototype to avoid an error.
9708 Use char because int might match the return type of a GCC
9709 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009710#ifdef __cplusplus
9711extern "C"
9712#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009713char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009714int
9715main ()
9716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009718 ;
9719 return 0;
9720}
9721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009722if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009723 ac_cv_lib_intl_textdomain=yes
9724else
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009727rm -f core conftest.err conftest.$ac_objext \
9728 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009729LIBS=$ac_check_lib_save_LIBS
9730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9732$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009733if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009734
Matthias Kloseb9621712010-04-24 17:59:49 +00009735$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009736
Brett Cannonc6d936e2009-06-07 20:09:53 +00009737 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009738fi
9739
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009740
9741# checks for system dependent C++ extensions support
9742case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9744$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009747
Georg Brandl59e87bd2011-02-15 19:48:59 +00009748 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009749int
9750main ()
9751{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009752loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ;
9754 return 0;
9755}
Matthias Kloseb159a552010-04-25 21:00:44 +00009756
Martin v. Löwis11437992002-04-12 09:54:03 +00009757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009758if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009759
Matthias Kloseb159a552010-04-25 21:00:44 +00009760
Matthias Kloseb9621712010-04-24 17:59:49 +00009761$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009762
Matthias Kloseb159a552010-04-25 21:00:44 +00009763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009764$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009765
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009766else
Matthias Kloseb159a552010-04-25 21:00:44 +00009767
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009769$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009770
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009772rm -f core conftest.err conftest.$ac_objext \
9773 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009774 *) ;;
9775esac
9776
Christian Heimes985ecdc2013-11-20 11:46:18 +01009777# check for systems that require aligned memory access
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9779$as_echo_n "checking aligned memory access is required... " >&6; }
9780if test "$cross_compiling" = yes; then :
9781 aligned_required=yes
9782else
9783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9784/* end confdefs.h. */
9785
9786int main()
9787{
9788 char s[16];
9789 int i, *p1, *p2;
9790 for (i=0; i < 16; i++)
9791 s[i] = i;
9792 p1 = (int*)(s+1);
9793 p2 = (int*)(s+2);
9794 if (*p1 == *p2)
9795 return 1;
9796 return 0;
9797}
9798
9799_ACEOF
9800if ac_fn_c_try_run "$LINENO"; then :
9801 aligned_required=no
9802else
9803 aligned_required=yes
9804fi
9805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9806 conftest.$ac_objext conftest.beam conftest.$ac_ext
9807fi
9808
9809
9810if test "$aligned_required" = yes ; then
9811
9812$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9813
9814fi
9815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9816$as_echo "$aligned_required" >&6; }
9817
9818
9819# str, bytes and memoryview hash algorithm
9820
9821
9822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9823$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9824
9825# Check whether --with-hash_algorithm was given.
9826if test "${with_hash_algorithm+set}" = set; then :
9827 withval=$with_hash_algorithm;
9828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9829$as_echo "$withval" >&6; }
9830case "$withval" in
9831 siphash24)
9832 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9833
9834 ;;
9835 fnv)
9836 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9837
9838 ;;
9839 *)
9840 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9841 ;;
9842esac
9843
9844else
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9846$as_echo "default" >&6; }
9847fi
9848
9849
Charles-François Natalid30b0222014-05-08 23:08:51 +01009850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9851$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9852
9853# Check whether --with-address_sanitizer was given.
9854if test "${with_address_sanitizer+set}" = set; then :
9855 withval=$with_address_sanitizer;
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9857$as_echo "$withval" >&6; }
9858BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9859LDFLAGS="-fsanitize=address $LDFLAGS"
9860
9861else
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864fi
9865
9866
Guido van Rossum70c7f481998-03-26 18:44:10 +00009867# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9869$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009870if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009871 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009872else
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009874LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878/* Override any GCC internal prototype to avoid an error.
9879 Use char because int might match the return type of a GCC
9880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009881#ifdef __cplusplus
9882extern "C"
9883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009884char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009885int
9886main ()
9887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 ;
9890 return 0;
9891}
9892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009895else
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898rm -f core conftest.err conftest.$ac_objext \
9899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009900LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9903$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009904if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009905 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009906fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009907 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9909$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009910if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009912else
Martin v. Löwis11437992002-04-12 09:54:03 +00009913 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009914LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918/* Override any GCC internal prototype to avoid an error.
9919 Use char because int might match the return type of a GCC
9920 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009921#ifdef __cplusplus
9922extern "C"
9923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009924char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009925int
9926main ()
9927{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ;
9930 return 0;
9931}
9932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009933if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009935else
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009938rm -f core conftest.err conftest.$ac_objext \
9939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009940LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9943$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009944if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009945 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009946fi
9947 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009948
Matthias Kloseb9621712010-04-24 17:59:49 +00009949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9950$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009952# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009953if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9956$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009957LIBS="$withval $LIBS"
9958
9959else
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9961$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009962fi
9963
Guido van Rossum7f43da71994-08-01 12:15:30 +00009964
Victor Stinner8291b5e2015-03-20 16:03:14 +01009965
9966
9967
9968
9969
9970
9971
9972if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9973 if test -n "$ac_tool_prefix"; then
9974 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9975set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9977$as_echo_n "checking for $ac_word... " >&6; }
9978if ${ac_cv_path_PKG_CONFIG+:} false; then :
9979 $as_echo_n "(cached) " >&6
9980else
9981 case $PKG_CONFIG in
9982 [\\/]* | ?:[\\/]*)
9983 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9984 ;;
9985 *)
9986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9987for as_dir in $PATH
9988do
9989 IFS=$as_save_IFS
9990 test -z "$as_dir" && as_dir=.
9991 for ac_exec_ext in '' $ac_executable_extensions; do
9992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9993 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9995 break 2
9996 fi
9997done
9998 done
9999IFS=$as_save_IFS
10000
10001 ;;
10002esac
10003fi
10004PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10005if test -n "$PKG_CONFIG"; then
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10007$as_echo "$PKG_CONFIG" >&6; }
10008else
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010$as_echo "no" >&6; }
10011fi
10012
10013
10014fi
10015if test -z "$ac_cv_path_PKG_CONFIG"; then
10016 ac_pt_PKG_CONFIG=$PKG_CONFIG
10017 # Extract the first word of "pkg-config", so it can be a program name with args.
10018set dummy pkg-config; ac_word=$2
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020$as_echo_n "checking for $ac_word... " >&6; }
10021if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10022 $as_echo_n "(cached) " >&6
10023else
10024 case $ac_pt_PKG_CONFIG in
10025 [\\/]* | ?:[\\/]*)
10026 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10027 ;;
10028 *)
10029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030for as_dir in $PATH
10031do
10032 IFS=$as_save_IFS
10033 test -z "$as_dir" && as_dir=.
10034 for ac_exec_ext in '' $ac_executable_extensions; do
10035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10036 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038 break 2
10039 fi
10040done
10041 done
10042IFS=$as_save_IFS
10043
10044 ;;
10045esac
10046fi
10047ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10048if test -n "$ac_pt_PKG_CONFIG"; then
10049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10050$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10051else
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054fi
10055
10056 if test "x$ac_pt_PKG_CONFIG" = x; then
10057 PKG_CONFIG=""
10058 else
10059 case $cross_compiling:$ac_tool_warned in
10060yes:)
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10063ac_tool_warned=yes ;;
10064esac
10065 PKG_CONFIG=$ac_pt_PKG_CONFIG
10066 fi
10067else
10068 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10069fi
10070
10071fi
10072if test -n "$PKG_CONFIG"; then
10073 _pkg_min_version=0.9.0
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10075$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10076 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10078$as_echo "yes" >&6; }
10079 else
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082 PKG_CONFIG=""
10083 fi
10084fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010085
10086# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10088$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010089
10090# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010091if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010092 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010093else
10094 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010095fi
10096
10097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10099$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010100
10101# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10103$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010104
10105# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010106if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010107 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +000010108else
10109 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010110fi
10111
10112
10113if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010114 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10115else
10116 LIBFFI_INCLUDEDIR=""
10117fi
10118
10119
Matthias Kloseb9621712010-04-24 17:59:49 +000010120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10121$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010122
Stefan Krah60187b52012-03-23 19:06:27 +010010123# Check for use of the system libmpdec library
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10125$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10126
10127# Check whether --with-system_libmpdec was given.
10128if test "${with_system_libmpdec+set}" = set; then :
10129 withval=$with_system_libmpdec;
10130else
10131 with_system_libmpdec="no"
10132fi
10133
10134
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10136$as_echo "$with_system_libmpdec" >&6; }
10137
Benjamin Peterson076ed002010-10-31 17:11:02 +000010138# Check for support for loadable sqlite extensions
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10140$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10141# Check whether --enable-loadable-sqlite-extensions was given.
10142if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10143 enableval=$enable_loadable_sqlite_extensions;
10144else
10145 enable_loadable_sqlite_extensions="no"
10146fi
10147
10148
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10150$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10151
Ned Deilyd819b932013-09-06 01:07:05 -070010152# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10153
10154
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10156$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10157
10158# Check whether --with-tcltk-includes was given.
10159if test "${with_tcltk_includes+set}" = set; then :
10160 withval=$with_tcltk_includes;
10161else
10162 with_tcltk_includes="default"
10163fi
10164
10165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10166$as_echo "$with_tcltk_includes" >&6; }
10167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10168$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10169
10170# Check whether --with-tcltk-libs was given.
10171if test "${with_tcltk_libs+set}" = set; then :
10172 withval=$with_tcltk_libs;
10173else
10174 with_tcltk_libs="default"
10175fi
10176
10177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10178$as_echo "$with_tcltk_libs" >&6; }
10179if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10180then
10181 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10182 then
10183 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10184 fi
10185 TCLTK_INCLUDES=""
10186 TCLTK_LIBS=""
10187else
10188 TCLTK_INCLUDES="$with_tcltk_includes"
10189 TCLTK_LIBS="$with_tcltk_libs"
10190fi
10191
Matthias Klose55708cc2009-04-30 08:06:49 +000010192# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10194$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010195
10196# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010197if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010198 withval=$with_dbmliborder;
10199if test x$with_dbmliborder = xyes
10200then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010201as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010202else
10203 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10204 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10205 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010206 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010207 fi
10208 done
10209fi
10210fi
10211
Matthias Kloseb9621712010-04-24 17:59:49 +000010212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10213$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010214
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010215# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010216
10217
Matthias Kloseb9621712010-04-24 17:59:49 +000010218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10219$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010222if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223 withval=$with_signal_module;
10224fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010225
10226
10227if test -z "$with_signal_module"
10228then with_signal_module="yes"
10229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10231$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010232
10233if test "${with_signal_module}" = "yes"; then
10234 USE_SIGNAL_MODULE=""
10235 SIGNAL_OBJS=""
10236else
10237 USE_SIGNAL_MODULE="#"
10238 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10239fi
10240
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010241# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010242
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010243USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245
Martin v. Löwis11437992002-04-12 09:54:03 +000010246
10247# Templates for things AC_DEFINEd more than once.
10248# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010249
10250
Martin v. Löwis11437992002-04-12 09:54:03 +000010251
Matthias Kloseb9621712010-04-24 17:59:49 +000010252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10253$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010256if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257 withval=$with_threads;
10258fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010259
10260
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010261# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010264if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265 withval=$with_thread; with_threads=$with_thread
10266fi
10267
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010268
10269if test -z "$with_threads"
10270then with_threads="yes"
10271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10273$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010274
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010275
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010276if test "$with_threads" = "no"
10277then
10278 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010279elif test "$ac_cv_pthread_is_default" = yes
10280then
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010282
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010283 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010285
10286 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010288elif test "$ac_cv_kpthread" = "yes"
10289then
10290 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010291 if test "$ac_cv_cxx_thread" = "yes"; then
10292 CXX="$CXX -Kpthread"
10293 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010295
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010296 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010297 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010298elif test "$ac_cv_kthread" = "yes"
10299then
10300 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010301 if test "$ac_cv_cxx_thread" = "yes"; then
10302 CXX="$CXX -Kthread"
10303 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010305
10306 posix_threads=yes
10307 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010308elif test "$ac_cv_pthread" = "yes"
10309then
10310 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010311 if test "$ac_cv_cxx_thread" = "yes"; then
10312 CXX="$CXX -pthread"
10313 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010315
10316 posix_threads=yes
10317 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010318else
10319 if test ! -z "$with_threads" -a -d "$with_threads"
10320 then LDFLAGS="$LDFLAGS -L$with_threads"
10321 fi
10322 if test ! -z "$withval" -a -d "$withval"
10323 then LDFLAGS="$LDFLAGS -L$withval"
10324 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010325
10326 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010327 # define _POSIX_THREADS in unistd.h. Some apparently don't
10328 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10330$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010333
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010334#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010335#ifdef _POSIX_THREADS
10336yes
10337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010338
10339_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010342 unistd_defines_pthreads=yes
10343else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010344 unistd_defines_pthreads=no
10345fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010346rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10349$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010352
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010353 # Just looking for pthread_create in libpthread is not enough:
10354 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10355 # So we really have to include pthread.h, and then link.
10356 _libs=$LIBS
10357 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10359$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010362
10363#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010364#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010365
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010366void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010367int
10368main ()
10369{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010370
10371pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 ;
10373 return 0;
10374}
10375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010376if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010377
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10379$as_echo "yes" >&6; }
10380 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010381
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010382 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010383 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010384else
Martin v. Löwis11437992002-04-12 09:54:03 +000010385
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010386 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010388if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010390
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010391 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010392 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010393else
Guido van Rossumad678af1998-10-02 14:42:15 +000010394
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10396$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010397if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010399else
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010401LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405/* Override any GCC internal prototype to avoid an error.
10406 Use char because int might match the return type of a GCC
10407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010408#ifdef __cplusplus
10409extern "C"
10410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010411char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010412int
10413main ()
10414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 ;
10417 return 0;
10418}
10419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010422else
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010425rm -f core conftest.err conftest.$ac_objext \
10426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010427LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10430$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010431if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010433
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010434 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010435 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010436 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010437else
Greg Steinadf63d62000-07-05 10:38:09 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10440$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010441if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010443else
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010445LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449/* Override any GCC internal prototype to avoid an error.
10450 Use char because int might match the return type of a GCC
10451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010452#ifdef __cplusplus
10453extern "C"
10454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010455char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010456int
10457main ()
10458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010459return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010466else
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010469rm -f core conftest.err conftest.$ac_objext \
10470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010471LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10474$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010475if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010477
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010478 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010479 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010480 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010481else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010482
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10484$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010485if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010487else
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010489LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493/* Override any GCC internal prototype to avoid an error.
10494 Use char because int might match the return type of a GCC
10495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010496#ifdef __cplusplus
10497extern "C"
10498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010499char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010500int
10501main ()
10502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010503return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 ;
10505 return 0;
10506}
10507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010510else
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513rm -f core conftest.err conftest.$ac_objext \
10514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010515LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10518$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010519if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010521
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010522 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010523 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010524 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010525else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010526
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10528$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010529if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010531else
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010533LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537/* Override any GCC internal prototype to avoid an error.
10538 Use char because int might match the return type of a GCC
10539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010540#ifdef __cplusplus
10541extern "C"
10542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010543char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010544int
10545main ()
10546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ;
10549 return 0;
10550}
10551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010554else
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010557rm -f core conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010559LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10562$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010563if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010565
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010566 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010567 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010568 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010569else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010570
Martin v. Löwis130fb172001-07-19 11:00:41 +000010571 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010572fi
10573
Guido van Rossum627b2d71993-12-24 10:39:16 +000010574
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010575fi
10576
Guido van Rossum0be3e491997-05-22 20:33:33 +000010577fi
10578
Guido van Rossum49545951997-12-02 19:28:29 +000010579fi
10580
Guido van Rossumb93a8621998-05-07 13:27:32 +000010581fi
10582
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584rm -f core conftest.err conftest.$ac_objext \
10585 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010586
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10588$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010589if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010591else
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010593LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597/* Override any GCC internal prototype to avoid an error.
10598 Use char because int might match the return type of a GCC
10599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010600#ifdef __cplusplus
10601extern "C"
10602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010603char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010604int
10605main ()
10606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010607return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 ;
10609 return 0;
10610}
10611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010612if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010613 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010614else
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010617rm -f core conftest.err conftest.$ac_objext \
10618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010619LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10622$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010623if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010625
Martin v. Löwis130fb172001-07-19 11:00:41 +000010626 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010627 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010628 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010629fi
10630
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010631
Neal Norwitza978ab02002-11-02 16:58:05 +000010632 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10634$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010635if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010637else
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010639LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643/* Override any GCC internal prototype to avoid an error.
10644 Use char because int might match the return type of a GCC
10645 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010646#ifdef __cplusplus
10647extern "C"
10648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010649char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010650int
10651main ()
10652{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 ;
10655 return 0;
10656}
10657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010658if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010663rm -f core conftest.err conftest.$ac_objext \
10664 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010665LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10668$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010669if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010671
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010672 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010673 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010674 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010675fi
10676
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010677 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010678fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010679
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010680if test "$posix_threads" = "yes"; then
10681 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010682
Matthias Kloseb9621712010-04-24 17:59:49 +000010683$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684
10685 fi
10686
10687 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10688 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010689 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010690$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692 ;;
10693 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010694$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010695
10696 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010697 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010698$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010699
10700 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010701 esac
10702
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10704$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010705 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010707else
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010709 ac_cv_pthread_system_supported=no
10710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010712/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010713
10714 #include <stdio.h>
10715 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010716 void *foo(void *parm) {
10717 return NULL;
10718 }
10719 main() {
10720 pthread_attr_t attr;
10721 pthread_t id;
10722 if (pthread_attr_init(&attr)) exit(-1);
10723 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10724 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10725 exit(0);
10726 }
10727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010728if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010729 ac_cv_pthread_system_supported=yes
10730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010735fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737
Guido van Rossum627b2d71993-12-24 10:39:16 +000010738fi
10739
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10741$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010742 if test "$ac_cv_pthread_system_supported" = "yes"; then
10743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010745
10746 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 for ac_func in pthread_sigmask
10748do :
10749 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010750if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010751 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010752#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010753_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010754 case $ac_sys_system in
10755 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010758
10759 ;;
10760 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010761fi
10762done
10763
Christian Heimesf77b4b22013-08-21 13:26:05 +020010764 for ac_func in pthread_atfork
10765do :
10766 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10767if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10768 cat >>confdefs.h <<_ACEOF
10769#define HAVE_PTHREAD_ATFORK 1
10770_ACEOF
10771
10772fi
10773done
10774
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010775fi
10776
10777
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010779
Matthias Kloseb9621712010-04-24 17:59:49 +000010780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10781$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010782# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010783if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010784 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10787$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 ipv6=no
10789 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10791$as_echo "yes" >&6; }
10792 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793
10794 ipv6=yes
10795 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797else
Martin v. Löwis11437992002-04-12 09:54:03 +000010798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801 /* AF_INET6 available check */
10802#include <sys/types.h>
10803#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010804int
10805main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010807int domain = AF_INET6;
10808 ;
10809 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810}
Martin v. Löwis11437992002-04-12 09:54:03 +000010811_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010812if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10815$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818else
Matthias Kloseb159a552010-04-25 21:00:44 +000010819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10821$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010823
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010827if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10829$as_echo_n "checking if RFC2553 API is available... " >&6; }
10830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010831/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010832
10833 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010834#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010835int
10836main ()
10837{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010838struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010839 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 ;
10841 return 0;
10842}
Matthias Kloseb159a552010-04-25 21:00:44 +000010843
Martin v. Löwis11437992002-04-12 09:54:03 +000010844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010845if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010846
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010848$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010849 ipv6=yes
10850
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010851else
Matthias Kloseb159a552010-04-25 21:00:44 +000010852
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010854$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010855 ipv6=no
10856
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010859fi
10860
10861if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010863
10864fi
10865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866fi
10867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868
10869ipv6type=unknown
10870ipv6lib=none
10871ipv6trylibc=no
10872
10873if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10875$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010876 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10877 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878 case $i in
10879 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010882
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010883#include <netinet/in.h>
10884#ifdef IPV6_INRIA_VERSION
10885yes
10886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010887_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010890 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010892rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893
10894 ;;
10895 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899#include <netinet/in.h>
10900#ifdef __KAME__
10901yes
10902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906 ipv6type=$i;
10907 ipv6lib=inet6
10908 ipv6libdir=/usr/local/v6/lib
10909 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010911rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912
10913 ;;
10914 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010916/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918#include <features.h>
10919#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10920yes
10921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010922_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925 ipv6type=$i;
10926 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010927fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010928rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929
10930 ;;
10931 linux-inet6)
10932 if test -d /usr/inet6; then
10933 ipv6type=$i
10934 ipv6lib=inet6
10935 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010936 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937 fi
10938 ;;
10939 solaris)
10940 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010941 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942 ipv6type=$i
10943 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944 fi
10945 fi
10946 ;;
10947 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010951#include <sys/param.h>
10952#ifdef _TOSHIBA_INET6
10953yes
10954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010955_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958 ipv6type=$i;
10959 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010960 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010962rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963
10964 ;;
10965 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010967/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969#include </usr/local/v6/include/sys/v6config.h>
10970#ifdef __V6D__
10971yes
10972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010973_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010976 ipv6type=$i;
10977 ipv6lib=v6;
10978 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010979 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010980fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010981rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982
10983 ;;
10984 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010986/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010988#include <sys/param.h>
10989#ifdef _ZETA_MINAMI_INET6
10990yes
10991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995 ipv6type=$i;
10996 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010997 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010998fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010999rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011000
11001 ;;
11002 esac
11003 if test "$ipv6type" != "unknown"; then
11004 break
11005 fi
11006 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11008$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011009fi
11010
11011if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11012 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11013 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11014 echo "using lib$ipv6lib"
11015 else
11016 if test $ipv6trylibc = "yes"; then
11017 echo "using libc"
11018 else
11019 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11020 echo "You need to fetch lib$ipv6lib.a from appropriate"
11021 echo 'ipv6 kit and compile beforehand.'
11022 exit 1
11023 fi
11024 fi
11025fi
11026
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11028$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11030/* end confdefs.h. */
11031 /* CAN_RAW_FD_FRAMES available check */
11032#include <linux/can/raw.h>
11033int
11034main ()
11035{
11036int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11037 ;
11038 return 0;
11039}
11040_ACEOF
11041if ac_fn_c_try_compile "$LINENO"; then :
11042
11043
11044$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11045
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11047$as_echo "yes" >&6; }
11048
11049else
11050
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11052$as_echo "no" >&6; }
11053
11054fi
11055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
11058$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
11059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011060/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011061
11062 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011063int
11064main ()
11065{
11066FSIORefNum fRef = 0
11067 ;
11068 return 0;
11069}
Matthias Kloseb159a552010-04-25 21:00:44 +000011070
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011072if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011073
Matthias Kloseb159a552010-04-25 21:00:44 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11078$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011079
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011080else
Matthias Kloseb159a552010-04-25 21:00:44 +000011081
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011084
11085fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11087
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011088# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11090$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011092# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011093if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011094 withval=$with_doc_strings;
11095fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011096
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011097
11098if test -z "$with_doc_strings"
11099then with_doc_strings="yes"
11100fi
11101if test "$with_doc_strings" != "no"
11102then
11103
Matthias Kloseb9621712010-04-24 17:59:49 +000011104$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011105
11106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11108$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011109
Antoine Pitrou042b1282010-08-13 21:15:58 +000011110# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11112$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011114# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011115if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011117if test "$withval" != no
11118then
11119
Matthias Kloseb9621712010-04-24 17:59:49 +000011120$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011121
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11123$as_echo "yes" >&6; }
11124else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11125$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011126fi
11127else
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11129$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130fi
11131
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011132
11133# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11135$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011137# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011138if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139 withval=$with_pymalloc;
11140fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011141
Neil Schemenauera35c6882001-02-27 04:45:05 +000011142
Neil Schemenauer16c22972002-03-22 15:34:49 +000011143if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011144then
11145 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011146fi
11147if test "$with_pymalloc" != "no"
11148then
Martin v. Löwis11437992002-04-12 09:54:03 +000011149
Matthias Kloseb9621712010-04-24 17:59:49 +000011150$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011151
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011152 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11155$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011156
Benjamin Peterson05159c42009-12-03 03:01:27 +000011157# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11159$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011160
11161# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011162if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011163 withval=$with_valgrind;
11164else
11165 with_valgrind=no
11166fi
11167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11169$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011170if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011171 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 +020011172if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011173
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011175
11176else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011177 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011178
11179fi
11180
11181
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011182 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011183fi
11184
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011185# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011186
Guido van Rossum98935bf2001-09-05 19:13:16 +000011187DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011188
Guido van Rossume97ee181999-12-20 21:27:22 +000011189# the dlopen() function means we might want to use dynload_shlib.o. some
11190# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011191for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011192do :
11193 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011194if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011196#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011197_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011198
Guido van Rossume97ee181999-12-20 21:27:22 +000011199fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011200done
Guido van Rossume97ee181999-12-20 21:27:22 +000011201
Michael W. Hudson54241132001-12-07 15:38:26 +000011202
Guido van Rossume97ee181999-12-20 21:27:22 +000011203# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11204# loading of modules.
11205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11207$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011208if test -z "$DYNLOADFILE"
11209then
11210 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011211 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11212 if test "$ac_cv_func_dlopen" = yes
11213 then DYNLOADFILE="dynload_shlib.o"
11214 else DYNLOADFILE="dynload_aix.o"
11215 fi
11216 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011217 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011218 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11219 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011220 *)
11221 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11222 # out any dynamic loading
11223 if test "$ac_cv_func_dlopen" = yes
11224 then DYNLOADFILE="dynload_shlib.o"
11225 else DYNLOADFILE="dynload_stub.o"
11226 fi
11227 ;;
11228 esac
11229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11231$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011232if test "$DYNLOADFILE" != "dynload_stub.o"
11233then
Martin v. Löwis11437992002-04-12 09:54:03 +000011234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011236
11237fi
11238
Neil Schemenauer4e425612001-06-19 15:44:15 +000011239# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11240
Michael W. Hudson54241132001-12-07 15:38:26 +000011241
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11243$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011244if test -z "$MACHDEP_OBJS"
11245then
Jack Jansene578a632001-08-15 01:27:14 +000011246 MACHDEP_OBJS=$extra_machdep_objs
11247else
11248 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011249fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011250if test -z "$MACHDEP_OBJS"; then
11251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11252$as_echo "none" >&6; }
11253else
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11255$as_echo "$MACHDEP_OBJS" >&6; }
11256fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011257
Guido van Rossum627b2d71993-12-24 10:39:16 +000011258# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011259for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011260 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011261 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011262 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011263 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011264 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011265 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011266 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11267 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011268 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011269 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011270 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011271 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011272 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011273 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011274 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11275 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011276 sigaction sigaltstack siginterrupt sigpending sigrelse \
11277 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011278 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011279 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011280 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011281do :
11282 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11283ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011284if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011286#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011287_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011288
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011289fi
11290done
11291
Michael W. Hudson54241132001-12-07 15:38:26 +000011292
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011293ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11294 #include <dirent.h>
11295"
11296if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11297
11298$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11299
11300fi
11301
11302
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011303# For some functions, having a definition is not sufficient, since
11304# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11306$as_echo_n "checking for chroot... " >&6; }
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310int
11311main ()
11312{
11313void *x=chroot
11314 ;
11315 return 0;
11316}
11317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011321
Matthias Kloseb159a552010-04-25 21:00:44 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011324else
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011327
11328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11331$as_echo_n "checking for link... " >&6; }
11332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011333/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011335int
11336main ()
11337{
11338void *x=link
11339 ;
11340 return 0;
11341}
11342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346
Matthias Kloseb159a552010-04-25 21:00:44 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011349else
Matthias Kloseb9621712010-04-24 17:59:49 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352
11353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11356$as_echo_n "checking for symlink... " >&6; }
11357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011359#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011360int
11361main ()
11362{
11363void *x=symlink
11364 ;
11365 return 0;
11366}
11367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011369
Matthias Kloseb9621712010-04-24 17:59:49 +000011370$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011371
Matthias Kloseb159a552010-04-25 21:00:44 +000011372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011373$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011374else
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011377
11378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11381$as_echo_n "checking for fchdir... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384#include <unistd.h>
11385int
11386main ()
11387{
11388void *x=fchdir
11389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011396
Matthias Kloseb159a552010-04-25 21:00:44 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011399else
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11401$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011402
11403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11406$as_echo_n "checking for fsync... " >&6; }
11407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011409#include <unistd.h>
11410int
11411main ()
11412{
11413void *x=fsync
11414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011421
Matthias Kloseb159a552010-04-25 21:00:44 +000011422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011424else
Matthias Kloseb9621712010-04-24 17:59:49 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11426$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427
11428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11431$as_echo_n "checking for fdatasync... " >&6; }
11432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011434#include <unistd.h>
11435int
11436main ()
11437{
11438void *x=fdatasync
11439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011446
Matthias Kloseb159a552010-04-25 21:00:44 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011449else
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011452
11453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11456$as_echo_n "checking for epoll... " >&6; }
11457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011458/* end confdefs.h. */
11459#include <sys/epoll.h>
11460int
11461main ()
11462{
11463void *x=epoll_create
11464 ;
11465 return 0;
11466}
11467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011471
Matthias Kloseb159a552010-04-25 21:00:44 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011473$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011474else
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011477
11478fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11481$as_echo_n "checking for epoll_create1... " >&6; }
11482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11483/* end confdefs.h. */
11484#include <sys/epoll.h>
11485int
11486main ()
11487{
11488void *x=epoll_create1
11489 ;
11490 return 0;
11491}
11492_ACEOF
11493if ac_fn_c_try_compile "$LINENO"; then :
11494
11495$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11496
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11498$as_echo "yes" >&6; }
11499else
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
11502
11503fi
11504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11506$as_echo_n "checking for kqueue... " >&6; }
11507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011508/* end confdefs.h. */
11509
11510#include <sys/types.h>
11511#include <sys/event.h>
11512
11513int
11514main ()
11515{
11516int x=kqueue()
11517 ;
11518 return 0;
11519}
11520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011524
Matthias Kloseb159a552010-04-25 21:00:44 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011530
11531fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11534$as_echo_n "checking for prlimit... " >&6; }
11535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11536/* end confdefs.h. */
11537
11538#include <sys/time.h>
11539#include <sys/resource.h>
11540
11541int
11542main ()
11543{
11544void *x=prlimit
11545 ;
11546 return 0;
11547}
11548_ACEOF
11549if ac_fn_c_try_compile "$LINENO"; then :
11550
11551$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11552
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11554$as_echo "yes" >&6; }
11555else
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11557$as_echo "no" >&6; }
11558
11559fi
11560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11561
Martin v. Löwisd5843682002-11-21 20:41:28 +000011562# On some systems (eg. FreeBSD 5), we would find a definition of the
11563# functions ctermid_r, setgroups in the library, but no prototype
11564# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11565# address to avoid compiler warnings and potential miscompilations
11566# because of the missing prototypes.
11567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11569$as_echo_n "checking for ctermid_r... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011572
Martin v. Löwisd5843682002-11-21 20:41:28 +000011573#include <stdio.h>
11574
Martin v. Löwisd5843682002-11-21 20:41:28 +000011575int
11576main ()
11577{
11578void* p = ctermid_r
11579 ;
11580 return 0;
11581}
11582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011583if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011584
Matthias Kloseb9621712010-04-24 17:59:49 +000011585$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011586
Matthias Kloseb159a552010-04-25 21:00:44 +000011587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011588$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011589else
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11591$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011592
11593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11595
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11597$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011598if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011599 $as_echo_n "(cached) " >&6
11600else
11601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011602/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011603#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011604int
11605main ()
11606{
11607void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011608
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011609 ;
11610 return 0;
11611}
11612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011614 ac_cv_flock_decl=yes
11615else
11616 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011617
11618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011620
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011621fi
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11623$as_echo "$ac_cv_flock_decl" >&6; }
11624if test "x${ac_cv_flock_decl}" = xyes; then
11625 for ac_func in flock
11626do :
11627 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011628if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011629 cat >>confdefs.h <<_ACEOF
11630#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011631_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011632
Antoine Pitroua3000072010-09-07 14:52:42 +000011633else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011635$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011636if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011637 $as_echo_n "(cached) " >&6
11638else
11639 ac_check_lib_save_LIBS=$LIBS
11640LIBS="-lbsd $LIBS"
11641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11642/* end confdefs.h. */
11643
11644/* Override any GCC internal prototype to avoid an error.
11645 Use char because int might match the return type of a GCC
11646 builtin and then its argument prototype would still apply. */
11647#ifdef __cplusplus
11648extern "C"
11649#endif
11650char flock ();
11651int
11652main ()
11653{
11654return flock ();
11655 ;
11656 return 0;
11657}
11658_ACEOF
11659if ac_fn_c_try_link "$LINENO"; then :
11660 ac_cv_lib_bsd_flock=yes
11661else
11662 ac_cv_lib_bsd_flock=no
11663fi
11664rm -f core conftest.err conftest.$ac_objext \
11665 conftest$ac_exeext conftest.$ac_ext
11666LIBS=$ac_check_lib_save_LIBS
11667fi
11668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11669$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011670if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011671 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011672
11673
11674$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11675
11676
11677fi
11678
11679
11680fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011681done
11682
Antoine Pitroua3000072010-09-07 14:52:42 +000011683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11686$as_echo_n "checking for getpagesize... " >&6; }
11687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011688/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011689
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011690#include <unistd.h>
11691
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011692int
11693main ()
11694{
11695void* p = getpagesize
11696 ;
11697 return 0;
11698}
11699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011703
Matthias Kloseb159a552010-04-25 21:00:44 +000011704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011705$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011706else
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11708$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011709
11710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011712
Victor Stinner984890f2011-11-24 13:53:38 +010011713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11714$as_echo_n "checking for broken unsetenv... " >&6; }
11715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716/* end confdefs.h. */
11717
11718#include <stdlib.h>
11719
11720int
11721main ()
11722{
11723int res = unsetenv("DUMMY")
11724 ;
11725 return 0;
11726}
11727_ACEOF
11728if ac_fn_c_try_compile "$LINENO"; then :
11729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730$as_echo "no" >&6; }
11731else
11732
11733$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11734
11735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11736$as_echo "yes" >&6; }
11737
11738fi
11739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11740
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011741for ac_prog in true
11742do
11743 # Extract the first word of "$ac_prog", so it can be a program name with args.
11744set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011747if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011749else
11750 if test -n "$TRUE"; then
11751 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11752else
11753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11754for as_dir in $PATH
11755do
11756 IFS=$as_save_IFS
11757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011760 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 $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 +000011762 break 2
11763 fi
11764done
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011766IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011767
11768fi
11769fi
11770TRUE=$ac_cv_prog_TRUE
11771if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11773$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011774else
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11776$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011777fi
11778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011780 test -n "$TRUE" && break
11781done
11782test -n "$TRUE" || TRUE="/bin/true"
11783
11784
Matthias Kloseb9621712010-04-24 17:59:49 +000011785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11786$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011787if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789else
11790 ac_check_lib_save_LIBS=$LIBS
11791LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011793/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011795/* Override any GCC internal prototype to avoid an error.
11796 Use char because int might match the return type of a GCC
11797 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798#ifdef __cplusplus
11799extern "C"
11800#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802int
11803main ()
11804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011805return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011806 ;
11807 return 0;
11808}
11809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811 ac_cv_lib_c_inet_aton=yes
11812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011815rm -f core conftest.err conftest.$ac_objext \
11816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011817LIBS=$ac_check_lib_save_LIBS
11818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11820$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011821if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011822 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11825$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011826if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828else
11829 ac_check_lib_save_LIBS=$LIBS
11830LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011832/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011834/* Override any GCC internal prototype to avoid an error.
11835 Use char because int might match the return type of a GCC
11836 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011837#ifdef __cplusplus
11838extern "C"
11839#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011841int
11842main ()
11843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011850 ac_cv_lib_resolv_inet_aton=yes
11851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011854rm -f core conftest.err conftest.$ac_objext \
11855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011856LIBS=$ac_check_lib_save_LIBS
11857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11859$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011860if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011861 cat >>confdefs.h <<_ACEOF
11862#define HAVE_LIBRESOLV 1
11863_ACEOF
11864
11865 LIBS="-lresolv $LIBS"
11866
11867fi
11868
11869
11870fi
11871
11872
Christian Heimesd0764e22007-12-04 15:00:33 +000011873# On Tru64, chflags seems to be present, but calling it will
11874# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11876$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011877if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011881 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011884/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011885
Christian Heimesd0764e22007-12-04 15:00:33 +000011886#include <sys/stat.h>
11887#include <unistd.h>
11888int main(int argc, char*argv[])
11889{
11890 if(chflags(argv[0], 0) != 0)
11891 return 1;
11892 return 0;
11893}
Ned Deily3eb67d52011-06-28 00:00:28 -070011894
Christian Heimesd0764e22007-12-04 15:00:33 +000011895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011897 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011903fi
11904
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011905
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11908$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011909if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011911if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011912 ac_cv_have_chflags="yes"
11913else
11914 ac_cv_have_chflags="no"
11915fi
11916
11917fi
11918if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011921
11922fi
11923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11925$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011926if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011930 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011931else
Matthias Kloseb9621712010-04-24 17:59:49 +000011932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011933/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011934
Christian Heimesd0764e22007-12-04 15:00:33 +000011935#include <sys/stat.h>
11936#include <unistd.h>
11937int main(int argc, char*argv[])
11938{
11939 if(lchflags(argv[0], 0) != 0)
11940 return 1;
11941 return 0;
11942}
Ned Deily3eb67d52011-06-28 00:00:28 -070011943
Christian Heimesd0764e22007-12-04 15:00:33 +000011944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011945if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011946 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011952fi
11953
11954
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11957$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011958if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011960if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011961 ac_cv_have_lchflags="yes"
11962else
11963 ac_cv_have_lchflags="no"
11964fi
11965
11966fi
11967if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011970
11971fi
11972
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011973case $ac_sys_system/$ac_sys_release in
11974Darwin/*)
11975 _CUR_CFLAGS="${CFLAGS}"
11976 _CUR_LDFLAGS="${LDFLAGS}"
11977 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11978 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11979 ;;
11980esac
11981
Matthias Kloseb9621712010-04-24 17:59:49 +000011982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11983$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011984if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011986else
11987 ac_check_lib_save_LIBS=$LIBS
11988LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011990/* end confdefs.h. */
11991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011992/* Override any GCC internal prototype to avoid an error.
11993 Use char because int might match the return type of a GCC
11994 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011995#ifdef __cplusplus
11996extern "C"
11997#endif
11998char inflateCopy ();
11999int
12000main ()
12001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012002return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012003 ;
12004 return 0;
12005}
12006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012007if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012008 ac_cv_lib_z_inflateCopy=yes
12009else
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012012rm -f core conftest.err conftest.$ac_objext \
12013 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012014LIBS=$ac_check_lib_save_LIBS
12015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12017$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012018if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012021
12022fi
12023
12024
12025case $ac_sys_system/$ac_sys_release in
12026Darwin/*)
12027 CFLAGS="${_CUR_CFLAGS}"
12028 LDFLAGS="${_CUR_LDFLAGS}"
12029 ;;
12030esac
12031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12033$as_echo_n "checking for hstrerror... " >&6; }
12034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012035/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012036
Martin v. Löwise9416172003-05-03 10:12:45 +000012037#include <netdb.h>
12038
Martin v. Löwise9416172003-05-03 10:12:45 +000012039int
12040main ()
12041{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012042void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012043 ;
12044 return 0;
12045}
12046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012050
Matthias Kloseb159a552010-04-25 21:00:44 +000012051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012052$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012053else
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12055$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012056
12057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058rm -f core conftest.err conftest.$ac_objext \
12059 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060
Matthias Kloseb9621712010-04-24 17:59:49 +000012061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12062$as_echo_n "checking for inet_aton... " >&6; }
12063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012064/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012065
Martin v. Löwis86d66262006-02-17 08:40:11 +000012066#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012067#include <sys/socket.h>
12068#include <netinet/in.h>
12069#include <arpa/inet.h>
12070
Martin v. Löwise9416172003-05-03 10:12:45 +000012071int
12072main ()
12073{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012074void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012075 ;
12076 return 0;
12077}
12078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012080
Matthias Kloseb9621712010-04-24 17:59:49 +000012081$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012082
Matthias Kloseb159a552010-04-25 21:00:44 +000012083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012084$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012085else
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12087$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012088
12089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012090rm -f core conftest.err conftest.$ac_objext \
12091 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12094$as_echo_n "checking for inet_pton... " >&6; }
12095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012097
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012098#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012099#include <sys/socket.h>
12100#include <netinet/in.h>
12101#include <arpa/inet.h>
12102
Martin v. Löwise9416172003-05-03 10:12:45 +000012103int
12104main ()
12105{
12106void* p = inet_pton
12107 ;
12108 return 0;
12109}
12110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012112
Matthias Kloseb9621712010-04-24 17:59:49 +000012113$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012114
Matthias Kloseb159a552010-04-25 21:00:44 +000012115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012116$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12119$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012120
12121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012123
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012124# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12126$as_echo_n "checking for setgroups... " >&6; }
12127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012128/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012129
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012130#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012131#ifdef HAVE_GRP_H
12132#include <grp.h>
12133#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012134
Martin v. Löwisd5843682002-11-21 20:41:28 +000012135int
12136main ()
12137{
12138void* p = setgroups
12139 ;
12140 return 0;
12141}
12142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012144
Matthias Kloseb9621712010-04-24 17:59:49 +000012145$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146
Matthias Kloseb159a552010-04-25 21:00:44 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012148$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012152
12153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012155
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012156# check for openpty and forkpty
12157
12158for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012159do :
12160 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012161if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012164_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012165
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12168$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012169if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171else
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012173LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177/* Override any GCC internal prototype to avoid an error.
12178 Use char because int might match the return type of a GCC
12179 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012180#ifdef __cplusplus
12181extern "C"
12182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012183char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012184int
12185main ()
12186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 ;
12189 return 0;
12190}
12191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012197rm -f core conftest.err conftest.$ac_objext \
12198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012199LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12202$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206else
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12208$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211else
12212 ac_check_lib_save_LIBS=$LIBS
12213LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215/* end confdefs.h. */
12216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217/* Override any GCC internal prototype to avoid an error.
12218 Use char because int might match the return type of a GCC
12219 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220#ifdef __cplusplus
12221extern "C"
12222#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012223char openpty ();
12224int
12225main ()
12226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012228 ;
12229 return 0;
12230}
12231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012233 ac_cv_lib_bsd_openpty=yes
12234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012237rm -f core conftest.err conftest.$ac_objext \
12238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012239LIBS=$ac_check_lib_save_LIBS
12240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12242$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012245 LIBS="$LIBS -lbsd"
12246fi
12247
12248
12249fi
12250
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251
12252fi
12253done
12254
12255for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012256do :
12257 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012258if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012260#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012261_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262
Fred Drake8cef4cf2000-06-28 16:40:38 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12265$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012266if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268else
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274/* Override any GCC internal prototype to avoid an error.
12275 Use char because int might match the return type of a GCC
12276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012277#ifdef __cplusplus
12278extern "C"
12279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012280char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012281int
12282main ()
12283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 ;
12286 return 0;
12287}
12288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012289if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012291else
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012294rm -f core conftest.err conftest.$ac_objext \
12295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012296LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12299$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012302 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12305$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012306if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012308else
12309 ac_check_lib_save_LIBS=$LIBS
12310LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012312/* end confdefs.h. */
12313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314/* Override any GCC internal prototype to avoid an error.
12315 Use char because int might match the return type of a GCC
12316 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012317#ifdef __cplusplus
12318extern "C"
12319#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012320char forkpty ();
12321int
12322main ()
12323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012330 ac_cv_lib_bsd_forkpty=yes
12331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012334rm -f core conftest.err conftest.$ac_objext \
12335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012336LIBS=$ac_check_lib_save_LIBS
12337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12339$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012340if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012342 LIBS="$LIBS -lbsd"
12343fi
12344
12345
12346fi
12347
Fred Drake8cef4cf2000-06-28 16:40:38 +000012348
12349fi
12350done
12351
Jack Jansendd19cf82001-12-06 22:36:17 +000012352
Christian Heimesb186d002008-03-18 15:15:01 +000012353# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012354for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012355do :
12356 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012357if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012358 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012360_ACEOF
12361
12362fi
12363done
12364
12365
Michael W. Hudson54241132001-12-07 15:38:26 +000012366# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012367for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012368do :
12369 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12370ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012371if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012373#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012374_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012376fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012377done
12378
Michael W. Hudson54241132001-12-07 15:38:26 +000012379
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012380ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012381if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012382 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012383
Martin v. Löwis1142de32002-03-29 16:28:31 +000012384else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012386 *" dup2.$ac_objext "* ) ;;
12387 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012389esac
12390
Martin v. Löwis1142de32002-03-29 16:28:31 +000012391fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012392
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012393ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012394if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012395 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12396
12397else
12398 case " $LIBOBJS " in
12399 *" strdup.$ac_objext "* ) ;;
12400 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12401 ;;
12402esac
12403
12404fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012405
12406
12407for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012408do :
12409 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012410if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012412#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012415/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012417int
12418main ()
12419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012428
Guido van Rossum627b2d71993-12-24 10:39:16 +000012429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012431
Guido van Rossum627b2d71993-12-24 10:39:16 +000012432fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012433done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012434
Jack Jansen150753c2003-03-29 22:07:47 +000012435for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012436do :
12437 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012438if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012439 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012443/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012444#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012445int
12446main ()
12447{
12448setpgrp(0,0);
12449 ;
12450 return 0;
12451}
12452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012456
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012459
12460fi
12461done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012462
Thomas Wouters3a584202000-08-05 23:28:51 +000012463for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012464do :
12465 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012466if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012467 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012468#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012472#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012473int
12474main ()
12475{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_compile "$LINENO"; then :
12482
Guido van Rossum627b2d71993-12-24 10:39:16 +000012483else
Skip Montanaro6dead952003-09-25 14:50:04 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012486
Martin v. Löwis11437992002-04-12 09:54:03 +000012487
Guido van Rossum627b2d71993-12-24 10:39:16 +000012488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012490
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012491fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012492done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012493
Michael W. Hudson54241132001-12-07 15:38:26 +000012494
Victor Stinnere0be4232011-10-25 13:06:09 +020012495for ac_func in clock_gettime
12496do :
12497 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12498if test "x$ac_cv_func_clock_gettime" = xyes; then :
12499 cat >>confdefs.h <<_ACEOF
12500#define HAVE_CLOCK_GETTIME 1
12501_ACEOF
12502
12503else
12504
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12506$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12507if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12508 $as_echo_n "(cached) " >&6
12509else
12510 ac_check_lib_save_LIBS=$LIBS
12511LIBS="-lrt $LIBS"
12512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12513/* end confdefs.h. */
12514
12515/* Override any GCC internal prototype to avoid an error.
12516 Use char because int might match the return type of a GCC
12517 builtin and then its argument prototype would still apply. */
12518#ifdef __cplusplus
12519extern "C"
12520#endif
12521char clock_gettime ();
12522int
12523main ()
12524{
12525return clock_gettime ();
12526 ;
12527 return 0;
12528}
12529_ACEOF
12530if ac_fn_c_try_link "$LINENO"; then :
12531 ac_cv_lib_rt_clock_gettime=yes
12532else
12533 ac_cv_lib_rt_clock_gettime=no
12534fi
12535rm -f core conftest.err conftest.$ac_objext \
12536 conftest$ac_exeext conftest.$ac_ext
12537LIBS=$ac_check_lib_save_LIBS
12538fi
12539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12540$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12541if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12542
Victor Stinner7efb8332014-08-29 15:41:08 +020012543 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012544 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12545
12546
12547$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12548
12549
12550fi
12551
12552
12553fi
12554done
12555
12556
12557for ac_func in clock_getres
12558do :
12559 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12560if test "x$ac_cv_func_clock_getres" = xyes; then :
12561 cat >>confdefs.h <<_ACEOF
12562#define HAVE_CLOCK_GETRES 1
12563_ACEOF
12564
12565else
12566
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12568$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12569if ${ac_cv_lib_rt_clock_getres+:} false; then :
12570 $as_echo_n "(cached) " >&6
12571else
12572 ac_check_lib_save_LIBS=$LIBS
12573LIBS="-lrt $LIBS"
12574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12575/* end confdefs.h. */
12576
12577/* Override any GCC internal prototype to avoid an error.
12578 Use char because int might match the return type of a GCC
12579 builtin and then its argument prototype would still apply. */
12580#ifdef __cplusplus
12581extern "C"
12582#endif
12583char clock_getres ();
12584int
12585main ()
12586{
12587return clock_getres ();
12588 ;
12589 return 0;
12590}
12591_ACEOF
12592if ac_fn_c_try_link "$LINENO"; then :
12593 ac_cv_lib_rt_clock_getres=yes
12594else
12595 ac_cv_lib_rt_clock_getres=no
12596fi
12597rm -f core conftest.err conftest.$ac_objext \
12598 conftest$ac_exeext conftest.$ac_ext
12599LIBS=$ac_check_lib_save_LIBS
12600fi
12601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12602$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12603if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12604
12605 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12606
12607
12608fi
12609
12610
12611fi
12612done
12613
12614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12616$as_echo_n "checking for major... " >&6; }
12617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012619
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012620#if defined(MAJOR_IN_MKDEV)
12621#include <sys/mkdev.h>
12622#elif defined(MAJOR_IN_SYSMACROS)
12623#include <sys/sysmacros.h>
12624#else
12625#include <sys/types.h>
12626#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012627
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012628int
12629main ()
12630{
12631
12632 makedev(major(0),minor(0));
12633
12634 ;
12635 return 0;
12636}
12637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012639
12640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012642
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12644$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012645
12646else
Skip Montanaro6dead952003-09-25 14:50:04 +000012647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12649$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012650
12651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012652rm -f core conftest.err conftest.$ac_objext \
12653 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012654
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012655# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012656# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12658$as_echo_n "checking for getaddrinfo... " >&6; }
12659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012660/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012661
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012662#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012663#include <sys/socket.h>
12664#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012665#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012666
Martin v. Löwis11437992002-04-12 09:54:03 +000012667int
12668main ()
12669{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012670getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012671 ;
12672 return 0;
12673}
12674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012675if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012676 have_getaddrinfo=yes
12677else
Matthias Kloseb9621712010-04-24 17:59:49 +000012678 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012680rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
12682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12683$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012684if test $have_getaddrinfo = yes
12685then
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12687$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012688 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012690else
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012692
12693if test "${enable_ipv6+set}" = set; then
12694 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12695else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012696 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012697fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012698else
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012700/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701
Stefan Krah19c21392012-11-22 23:47:32 +010012702#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012703#include <sys/types.h>
12704#include <netdb.h>
12705#include <string.h>
12706#include <sys/socket.h>
12707#include <netinet/in.h>
12708
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012709int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012710{
12711 int passive, gaierr, inet4 = 0, inet6 = 0;
12712 struct addrinfo hints, *ai, *aitop;
12713 char straddr[INET6_ADDRSTRLEN], strport[16];
12714
12715 for (passive = 0; passive <= 1; passive++) {
12716 memset(&hints, 0, sizeof(hints));
12717 hints.ai_family = AF_UNSPEC;
12718 hints.ai_flags = passive ? AI_PASSIVE : 0;
12719 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012720 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012721 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12722 (void)gai_strerror(gaierr);
12723 goto bad;
12724 }
12725 for (ai = aitop; ai; ai = ai->ai_next) {
12726 if (ai->ai_addr == NULL ||
12727 ai->ai_addrlen == 0 ||
12728 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12729 straddr, sizeof(straddr), strport, sizeof(strport),
12730 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12731 goto bad;
12732 }
12733 switch (ai->ai_family) {
12734 case AF_INET:
12735 if (strcmp(strport, "54321") != 0) {
12736 goto bad;
12737 }
12738 if (passive) {
12739 if (strcmp(straddr, "0.0.0.0") != 0) {
12740 goto bad;
12741 }
12742 } else {
12743 if (strcmp(straddr, "127.0.0.1") != 0) {
12744 goto bad;
12745 }
12746 }
12747 inet4++;
12748 break;
12749 case AF_INET6:
12750 if (strcmp(strport, "54321") != 0) {
12751 goto bad;
12752 }
12753 if (passive) {
12754 if (strcmp(straddr, "::") != 0) {
12755 goto bad;
12756 }
12757 } else {
12758 if (strcmp(straddr, "::1") != 0) {
12759 goto bad;
12760 }
12761 }
12762 inet6++;
12763 break;
12764 case AF_UNSPEC:
12765 goto bad;
12766 break;
12767 default:
12768 /* another family support? */
12769 break;
12770 }
12771 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012772 freeaddrinfo(aitop);
12773 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012774 }
12775
12776 if (!(inet4 == 0 || inet4 == 2))
12777 goto bad;
12778 if (!(inet6 == 0 || inet6 == 2))
12779 goto bad;
12780
12781 if (aitop)
12782 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012783 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012784
12785 bad:
12786 if (aitop)
12787 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012788 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012789}
12790
Martin v. Löwis11437992002-04-12 09:54:03 +000012791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012792if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012793 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012800
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012801fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012802
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012804
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12806$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12807
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012808if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012809then
12810 if test $ipv6 = yes
12811 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012812 echo 'Fatal: You must get working getaddrinfo() function.'
12813 echo ' or you can specify "--disable-ipv6"'.
12814 exit 1
12815 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012816else
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012819
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012820fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012821
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012822for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012823do :
12824 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012825if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012827#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012828_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012829
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012830fi
12831done
12832
Michael W. Hudson54241132001-12-07 15:38:26 +000012833
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012834# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12836$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012837if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012839else
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012841/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012842#include <sys/types.h>
12843#include <sys/time.h>
12844#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012845
Martin v. Löwis11437992002-04-12 09:54:03 +000012846int
12847main ()
12848{
12849if ((struct tm *) 0)
12850return 0;
12851 ;
12852 return 0;
12853}
12854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012855if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012857else
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12863$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012864if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
Matthias Kloseb9621712010-04-24 17:59:49 +000012866$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012867
12868fi
12869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12871$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012872if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877#include <sys/types.h>
12878#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012879
Martin v. Löwis11437992002-04-12 09:54:03 +000012880int
12881main ()
12882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883struct tm tm;
12884 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 ;
12887 return 0;
12888}
12889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012890if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012891 ac_cv_struct_tm=time.h
12892else
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12898$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012899if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902
12903fi
12904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905ac_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 +000012906#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908"
Victor Stinnere0be4232011-10-25 13:06:09 +020012909if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012910
12911cat >>confdefs.h <<_ACEOF
12912#define HAVE_STRUCT_TM_TM_ZONE 1
12913_ACEOF
12914
12915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012916fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012917
Martin v. Löwis11437992002-04-12 09:54:03 +000012918if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921
12922else
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12924"
Victor Stinnere0be4232011-10-25 13:06:09 +020012925if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927else
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929fi
12930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012932#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933_ACEOF
12934
Matthias Kloseb9621712010-04-24 17:59:49 +000012935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12936$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012937if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939else
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012941/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012942#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943#if !HAVE_DECL_TZNAME
12944extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Martin v. Löwis11437992002-04-12 09:54:03 +000012947int
12948main ()
12949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ;
12952 return 0;
12953}
12954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012955if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956 ac_cv_var_tzname=yes
12957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012960rm -f core conftest.err conftest.$ac_objext \
12961 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12964$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012965 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012966
Matthias Kloseb9621712010-04-24 17:59:49 +000012967$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012968
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012969 fi
12970fi
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972ac_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 +020012973if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012974
12975cat >>confdefs.h <<_ACEOF
12976#define HAVE_STRUCT_STAT_ST_RDEV 1
12977_ACEOF
12978
12979
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012980fi
12981
Matthias Kloseb9621712010-04-24 17:59:49 +000012982ac_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 +020012983if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012984
Martin v. Löwis11437992002-04-12 09:54:03 +000012985cat >>confdefs.h <<_ACEOF
12986#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12987_ACEOF
12988
12989
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012990fi
12991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992ac_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 +020012993if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012994
12995cat >>confdefs.h <<_ACEOF
12996#define HAVE_STRUCT_STAT_ST_FLAGS 1
12997_ACEOF
12998
12999
13000fi
13001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002ac_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 +020013003if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013004
13005cat >>confdefs.h <<_ACEOF
13006#define HAVE_STRUCT_STAT_ST_GEN 1
13007_ACEOF
13008
13009
13010fi
13011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012ac_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 +020013013if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013014
13015cat >>confdefs.h <<_ACEOF
13016#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13017_ACEOF
13018
13019
13020fi
13021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022ac_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 +020013023if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013024
Martin v. Löwis11437992002-04-12 09:54:03 +000013025cat >>confdefs.h <<_ACEOF
13026#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13027_ACEOF
13028
13029
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013030fi
13031
Michael W. Hudson54241132001-12-07 15:38:26 +000013032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13034$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013035if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013037else
Matthias Kloseb159a552010-04-25 21:00:44 +000013038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013040/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013041#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013042int
13043main ()
13044{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013045return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 ;
13047 return 0;
13048}
13049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013050if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013051 ac_cv_header_time_altzone=yes
13052else
Matthias Kloseb9621712010-04-24 17:59:49 +000013053 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013057fi
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13060$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013061if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064
13065fi
13066
Guido van Rossumda88dad1995-01-26 00:46:29 +000013067was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13069$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013071/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013072
13073#include <sys/types.h>
13074#include <sys/select.h>
13075#include <sys/time.h>
13076
Martin v. Löwis11437992002-04-12 09:54:03 +000013077int
13078main ()
13079{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080;
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 ;
13082 return 0;
13083}
13084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
13087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013090 was_it_defined=yes
13091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13095$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13098$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013099if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013101else
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013103/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013104#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013105int
13106main ()
13107{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013108struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013109 ;
13110 return 0;
13111}
13112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013114 ac_cv_struct_addrinfo=yes
13115else
Matthias Kloseb9621712010-04-24 17:59:49 +000013116 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13119fi
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13122$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126
13127fi
13128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13130$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013131if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013133else
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013135/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013136
13137# include <sys/types.h>
13138# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013139int
13140main ()
13141{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 ;
13144 return 0;
13145}
13146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013148 ac_cv_struct_sockaddr_storage=yes
13149else
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13153fi
13154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13156$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013160
13161fi
13162
Guido van Rossum627b2d71993-12-24 10:39:16 +000013163# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13166$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013167if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013169else
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013172$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013173int
13174main ()
13175{
13176static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013177test_array [0] = 0;
13178return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
13180 ;
13181 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013182}
Martin v. Löwis11437992002-04-12 09:54:03 +000013183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013184if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013185 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013186else
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13192$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013195
13196fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13199$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013200if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013202else
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013204/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013205
Martin v. Löwis11437992002-04-12 09:54:03 +000013206int
13207main ()
13208{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013209
Martin v. Löwis11437992002-04-12 09:54:03 +000013210#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013211 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013213 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215 char const *const *pcpcc;
13216 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 /* NEC SVR4.0.2 mips cc rejects this. */
13218 struct point {int x, y;};
13219 static struct point const zero = {0,0};
13220 /* AIX XL C 1.02.0.0 rejects this.
13221 It does not let you subtract one const X* pointer from another in
13222 an arm of an if-expression whose if-part is not a constant
13223 expression */
13224 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013227 ++pcpcc;
13228 ppc = (char**) pcpcc;
13229 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013230 { /* SCO 3.2v4 cc rejects this sort of thing. */
13231 char tx;
13232 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013236 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013237 }
13238 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13239 int x[] = {25, 17};
13240 const int *foo = &x[0];
13241 ++foo;
13242 }
13243 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13244 typedef const int *iptr;
13245 iptr p = 0;
13246 ++p;
13247 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013248 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013250 struct s { int j; const int *ap[3]; } bx;
13251 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 }
13253 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13254 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013255 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013256 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013257 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013258#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260 ;
13261 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013262}
Martin v. Löwis11437992002-04-12 09:54:03 +000013263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013264if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013265 ac_cv_c_const=yes
13266else
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13272$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013273if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276
13277fi
13278
Michael W. Hudson54241132001-12-07 15:38:26 +000013279
Guido van Rossumda88dad1995-01-26 00:46:29 +000013280works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13282$as_echo_n "checking for working volatile... " >&6; }
13283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013284/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013285
Martin v. Löwis11437992002-04-12 09:54:03 +000013286int
13287main ()
13288{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013290 ;
13291 return 0;
13292}
13293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013294if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013295 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013296else
Skip Montanaro6dead952003-09-25 14:50:04 +000013297
Matthias Kloseb9621712010-04-24 17:59:49 +000013298$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013299
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013300
Guido van Rossum627b2d71993-12-24 10:39:16 +000013301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13304$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013305
Guido van Rossumda88dad1995-01-26 00:46:29 +000013306works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13308$as_echo_n "checking for working signed char... " >&6; }
13309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013310/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013311
Martin v. Löwis11437992002-04-12 09:54:03 +000013312int
13313main ()
13314{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 ;
13317 return 0;
13318}
13319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013320if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013321 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013322else
Skip Montanaro6dead952003-09-25 14:50:04 +000013323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013325
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013326
Guido van Rossum7f43da71994-08-01 12:15:30 +000013327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13330$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013331
Guido van Rossumda88dad1995-01-26 00:46:29 +000013332have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13334$as_echo_n "checking for prototypes... " >&6; }
13335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013336/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013337int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013338int
13339main ()
13340{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 ;
13343 return 0;
13344}
13345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Matthias Kloseb159a552010-04-25 21:00:44 +000013350 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13354$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013355
Guido van Rossumda88dad1995-01-26 00:46:29 +000013356works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13358$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013360/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013361
13362#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013363int foo(int x, ...) {
13364 va_list va;
13365 va_start(va, x);
13366 va_arg(va, int);
13367 va_arg(va, char *);
13368 va_arg(va, double);
13369 return 0;
13370}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372int
13373main ()
13374{
Guido van Rossum90eea071996-08-30 20:58:57 +000013375return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
13382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013385 works=yes
13386
Guido van Rossum627b2d71993-12-24 10:39:16 +000013387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13390$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013391
Martin v. Löwisd6320502004-08-12 13:45:08 +000013392# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13394$as_echo_n "checking for socketpair... " >&6; }
13395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013396/* end confdefs.h. */
13397
13398#include <sys/types.h>
13399#include <sys/socket.h>
13400
13401int
13402main ()
13403{
13404void *x=socketpair
13405 ;
13406 return 0;
13407}
13408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013412
Matthias Kloseb159a552010-04-25 21:00:44 +000013413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013414$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13417$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013418
13419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013421
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013422# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13424$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013426/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013427#include <sys/types.h>
13428#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013429int
13430main ()
13431{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013432struct sockaddr x;
13433x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 ;
13435 return 0;
13436}
13437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013438if ac_fn_c_try_compile "$LINENO"; then :
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13440$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013443
13444else
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13446$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013447
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013450
Guido van Rossumda88dad1995-01-26 00:46:29 +000013451va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13453$as_echo_n "checking whether va_list is an array... " >&6; }
13454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013455/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013456
13457#ifdef HAVE_STDARG_PROTOTYPES
13458#include <stdarg.h>
13459#else
13460#include <varargs.h>
13461#endif
13462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463int
13464main ()
13465{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013466va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 ;
13468 return 0;
13469}
13470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013471if ac_fn_c_try_compile "$LINENO"; then :
13472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473else
Skip Montanaro6dead952003-09-25 14:50:04 +000013474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013477
Guido van Rossumda88dad1995-01-26 00:46:29 +000013478 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013479
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13483$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013485# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
13487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013489if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13494$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013495 OLD_CFLAGS=$CFLAGS
13496 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013498/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013499
13500# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013501
Martin v. Löwis11437992002-04-12 09:54:03 +000013502int
13503main ()
13504{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013505
13506 char *name;
13507 struct hostent *he, *res;
13508 char buffer[2048];
13509 int buflen = 2048;
13510 int h_errnop;
13511
13512 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
13514 ;
13515 return 0;
13516}
13517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013521
Martin v. Löwis11437992002-04-12 09:54:03 +000013522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13526$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013528else
Skip Montanaro6dead952003-09-25 14:50:04 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13531$as_echo "no" >&6; }
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13533$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013535/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013536
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013537# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
Martin v. Löwis11437992002-04-12 09:54:03 +000013539int
13540main ()
13541{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013542
13543 char *name;
13544 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013545 char buffer[2048];
13546 int buflen = 2048;
13547 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013548
Matthias Kloseb159a552010-04-25 21:00:44 +000013549 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
13551 ;
13552 return 0;
13553}
13554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559
Matthias Kloseb159a552010-04-25 21:00:44 +000013560$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13563$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013565else
Skip Montanaro6dead952003-09-25 14:50:04 +000013566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13568$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13570$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13572/* end confdefs.h. */
13573
13574# include <netdb.h>
13575
13576int
13577main ()
13578{
13579
13580 char *name;
13581 struct hostent *he;
13582 struct hostent_data data;
13583
13584 (void) gethostbyname_r(name, he, &data);
13585
13586 ;
13587 return 0;
13588}
13589_ACEOF
13590if ac_fn_c_try_compile "$LINENO"; then :
13591
13592 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13593
13594
13595$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13596
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13598$as_echo "yes" >&6; }
13599
13600else
13601
13602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13603$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013604
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013610
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013613 CFLAGS=$OLD_CFLAGS
13614
13615else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 for ac_func in gethostbyname
13618do :
13619 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013620if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013622#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013623_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013625fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013626done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013627
Michael W. Hudson54241132001-12-07 15:38:26 +000013628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013629fi
13630
Michael W. Hudson54241132001-12-07 15:38:26 +000013631
13632
13633
13634
13635
13636
Guido van Rossum627b2d71993-12-24 10:39:16 +000013637# checks for system services
13638# (none yet)
13639
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013640# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013641ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013642if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013643
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13646$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013647if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013649else
Martin v. Löwis11437992002-04-12 09:54:03 +000013650 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013651LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655/* Override any GCC internal prototype to avoid an error.
13656 Use char because int might match the return type of a GCC
13657 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013658#ifdef __cplusplus
13659extern "C"
13660#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013661char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013662int
13663main ()
13664{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013665return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 ;
13667 return 0;
13668}
13669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013670if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013672else
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013675rm -f core conftest.err conftest.$ac_objext \
13676 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013677LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13680$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013681if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013682 cat >>confdefs.h <<_ACEOF
13683#define HAVE_LIBIEEE 1
13684_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013686 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013687
Guido van Rossum627b2d71993-12-24 10:39:16 +000013688fi
13689
Michael W. Hudson54241132001-12-07 15:38:26 +000013690
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013691fi
13692
Michael W. Hudson54241132001-12-07 15:38:26 +000013693
Guido van Rossum7f253911997-05-09 02:42:48 +000013694# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13696$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013699if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013701if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013702then
13703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13707$as_echo "yes" >&6; }
13708else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13709$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013710fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13713$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714fi
13715
Guido van Rossum7f253911997-05-09 02:42:48 +000013716
Guido van Rossum7f43da71994-08-01 12:15:30 +000013717# check for --with-libm=...
13718
Guido van Rossum563e7081996-09-10 18:20:48 +000013719case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013720Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013721*) LIBM=-lm
13722esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13724$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013727if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013729if test "$withval" = no
13730then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13732$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013733elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013734then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13736$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013737else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013738fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13741$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013742fi
13743
Guido van Rossum7f43da71994-08-01 12:15:30 +000013744
13745# check for --with-libc=...
13746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13748$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013751if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013752 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013753if test "$withval" = no
13754then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13756$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013757elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013758then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13760$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013761else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013762fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13765$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766fi
13767
Guido van Rossum7f43da71994-08-01 12:15:30 +000013768
Stefan Krah1919b7e2012-03-21 18:25:23 +010013769# **************************************
13770# * Check for gcc x64 inline assembler *
13771# **************************************
13772
13773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13774$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776/* end confdefs.h. */
13777
13778int
13779main ()
13780{
13781
13782 __asm__ __volatile__ ("movq %rcx, %rax");
13783
13784 ;
13785 return 0;
13786}
13787_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013788if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013789 have_gcc_asm_for_x64=yes
13790else
13791 have_gcc_asm_for_x64=no
13792fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013793rm -f core conftest.err conftest.$ac_objext \
13794 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13796$as_echo "$have_gcc_asm_for_x64" >&6; }
13797if test "$have_gcc_asm_for_x64" = yes
13798then
13799
13800$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13801
13802fi
13803
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013804# **************************************************
13805# * Check for various properties of floating point *
13806# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13809$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013810if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013811 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013812else
13813
Matthias Kloseb9621712010-04-24 17:59:49 +000013814if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815 ac_cv_little_endian_double=no
13816else
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013818/* end confdefs.h. */
13819
13820#include <string.h>
13821int main() {
13822 double x = 9006104071832581.0;
13823 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13824 return 0;
13825 else
13826 return 1;
13827}
13828
13829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013830if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831 ac_cv_little_endian_double=yes
13832else
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013837fi
13838
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013839fi
13840
Matthias Kloseb9621712010-04-24 17:59:49 +000013841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13842$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013843if test "$ac_cv_little_endian_double" = yes
13844then
13845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013847
13848fi
13849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13851$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013852if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854else
13855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857 ac_cv_big_endian_double=no
13858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860/* end confdefs.h. */
13861
13862#include <string.h>
13863int main() {
13864 double x = 9006104071832581.0;
13865 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13866 return 0;
13867 else
13868 return 1;
13869}
13870
13871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013872if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873 ac_cv_big_endian_double=yes
13874else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879fi
13880
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013881fi
13882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13884$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013885if test "$ac_cv_big_endian_double" = yes
13886then
13887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013889
13890fi
13891
13892# Some ARM platforms use a mixed-endian representation for doubles.
13893# While Python doesn't currently have full support for these platforms
13894# (see e.g., issue 1762561), we can at least make sure that float <-> string
13895# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13897$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013898if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013900else
13901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903 ac_cv_mixed_endian_double=no
13904else
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906/* end confdefs.h. */
13907
13908#include <string.h>
13909int main() {
13910 double x = 9006104071832581.0;
13911 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13912 return 0;
13913 else
13914 return 1;
13915}
13916
13917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013918if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013919 ac_cv_mixed_endian_double=yes
13920else
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013925fi
13926
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013927fi
13928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13930$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013931if test "$ac_cv_mixed_endian_double" = yes
13932then
13933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013935
13936fi
13937
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013938# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013939# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013940# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013941# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013942# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013943# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013944
13945# This inline assembler syntax may also work for suncc and icc,
13946# so we try it on all platforms.
13947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13949$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951/* end confdefs.h. */
13952
13953int
13954main ()
13955{
13956
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013957 unsigned short cw;
13958 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13959 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013960
13961 ;
13962 return 0;
13963}
13964_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013965if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013966 have_gcc_asm_for_x87=yes
13967else
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013969fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013970rm -f core conftest.err conftest.$ac_objext \
13971 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13973$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013974if test "$have_gcc_asm_for_x87" = yes
13975then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013978
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013980
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13982$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13984/* end confdefs.h. */
13985
13986int
13987main ()
13988{
13989
13990 unsigned int fpcr;
13991 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13992 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13993
13994 ;
13995 return 0;
13996}
13997_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013998if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013999 have_gcc_asm_for_mc68881=yes
14000else
14001 have_gcc_asm_for_mc68881=no
14002fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014003rm -f core conftest.err conftest.$ac_objext \
14004 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14006$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14007if test "$have_gcc_asm_for_mc68881" = yes
14008then
14009
14010$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14011
14012fi
14013
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014014# Detect whether system arithmetic is subject to x87-style double
14015# rounding issues. The result of this test has little meaning on non
14016# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14017# mode is round-to-nearest and double rounding issues are present, and
14018# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14020$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014021# $BASECFLAGS may affect the result
14022ac_save_cc="$CC"
14023CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014024if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014025 ac_cv_x87_double_rounding=no
14026else
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014028/* end confdefs.h. */
14029
14030#include <stdlib.h>
14031#include <math.h>
14032int main() {
14033 volatile double x, y, z;
14034 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14035 x = 0.99999999999999989; /* 1-2**-53 */
14036 y = 1./x;
14037 if (y != 1.)
14038 exit(0);
14039 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14040 x = 1e16;
14041 y = 2.99999;
14042 z = x + y;
14043 if (z != 1e16+4.)
14044 exit(0);
14045 /* both tests show evidence of double rounding */
14046 exit(1);
14047}
14048
14049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014050if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014051 ac_cv_x87_double_rounding=no
14052else
Matthias Kloseb9621712010-04-24 17:59:49 +000014053 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014057fi
14058
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014059CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14061$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014062if test "$ac_cv_x87_double_rounding" = yes
14063then
14064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014066
14067fi
14068
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014069# ************************************
14070# * Check for mathematical functions *
14071# ************************************
14072
14073LIBS_SAVE=$LIBS
14074LIBS="$LIBS $LIBM"
14075
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014076for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14077do :
14078 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14079ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014080if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014081 cat >>confdefs.h <<_ACEOF
14082#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14083_ACEOF
14084
14085fi
14086done
14087
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014088for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014089do :
14090 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14091ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014092if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014093 cat >>confdefs.h <<_ACEOF
14094#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14095_ACEOF
14096
14097fi
14098done
14099
14100ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14101"
Victor Stinnere0be4232011-10-25 13:06:09 +020014102if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014103 ac_have_decl=1
14104else
14105 ac_have_decl=0
14106fi
14107
14108cat >>confdefs.h <<_ACEOF
14109#define HAVE_DECL_ISINF $ac_have_decl
14110_ACEOF
14111ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14112"
Victor Stinnere0be4232011-10-25 13:06:09 +020014113if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014114 ac_have_decl=1
14115else
14116 ac_have_decl=0
14117fi
14118
14119cat >>confdefs.h <<_ACEOF
14120#define HAVE_DECL_ISNAN $ac_have_decl
14121_ACEOF
14122ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14123"
Victor Stinnere0be4232011-10-25 13:06:09 +020014124if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014125 ac_have_decl=1
14126else
14127 ac_have_decl=0
14128fi
14129
14130cat >>confdefs.h <<_ACEOF
14131#define HAVE_DECL_ISFINITE $ac_have_decl
14132_ACEOF
14133
14134
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014135# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14136# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14138$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014139if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014141else
14142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014144 ac_cv_tanh_preserves_zero_sign=no
14145else
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014147/* end confdefs.h. */
14148
14149#include <math.h>
14150#include <stdlib.h>
14151int main() {
14152 /* return 0 if either negative zeros don't exist
14153 on this platform or if negative zeros exist
14154 and tanh(-0.) == -0. */
14155 if (atan2(0., -1.) == atan2(-0., -1.) ||
14156 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14157 else exit(1);
14158}
14159
14160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014161if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014162 ac_cv_tanh_preserves_zero_sign=yes
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014168fi
14169
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014170fi
14171
Matthias Kloseb9621712010-04-24 17:59:49 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14173$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014174if test "$ac_cv_tanh_preserves_zero_sign" = yes
14175then
14176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014178
14179fi
14180
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014181if test "$ac_cv_func_log1p" = yes
14182then
14183 # On some versions of AIX, log1p(-0.) returns 0. instead of
14184 # -0. See issue #9920.
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14186$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014187 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014188 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014189else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014190
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014191 if test "$cross_compiling" = yes; then :
14192 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14195/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014196
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014197 #include <math.h>
14198 #include <stdlib.h>
14199 int main() {
14200 /* Fail if the signs of log1p(-0.) and -0. can be
14201 distinguished. */
14202 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14203 return 0;
14204 else
14205 return 1;
14206 }
14207
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014208_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014209if ac_fn_c_try_run "$LINENO"; then :
14210 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014211else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014212 ac_cv_log1p_drops_zero_sign=yes
14213fi
14214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014216fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014217
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014218fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014219
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14221$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14222fi
14223if test "$ac_cv_log1p_drops_zero_sign" = yes
14224then
14225
14226$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14227
14228fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014229
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014230LIBS=$LIBS_SAVE
14231
Mark Dickinsona614f042009-11-28 12:48:43 +000014232# For multiprocessing module, check that sem_open
14233# actually works. For FreeBSD versions <= 7.2,
14234# the kernel module that provides POSIX semaphores
14235# isn't loaded by default, so an attempt to call
14236# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14238$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014239if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014243 ac_cv_posix_semaphores_enabled=yes
14244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014246/* end confdefs.h. */
14247
14248#include <unistd.h>
14249#include <fcntl.h>
14250#include <stdio.h>
14251#include <semaphore.h>
14252#include <sys/stat.h>
14253
14254int main(void) {
14255 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14256 if (a == SEM_FAILED) {
14257 perror("sem_open");
14258 return 1;
14259 }
14260 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014261 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014262 return 0;
14263}
14264
14265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014266if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014267 ac_cv_posix_semaphores_enabled=yes
14268else
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14272 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014273fi
14274
14275
Mark Dickinsona614f042009-11-28 12:48:43 +000014276fi
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14279$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014280if test $ac_cv_posix_semaphores_enabled = no
14281then
14282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014284
14285fi
14286
Mark Dickinson10683072009-04-18 21:18:19 +000014287# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14289$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014290if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014294 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014295else
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014297/* end confdefs.h. */
14298
14299#include <unistd.h>
14300#include <fcntl.h>
14301#include <stdio.h>
14302#include <semaphore.h>
14303#include <sys/stat.h>
14304
14305int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014306 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014307 int count;
14308 int res;
14309 if(a==SEM_FAILED){
14310 perror("sem_open");
14311 return 1;
14312
14313 }
14314 res = sem_getvalue(a, &count);
14315 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014316 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014317 return res==-1 ? 1 : 0;
14318}
14319
Mark Dickinson10683072009-04-18 21:18:19 +000014320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014321if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014322 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014323else
Matthias Kloseb9621712010-04-24 17:59:49 +000014324 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014328fi
14329
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014331fi
14332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14334$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014335if test $ac_cv_broken_sem_getvalue = yes
14336then
14337
Matthias Kloseb9621712010-04-24 17:59:49 +000014338$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014339
14340fi
14341
Mark Dickinsonbd792642009-03-18 20:06:12 +000014342# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14344$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014345# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014346if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014347 enableval=$enable_big_digits; case $enable_big_digits in
14348yes)
14349 enable_big_digits=30 ;;
14350no)
14351 enable_big_digits=15 ;;
1435215|30)
14353 ;;
14354*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014355 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 +000014356esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14358$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014359
14360cat >>confdefs.h <<_ACEOF
14361#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14362_ACEOF
14363
14364
14365else
Matthias Kloseb9621712010-04-24 17:59:49 +000014366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14367$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014368fi
14369
14370
Guido van Rossumef2255b2000-03-10 22:30:29 +000014371# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014372ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014373if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
14375
Matthias Kloseb9621712010-04-24 17:59:49 +000014376$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014378 wchar_h="yes"
14379
Guido van Rossumef2255b2000-03-10 22:30:29 +000014380else
Martin v. Löwis11437992002-04-12 09:54:03 +000014381 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014382
14383fi
14384
Michael W. Hudson54241132001-12-07 15:38:26 +000014385
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014387# determine wchar_t size
14388if test "$wchar_h" = yes
14389then
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14393# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14395$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014396if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014398else
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14400"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014401
Martin v. Löwis11437992002-04-12 09:54:03 +000014402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 if test "$ac_cv_type_wchar_t" = yes; then
14404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014406as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014407See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408 else
14409 ac_cv_sizeof_wchar_t=0
14410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014412
Martin v. Löwis11437992002-04-12 09:54:03 +000014413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14415$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014416
14417
14418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014420#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014421_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014422
Michael W. Hudson54241132001-12-07 15:38:26 +000014423
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014424fi
14425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14427$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014428have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014430/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014431
14432#include <tcl.h>
14433#if TCL_UTF_MAX != 6
14434# error "NOT UCS4_TCL"
14435#endif
14436int
14437main ()
14438{
14439
14440 ;
14441 return 0;
14442}
14443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014445
14446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014448
14449 have_ucs4_tcl=yes
14450
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14454$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014455
Skip Montanaro6dead952003-09-25 14:50:04 +000014456# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014457if test "$wchar_h" = yes
14458then
14459 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14461$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014462 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014464else
14465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014467 ac_cv_wchar_t_signed=yes
14468else
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014470/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014471
14472 #include <wchar.h>
14473 int main()
14474 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014475 /* Success: exit code 0 */
14476 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014477 }
14478
14479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014480if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014481 ac_cv_wchar_t_signed=yes
14482else
Matthias Kloseb9621712010-04-24 17:59:49 +000014483 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14486 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014487fi
14488
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014489fi
14490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14492$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493fi
14494
Georg Brandl52d168a2008-01-07 18:10:24 +000014495# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014496if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014497 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014498then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014499 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014500
Matthias Kloseb9621712010-04-24 17:59:49 +000014501$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014502
Georg Brandl52d168a2008-01-07 18:10:24 +000014503else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014504 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014505fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14507$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014508
14509# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14511$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014512if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014514else
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 ac_cv_c_bigendian=unknown
14516 # See if we're dealing with a universal compiler.
14517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14518/* end confdefs.h. */
14519#ifndef __APPLE_CC__
14520 not a universal capable compiler
14521 #endif
14522 typedef int dummy;
14523
Skip Montanaro6dead952003-09-25 14:50:04 +000014524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014525if ac_fn_c_try_compile "$LINENO"; then :
14526
14527 # Check for potential -arch flags. It is not universal unless
14528 # there are at least two -arch flags with different values.
14529 ac_arch=
14530 ac_prev=
14531 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14532 if test -n "$ac_prev"; then
14533 case $ac_word in
14534 i?86 | x86_64 | ppc | ppc64)
14535 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14536 ac_arch=$ac_word
14537 else
14538 ac_cv_c_bigendian=universal
14539 break
14540 fi
14541 ;;
14542 esac
14543 ac_prev=
14544 elif test "x$ac_word" = "x-arch"; then
14545 ac_prev=arch
14546 fi
14547 done
14548fi
14549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14550 if test $ac_cv_c_bigendian = unknown; then
14551 # See if sys/param.h defines the BYTE_ORDER macro.
14552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014553/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014554#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014556
Martin v. Löwis11437992002-04-12 09:54:03 +000014557int
14558main ()
14559{
Matthias Kloseb9621712010-04-24 17:59:49 +000014560#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14561 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14562 && LITTLE_ENDIAN)
14563 bogus endian macros
14564 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
14566 ;
14567 return 0;
14568}
14569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014570if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014573/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014574#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014576
Martin v. Löwis11437992002-04-12 09:54:03 +000014577int
14578main ()
14579{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014580#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 not big endian
14582 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014583
14584 ;
14585 return 0;
14586}
14587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014588if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014589 ac_cv_c_bigendian=yes
14590else
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014594fi
14595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14596 fi
14597 if test $ac_cv_c_bigendian = unknown; then
14598 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014600/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014601#include <limits.h>
14602
Martin v. Löwis11437992002-04-12 09:54:03 +000014603int
14604main ()
14605{
Matthias Kloseb9621712010-04-24 17:59:49 +000014606#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14607 bogus endian macros
14608 #endif
14609
Martin v. Löwis11437992002-04-12 09:54:03 +000014610 ;
14611 return 0;
14612}
14613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014614if ac_fn_c_try_compile "$LINENO"; then :
14615 # It does; now see whether it defined to _BIG_ENDIAN or not.
14616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14617/* end confdefs.h. */
14618#include <limits.h>
14619
14620int
14621main ()
14622{
14623#ifndef _BIG_ENDIAN
14624 not big endian
14625 #endif
14626
14627 ;
14628 return 0;
14629}
14630_ACEOF
14631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014633else
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637fi
14638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14639 fi
14640 if test $ac_cv_c_bigendian = unknown; then
14641 # Compile a test program.
14642 if test "$cross_compiling" = yes; then :
14643 # Try to guess by grepping values from an object file.
14644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14645/* end confdefs.h. */
14646short int ascii_mm[] =
14647 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14648 short int ascii_ii[] =
14649 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14650 int use_ascii (int i) {
14651 return ascii_mm[i] + ascii_ii[i];
14652 }
14653 short int ebcdic_ii[] =
14654 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14655 short int ebcdic_mm[] =
14656 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14657 int use_ebcdic (int i) {
14658 return ebcdic_mm[i] + ebcdic_ii[i];
14659 }
14660 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661
Matthias Kloseb9621712010-04-24 17:59:49 +000014662int
14663main ()
14664{
14665return use_ascii (foo) == use_ebcdic (foo);
14666 ;
14667 return 0;
14668}
14669_ACEOF
14670if ac_fn_c_try_compile "$LINENO"; then :
14671 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14672 ac_cv_c_bigendian=yes
14673 fi
14674 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14675 if test "$ac_cv_c_bigendian" = unknown; then
14676 ac_cv_c_bigendian=no
14677 else
14678 # finding both strings is unlikely to happen, but who knows?
14679 ac_cv_c_bigendian=unknown
14680 fi
14681 fi
14682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014684else
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014686/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014687$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014688int
14689main ()
14690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 /* Are we little or big endian? From Harbison&Steele. */
14693 union
14694 {
14695 long int l;
14696 char c[sizeof (long int)];
14697 } u;
14698 u.l = 1;
14699 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700
14701 ;
14702 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014703}
Martin v. Löwis11437992002-04-12 09:54:03 +000014704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014705if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014706 ac_cv_c_bigendian=no
14707else
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14717$as_echo "$ac_cv_c_bigendian" >&6; }
14718 case $ac_cv_c_bigendian in #(
14719 yes)
14720 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14721;; #(
14722 no)
14723 ;; #(
14724 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014725
Matthias Kloseb9621712010-04-24 17:59:49 +000014726$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 ;; #(
14729 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014730 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014731 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014733
Michael W. Hudson54241132001-12-07 15:38:26 +000014734
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014735# ABI version string for Python extension modules. This appears between the
14736# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14737# from the following attributes which affect the ABI of this Python build (in
14738# this order):
14739#
14740# * The Python implementation (always 'cpython-' for us)
14741# * The major and minor version numbers
14742# * --with-pydebug (adds a 'd')
14743# * --with-pymalloc (adds a 'm')
14744# * --with-wide-unicode (adds a 'u')
14745#
14746# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014747# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14748# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014749
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14751$as_echo_n "checking ABIFLAGS... " >&6; }
14752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14753$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14755$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014756SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14758$as_echo "$SOABI" >&6; }
14759
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014760
14761case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014762 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014763 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14764 *)
14765 EXT_SUFFIX=${SHLIB_SUFFIX};;
14766esac
14767
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14769$as_echo_n "checking LDVERSION... " >&6; }
14770LDVERSION='$(VERSION)$(ABIFLAGS)'
14771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14772$as_echo "$LDVERSION" >&6; }
14773
doko@python.org87421192013-01-26 11:39:31 +010014774
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014775LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014776
14777
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014778# Check whether right shifting a negative integer extends the sign bit
14779# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14781$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014782if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014784else
Martin v. Löwis11437992002-04-12 09:54:03 +000014785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014787 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014788else
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014790/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014791
14792int main()
14793{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014794 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014795}
14796
Martin v. Löwis11437992002-04-12 09:54:03 +000014797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014798if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014799 ac_cv_rshift_extends_sign=yes
14800else
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014805fi
14806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807fi
14808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14810$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014811if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014812then
Martin v. Löwis11437992002-04-12 09:54:03 +000014813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014815
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014816fi
14817
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014818# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14820$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014821if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014823else
Martin v. Löwis11437992002-04-12 09:54:03 +000014824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014826/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014827#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014828int
14829main ()
14830{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014831
14832 FILE *f = fopen("/dev/null", "r");
14833 flockfile(f);
14834 getc_unlocked(f);
14835 funlockfile(f);
14836
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 ;
14838 return 0;
14839}
14840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014841if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014842 ac_cv_have_getc_unlocked=yes
14843else
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 ac_cv_have_getc_unlocked=no
14845fi
14846rm -f core conftest.err conftest.$ac_objext \
14847 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14851$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014852if test "$ac_cv_have_getc_unlocked" = yes
14853then
Martin v. Löwis11437992002-04-12 09:54:03 +000014854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014856
14857fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014858
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014859# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014860# save the value of LIBS so we don't actually link Python with readline
14861LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014862
Gregory P. Smith18820942008-09-07 06:24:49 +000014863# On some systems we need to link readline to a termcap compatible
14864# library. NOTE: Keep the precedence of listed libraries synchronised
14865# with setup.py.
14866py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14868$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014869for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014870 if test -z "$py_libtermcap"; then
14871 READLINE_LIBS="-lreadline"
14872 else
14873 READLINE_LIBS="-lreadline -l$py_libtermcap"
14874 fi
14875 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014877/* end confdefs.h. */
14878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879/* Override any GCC internal prototype to avoid an error.
14880 Use char because int might match the return type of a GCC
14881 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014882#ifdef __cplusplus
14883extern "C"
14884#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014885char readline ();
14886int
14887main ()
14888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014890 ;
14891 return 0;
14892}
14893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014894if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014895 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014897rm -f core conftest.err conftest.$ac_objext \
14898 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014899 if test $py_cv_lib_readline = yes; then
14900 break
14901 fi
14902done
14903# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14904#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014905if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14907$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014908else
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14910$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014911
Matthias Kloseb9621712010-04-24 17:59:49 +000014912$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014913
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014914fi
14915
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014916# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14918$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014919if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014921else
14922 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014923LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014925/* end confdefs.h. */
14926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927/* Override any GCC internal prototype to avoid an error.
14928 Use char because int might match the return type of a GCC
14929 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014930#ifdef __cplusplus
14931extern "C"
14932#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014933char rl_callback_handler_install ();
14934int
14935main ()
14936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014938 ;
14939 return 0;
14940}
14941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014942if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014943 ac_cv_lib_readline_rl_callback_handler_install=yes
14944else
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014947rm -f core conftest.err conftest.$ac_objext \
14948 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014949LIBS=$ac_check_lib_save_LIBS
14950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14952$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014953if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014954
Matthias Kloseb9621712010-04-24 17:59:49 +000014955$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014956
14957fi
14958
14959
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014960# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014962/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014963#include <readline/readline.h>
14964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014965if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014966 have_readline=yes
14967else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014968 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014969
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014970fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014971rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014972if test $have_readline = yes
14973then
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014975/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014976#include <readline/readline.h>
14977
14978_ACEOF
14979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014983
14984fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014985rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014988/* end confdefs.h. */
14989#include <readline/readline.h>
14990
14991_ACEOF
14992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014996
14997fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014998rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014999
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015000fi
15001
Martin v. Löwis0daad592001-09-30 21:09:59 +000015002# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15004$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015005if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015006 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015007else
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015009LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013/* Override any GCC internal prototype to avoid an error.
15014 Use char because int might match the return type of a GCC
15015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015016#ifdef __cplusplus
15017extern "C"
15018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015019char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015020int
15021main ()
15022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ;
15025 return 0;
15026}
15027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015030else
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015033rm -f core conftest.err conftest.$ac_objext \
15034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015035LIBS=$ac_check_lib_save_LIBS
15036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15038$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015039if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015040
Matthias Kloseb9621712010-04-24 17:59:49 +000015041$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015042
Martin v. Löwis0daad592001-09-30 21:09:59 +000015043fi
15044
Michael W. Hudson54241132001-12-07 15:38:26 +000015045
Thomas Wouters89d996e2007-09-08 17:39:28 +000015046# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15048$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015049if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015051else
15052 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015053LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015055/* end confdefs.h. */
15056
15057/* Override any GCC internal prototype to avoid an error.
15058 Use char because int might match the return type of a GCC
15059 builtin and then its argument prototype would still apply. */
15060#ifdef __cplusplus
15061extern "C"
15062#endif
15063char rl_completion_display_matches_hook ();
15064int
15065main ()
15066{
15067return rl_completion_display_matches_hook ();
15068 ;
15069 return 0;
15070}
15071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015072if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015073 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15074else
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015077rm -f core conftest.err conftest.$ac_objext \
15078 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015079LIBS=$ac_check_lib_save_LIBS
15080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15082$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015083if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015084
Matthias Kloseb9621712010-04-24 17:59:49 +000015085$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015086
15087fi
15088
15089
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015090# also in 4.0, but not in editline
15091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15092$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15093if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15094 $as_echo_n "(cached) " >&6
15095else
15096 ac_check_lib_save_LIBS=$LIBS
15097LIBS="-lreadline $READLINE_LIBS $LIBS"
15098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15099/* end confdefs.h. */
15100
15101/* Override any GCC internal prototype to avoid an error.
15102 Use char because int might match the return type of a GCC
15103 builtin and then its argument prototype would still apply. */
15104#ifdef __cplusplus
15105extern "C"
15106#endif
15107char rl_resize_terminal ();
15108int
15109main ()
15110{
15111return rl_resize_terminal ();
15112 ;
15113 return 0;
15114}
15115_ACEOF
15116if ac_fn_c_try_link "$LINENO"; then :
15117 ac_cv_lib_readline_rl_resize_terminal=yes
15118else
15119 ac_cv_lib_readline_rl_resize_terminal=no
15120fi
15121rm -f core conftest.err conftest.$ac_objext \
15122 conftest$ac_exeext conftest.$ac_ext
15123LIBS=$ac_check_lib_save_LIBS
15124fi
15125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15126$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15127if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15128
15129$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15130
15131fi
15132
15133
Martin v. Löwis0daad592001-09-30 21:09:59 +000015134# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15136$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015137if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015138 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015139else
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015141LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145/* Override any GCC internal prototype to avoid an error.
15146 Use char because int might match the return type of a GCC
15147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015148#ifdef __cplusplus
15149extern "C"
15150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015151char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015152int
15153main ()
15154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 ;
15157 return 0;
15158}
15159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015160if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015162else
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015165rm -f core conftest.err conftest.$ac_objext \
15166 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015167LIBS=$ac_check_lib_save_LIBS
15168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15170$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015171if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015174
Guido van Rossum353ae582001-07-10 16:45:32 +000015175fi
15176
Jack Jansendd19cf82001-12-06 22:36:17 +000015177
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015178# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015180/* end confdefs.h. */
15181#include <readline/readline.h>
15182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015183if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015184 have_readline=yes
15185else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015186 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015187
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015188fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015189rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015190if test $have_readline = yes
15191then
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015193/* end confdefs.h. */
15194#include <readline/readline.h>
15195
15196_ACEOF
15197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015198 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015199
Matthias Kloseb9621712010-04-24 17:59:49 +000015200$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201
15202fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015203rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015204
15205fi
15206
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15208$as_echo_n "checking for append_history in -lreadline... " >&6; }
15209if ${ac_cv_lib_readline_append_history+:} false; then :
15210 $as_echo_n "(cached) " >&6
15211else
15212 ac_check_lib_save_LIBS=$LIBS
15213LIBS="-lreadline $READLINE_LIBS $LIBS"
15214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15215/* end confdefs.h. */
15216
15217/* Override any GCC internal prototype to avoid an error.
15218 Use char because int might match the return type of a GCC
15219 builtin and then its argument prototype would still apply. */
15220#ifdef __cplusplus
15221extern "C"
15222#endif
15223char append_history ();
15224int
15225main ()
15226{
15227return append_history ();
15228 ;
15229 return 0;
15230}
15231_ACEOF
15232if ac_fn_c_try_link "$LINENO"; then :
15233 ac_cv_lib_readline_append_history=yes
15234else
15235 ac_cv_lib_readline_append_history=no
15236fi
15237rm -f core conftest.err conftest.$ac_objext \
15238 conftest$ac_exeext conftest.$ac_ext
15239LIBS=$ac_check_lib_save_LIBS
15240fi
15241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15242$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15243if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15244
15245$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15246
15247fi
15248
15249
Martin v. Löwis82bca632006-02-10 20:49:30 +000015250# End of readline checks: restore LIBS
15251LIBS=$LIBS_no_readline
15252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15254$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015255if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015257else
Martin v. Löwis11437992002-04-12 09:54:03 +000015258
Matthias Kloseb9621712010-04-24 17:59:49 +000015259if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015260 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015261else
Matthias Kloseb9621712010-04-24 17:59:49 +000015262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015263/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015264
15265int main()
15266{
15267 int val1 = nice(1);
15268 if (val1 != -1 && val1 == nice(2))
15269 exit(0);
15270 exit(1);
15271}
15272
Martin v. Löwis11437992002-04-12 09:54:03 +000015273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015274if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015275 ac_cv_broken_nice=yes
15276else
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15280 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015281fi
15282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283fi
15284
Matthias Kloseb9621712010-04-24 17:59:49 +000015285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15286$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015287if test "$ac_cv_broken_nice" = yes
15288then
Martin v. Löwis11437992002-04-12 09:54:03 +000015289
Matthias Kloseb9621712010-04-24 17:59:49 +000015290$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015291
15292fi
15293
Matthias Kloseb9621712010-04-24 17:59:49 +000015294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15295$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015296if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015298else
Matthias Kloseb9621712010-04-24 17:59:49 +000015299 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015300 ac_cv_broken_poll=no
15301else
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015303/* end confdefs.h. */
15304
15305#include <poll.h>
15306
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015307int main()
15308{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015309 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015310 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015311
15312 close (42);
15313
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015314 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015315 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015316 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015317 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015318 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015319 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015320 return 1;
15321}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015322
15323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015324if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015325 ac_cv_broken_poll=yes
15326else
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15330 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015333fi
15334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15336$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015337if test "$ac_cv_broken_poll" = yes
15338then
15339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015341
15342fi
15343
Brett Cannon43802422005-02-10 20:48:03 +000015344# 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 +000015345# (which is not required by ISO C or UNIX spec) and/or if we support
15346# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015347ac_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 +000015348#include <$ac_cv_struct_tm>
15349
Matthias Kloseb9621712010-04-24 17:59:49 +000015350"
Victor Stinnere0be4232011-10-25 13:06:09 +020015351if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015352
15353cat >>confdefs.h <<_ACEOF
15354#define HAVE_STRUCT_TM_TM_ZONE 1
15355_ACEOF
15356
15357
15358fi
15359
15360if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015363
15364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15366"
Victor Stinnere0be4232011-10-25 13:06:09 +020015367if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369else
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371fi
15372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015374#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375_ACEOF
15376
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15378$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015379if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015383/* end confdefs.h. */
15384#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385#if !HAVE_DECL_TZNAME
15386extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015387#endif
15388
15389int
15390main ()
15391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015393 ;
15394 return 0;
15395}
15396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015397if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015398 ac_cv_var_tzname=yes
15399else
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015402rm -f core conftest.err conftest.$ac_objext \
15403 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15406$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015407 if test $ac_cv_var_tzname = yes; then
15408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015410
15411 fi
15412fi
15413
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015414
Martin v. Löwis1d459062005-03-14 21:23:33 +000015415# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15417$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015418if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015420else
15421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015423 ac_cv_working_tzset=no
15424else
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015426/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015427
15428#include <stdlib.h>
15429#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015430#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015431
15432#if HAVE_TZNAME
15433extern char *tzname[];
15434#endif
15435
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015436int main()
15437{
Brett Cannon18367812003-09-19 00:59:16 +000015438 /* Note that we need to ensure that not only does tzset(3)
15439 do 'something' with localtime, but it works as documented
15440 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015441 This includes making sure that tzname is set properly if
15442 tm->tm_zone does not exist since it is the alternative way
15443 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015444
15445 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015446 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015447 */
15448
Martin v. Löwis1d459062005-03-14 21:23:33 +000015449 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015450 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15451
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015452 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015453 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015454 if (localtime(&groundhogday)->tm_hour != 0)
15455 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015456#if HAVE_TZNAME
15457 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15458 if (strcmp(tzname[0], "UTC") ||
15459 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15460 exit(1);
15461#endif
Brett Cannon18367812003-09-19 00:59:16 +000015462
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015463 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015464 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015465 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015466 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015467#if HAVE_TZNAME
15468 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15469 exit(1);
15470#endif
Brett Cannon18367812003-09-19 00:59:16 +000015471
15472 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15473 tzset();
15474 if (localtime(&groundhogday)->tm_hour != 11)
15475 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015476#if HAVE_TZNAME
15477 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15478 exit(1);
15479#endif
15480
15481#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015482 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15483 exit(1);
15484 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15485 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015486#endif
Brett Cannon18367812003-09-19 00:59:16 +000015487
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015488 exit(0);
15489}
15490
15491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015492if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015493 ac_cv_working_tzset=yes
15494else
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15498 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015499fi
15500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015501fi
15502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15504$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015505if test "$ac_cv_working_tzset" = yes
15506then
15507
Matthias Kloseb9621712010-04-24 17:59:49 +000015508$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015509
15510fi
15511
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015512# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15514$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015515if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015516 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015517else
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015519/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015520#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015521int
15522main ()
15523{
15524
15525struct stat st;
15526st.st_mtim.tv_nsec = 1;
15527
15528 ;
15529 return 0;
15530}
15531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015532if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015533 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015534else
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15538fi
15539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15541$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015542if test "$ac_cv_stat_tv_nsec" = yes
15543then
15544
Matthias Kloseb9621712010-04-24 17:59:49 +000015545$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015546
15547fi
15548
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015549# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15551$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015552if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015554else
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015556/* end confdefs.h. */
15557#include <sys/stat.h>
15558int
15559main ()
15560{
15561
15562struct stat st;
15563st.st_mtimespec.tv_nsec = 1;
15564
15565 ;
15566 return 0;
15567}
15568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015569if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015570 ac_cv_stat_tv_nsec2=yes
15571else
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15575fi
15576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15578$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015579if test "$ac_cv_stat_tv_nsec2" = yes
15580then
15581
Matthias Kloseb9621712010-04-24 17:59:49 +000015582$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015583
15584fi
15585
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015586# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015587ac_save_cppflags="$CPPFLAGS"
15588CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015589
15590for ac_header in curses.h ncurses.h
15591do :
15592 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15593ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15594if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15595 cat >>confdefs.h <<_ACEOF
15596#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15597_ACEOF
15598
15599fi
15600
15601done
15602
15603
15604# On Solaris, term.h requires curses.h
15605for ac_header in term.h
15606do :
15607 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15608#ifdef HAVE_CURSES_H
15609#include <curses.h>
15610#endif
15611
15612"
15613if test "x$ac_cv_header_term_h" = xyes; then :
15614 cat >>confdefs.h <<_ACEOF
15615#define HAVE_TERM_H 1
15616_ACEOF
15617
15618fi
15619
15620done
15621
15622
Jack Jansen666b1e72001-10-31 12:11:48 +000015623# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15625$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015626if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015628else
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015630/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015631#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015632int
15633main ()
15634{
Jack Jansen666b1e72001-10-31 12:11:48 +000015635
15636 int rtn;
15637 rtn = mvwdelch(0,0,0);
15638
Martin v. Löwis11437992002-04-12 09:54:03 +000015639 ;
15640 return 0;
15641}
15642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015643if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015644 ac_cv_mvwdelch_is_expression=yes
15645else
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15649fi
15650
Matthias Kloseb9621712010-04-24 17:59:49 +000015651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15652$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015653
15654if test "$ac_cv_mvwdelch_is_expression" = yes
15655then
Martin v. Löwis11437992002-04-12 09:54:03 +000015656
Matthias Kloseb9621712010-04-24 17:59:49 +000015657$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015658
15659fi
15660
Matthias Kloseb9621712010-04-24 17:59:49 +000015661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15662$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015663if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015664 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015665else
Matthias Kloseb9621712010-04-24 17:59:49 +000015666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015667/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015668#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015669int
15670main ()
15671{
Jack Jansen666b1e72001-10-31 12:11:48 +000015672
15673 WINDOW *w;
15674 w->_flags = 0;
15675
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 ;
15677 return 0;
15678}
15679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015680if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015681 ac_cv_window_has_flags=yes
15682else
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15686fi
15687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15689$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015690
Jack Jansen666b1e72001-10-31 12:11:48 +000015691
15692if test "$ac_cv_window_has_flags" = yes
15693then
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
Matthias Kloseb9621712010-04-24 17:59:49 +000015695$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015696
15697fi
15698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15700$as_echo_n "checking for is_term_resized... " >&6; }
15701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015702/* end confdefs.h. */
15703#include <curses.h>
15704int
15705main ()
15706{
15707void *x=is_term_resized
15708 ;
15709 return 0;
15710}
15711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015713
Matthias Kloseb9621712010-04-24 17:59:49 +000015714$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015715
Matthias Kloseb159a552010-04-25 21:00:44 +000015716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015717$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015718else
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15720$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015721
15722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15724
Matthias Kloseb9621712010-04-24 17:59:49 +000015725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15726$as_echo_n "checking for resize_term... " >&6; }
15727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015728/* end confdefs.h. */
15729#include <curses.h>
15730int
15731main ()
15732{
15733void *x=resize_term
15734 ;
15735 return 0;
15736}
15737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015738if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015739
Matthias Kloseb9621712010-04-24 17:59:49 +000015740$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015741
Matthias Kloseb159a552010-04-25 21:00:44 +000015742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015743$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015744else
Matthias Kloseb9621712010-04-24 17:59:49 +000015745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15746$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015747
15748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15750
Matthias Kloseb9621712010-04-24 17:59:49 +000015751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15752$as_echo_n "checking for resizeterm... " >&6; }
15753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015754/* end confdefs.h. */
15755#include <curses.h>
15756int
15757main ()
15758{
15759void *x=resizeterm
15760 ;
15761 return 0;
15762}
15763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015764if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015767
Matthias Kloseb159a552010-04-25 21:00:44 +000015768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015769$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015770else
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15772$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015773
15774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015776# last curses configure check
15777CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015778
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15780$as_echo "$as_me: checking for device files" >&6;}
15781
15782if test "x$cross_compiling" = xyes; then
15783 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15785$as_echo_n "checking for /dev/ptmx... " >&6; }
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15787$as_echo "not set" >&6; }
15788 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15789 fi
15790 if test "${ac_cv_file__dev_ptc+set}" != set; then
15791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15792$as_echo_n "checking for /dev/ptc... " >&6; }
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15794$as_echo "not set" >&6; }
15795 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15796 fi
15797fi
15798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15800$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015801if ${ac_cv_file__dev_ptmx+:} false; then :
15802 $as_echo_n "(cached) " >&6
15803else
15804 test "$cross_compiling" = yes &&
15805 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15806if test -r "/dev/ptmx"; then
15807 ac_cv_file__dev_ptmx=yes
15808else
15809 ac_cv_file__dev_ptmx=no
15810fi
15811fi
15812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15813$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15814if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015815
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015816fi
15817
15818if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015819
Matthias Kloseb9621712010-04-24 17:59:49 +000015820$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015821
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15824$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015825if ${ac_cv_file__dev_ptc+:} false; then :
15826 $as_echo_n "(cached) " >&6
15827else
15828 test "$cross_compiling" = yes &&
15829 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15830if test -r "/dev/ptc"; then
15831 ac_cv_file__dev_ptc=yes
15832else
15833 ac_cv_file__dev_ptc=no
15834fi
15835fi
15836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15837$as_echo "$ac_cv_file__dev_ptc" >&6; }
15838if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015839
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015840fi
15841
15842if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015843
Matthias Kloseb9621712010-04-24 17:59:49 +000015844$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015845
Neal Norwitz865400f2003-03-21 01:42:58 +000015846fi
15847
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015848if test "$have_long_long" = yes
15849then
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15851$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015852 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015853 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015854else
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015856 ac_cv_have_long_long_format="cross -- assuming no"
15857 if test x$GCC = xyes; then
15858 save_CFLAGS=$CFLAGS
15859 CFLAGS="$CFLAGS -Werror -Wformat"
15860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861/* end confdefs.h. */
15862
15863 #include <stdio.h>
15864 #include <stddef.h>
15865
15866int
15867main ()
15868{
15869
15870 char *buffer;
15871 sprintf(buffer, "%lld", (long long)123);
15872 sprintf(buffer, "%lld", (long long)-123);
15873 sprintf(buffer, "%llu", (unsigned long long)123);
15874
15875 ;
15876 return 0;
15877}
15878_ACEOF
15879if ac_fn_c_try_compile "$LINENO"; then :
15880 ac_cv_have_long_long_format=yes
15881
15882fi
15883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15884 CFLAGS=$save_CFLAGS
15885 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015886else
Matthias Kloseb9621712010-04-24 17:59:49 +000015887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015888/* end confdefs.h. */
15889
15890 #include <stdio.h>
15891 #include <stddef.h>
15892 #include <string.h>
15893
15894 #ifdef HAVE_SYS_TYPES_H
15895 #include <sys/types.h>
15896 #endif
15897
15898 int main()
15899 {
15900 char buffer[256];
15901
15902 if (sprintf(buffer, "%lld", (long long)123) < 0)
15903 return 1;
15904 if (strcmp(buffer, "123"))
15905 return 1;
15906
15907 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15908 return 1;
15909 if (strcmp(buffer, "-123"))
15910 return 1;
15911
15912 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15913 return 1;
15914 if (strcmp(buffer, "123"))
15915 return 1;
15916
15917 return 0;
15918 }
15919
15920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015921if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015922 ac_cv_have_long_long_format=yes
15923else
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015928fi
15929
15930
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015931fi
15932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15934$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015935fi
15936
Mark Dickinson89d7d412009-12-31 20:50:59 +000015937if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015938then
15939
Matthias Kloseb9621712010-04-24 17:59:49 +000015940$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015941
15942fi
15943
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015944if test $ac_sys_system = Darwin
15945then
15946 LIBS="$LIBS -framework CoreFoundation"
15947fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015948
Matthias Kloseb9621712010-04-24 17:59:49 +000015949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15950$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015951if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015952 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015953else
Matthias Kloseb9621712010-04-24 17:59:49 +000015954 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015955 ac_cv_have_size_t_format="cross -- assuming yes"
15956
Thomas Wouters477c8d52006-05-27 19:21:47 +000015957else
Matthias Kloseb9621712010-04-24 17:59:49 +000015958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015959/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015960
Thomas Wouters477c8d52006-05-27 19:21:47 +000015961#include <stdio.h>
15962#include <stddef.h>
15963#include <string.h>
15964
Christian Heimes2c181612007-12-17 20:04:13 +000015965#ifdef HAVE_SYS_TYPES_H
15966#include <sys/types.h>
15967#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015968
15969#ifdef HAVE_SSIZE_T
15970typedef ssize_t Py_ssize_t;
15971#elif SIZEOF_VOID_P == SIZEOF_LONG
15972typedef long Py_ssize_t;
15973#else
15974typedef int Py_ssize_t;
15975#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015976
Christian Heimes2c181612007-12-17 20:04:13 +000015977int main()
15978{
15979 char buffer[256];
15980
Thomas Wouters477c8d52006-05-27 19:21:47 +000015981 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15982 return 1;
15983
Thomas Wouters89f507f2006-12-13 04:49:30 +000015984 if (strcmp(buffer, "123"))
15985 return 1;
15986
15987 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15988 return 1;
15989
15990 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015991 return 1;
15992
15993 return 0;
15994}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015995
Thomas Wouters477c8d52006-05-27 19:21:47 +000015996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015997if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015998 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015999else
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16003 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016004fi
16005
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16008$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016009if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016012
16013fi
16014
Matthias Kloseb9621712010-04-24 17:59:49 +000016015ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016016#ifdef HAVE_SYS_TYPES_H
16017#include <sys/types.h>
16018#endif
16019#ifdef HAVE_SYS_SOCKET_H
16020#include <sys/socket.h>
16021#endif
16022
Matthias Kloseb9621712010-04-24 17:59:49 +000016023"
Victor Stinnere0be4232011-10-25 13:06:09 +020016024if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016025
Martin v. Löwis11437992002-04-12 09:54:03 +000016026else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016027
Matthias Kloseb9621712010-04-24 17:59:49 +000016028$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016029
16030fi
16031
Michael W. Hudson54241132001-12-07 15:38:26 +000016032
Matthias Kloseb9621712010-04-24 17:59:49 +000016033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16034$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016035if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016036 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016037else
Matthias Kloseb9621712010-04-24 17:59:49 +000016038 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016039 ac_cv_broken_mbstowcs=no
16040else
Matthias Kloseb9621712010-04-24 17:59:49 +000016041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016042/* end confdefs.h. */
16043
Stefan Krah19c21392012-11-22 23:47:32 +010016044#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016045#include<stdlib.h>
16046int main() {
16047 size_t len = -1;
16048 const char *str = "text";
16049 len = mbstowcs(NULL, str, 0);
16050 return (len != 4);
16051}
16052
16053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016054if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016055 ac_cv_broken_mbstowcs=no
16056else
Matthias Kloseb9621712010-04-24 17:59:49 +000016057 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016061fi
16062
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016063fi
16064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16066$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016067if test "$ac_cv_broken_mbstowcs" = yes
16068then
16069
Matthias Kloseb9621712010-04-24 17:59:49 +000016070$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016071
16072fi
16073
Antoine Pitroub52ec782009-01-25 16:34:23 +000016074# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16076$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016077
16078# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016079if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016080 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016081if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016082then
16083
Matthias Kloseb9621712010-04-24 17:59:49 +000016084$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016085
Matthias Kloseb9621712010-04-24 17:59:49 +000016086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16087$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016088fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016089if test "$withval" = no
16090then
16091
16092$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16093
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16095$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016096fi
16097
Antoine Pitrou042b1282010-08-13 21:15:58 +000016098else
16099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16100$as_echo "no value specified" >&6; }
16101fi
16102
Antoine Pitroub52ec782009-01-25 16:34:23 +000016103
Matthias Kloseb17289e2012-03-15 19:51:34 +010016104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16105$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16106if ${ac_cv_computed_gotos+:} false; then :
16107 $as_echo_n "(cached) " >&6
16108else
16109 if test "$cross_compiling" = yes; then :
16110 if test "${with_computed_gotos+set}" = set; then
16111 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16112 else
16113 ac_cv_computed_gotos=no
16114 fi
16115else
16116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16117/* end confdefs.h. */
16118
16119int main(int argc, char **argv)
16120{
16121 static void *targets[1] = { &&LABEL1 };
16122 goto LABEL2;
16123LABEL1:
16124 return 0;
16125LABEL2:
16126 goto *targets[0];
16127 return 1;
16128}
16129
16130_ACEOF
16131if ac_fn_c_try_run "$LINENO"; then :
16132 ac_cv_computed_gotos=yes
16133else
16134 ac_cv_computed_gotos=no
16135fi
16136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16137 conftest.$ac_objext conftest.beam conftest.$ac_ext
16138fi
16139
16140fi
16141
16142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16143$as_echo "$ac_cv_computed_gotos" >&6; }
16144case "$ac_cv_computed_gotos" in yes*)
16145
16146$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16147
16148esac
16149
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016150case $ac_sys_system in
16151AIX*)
16152
16153$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16154 ;;
16155esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016156
Michael W. Hudson54241132001-12-07 15:38:26 +000016157
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016158
16159
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016160for h in `(cd $srcdir;echo Python/thread_*.h)`
16161do
16162 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16163done
16164
Michael W. Hudson54241132001-12-07 15:38:26 +000016165
Ned Deily0db50cf2014-07-25 12:41:31 -070016166SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16168$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016169for dir in $SRCDIRS; do
16170 if test ! -d $dir; then
16171 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016172 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016173done
Matthias Kloseb9621712010-04-24 17:59:49 +000016174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16175$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016176
Stefan Krah1919b7e2012-03-21 18:25:23 +010016177# Availability of -O2:
16178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16179$as_echo_n "checking for -O2... " >&6; }
16180saved_cflags="$CFLAGS"
16181CFLAGS="-O2"
16182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16183/* end confdefs.h. */
16184
16185int
16186main ()
16187{
16188
16189
16190 ;
16191 return 0;
16192}
16193_ACEOF
16194if ac_fn_c_try_compile "$LINENO"; then :
16195 have_O2=yes
16196else
16197 have_O2=no
16198fi
16199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16201$as_echo "$have_O2" >&6; }
16202CFLAGS="$saved_cflags"
16203
16204# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16205# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16207$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16208saved_cflags="$CFLAGS"
16209CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16210if test "$have_O2" = no; then
16211 CFLAGS=""
16212fi
16213if test "$cross_compiling" = yes; then :
16214 have_glibc_memmove_bug=undefined
16215else
16216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16217/* end confdefs.h. */
16218
16219#include <stdio.h>
16220#include <stdlib.h>
16221#include <string.h>
16222void foo(void *p, void *q) { memmove(p, q, 19); }
16223int main() {
16224 char a[32] = "123456789000000000";
16225 foo(&a[9], a);
16226 if (strcmp(a, "123456789123456789000000000") != 0)
16227 return 1;
16228 foo(a, &a[9]);
16229 if (strcmp(a, "123456789000000000") != 0)
16230 return 1;
16231 return 0;
16232}
16233
16234_ACEOF
16235if ac_fn_c_try_run "$LINENO"; then :
16236 have_glibc_memmove_bug=no
16237else
16238 have_glibc_memmove_bug=yes
16239fi
16240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16241 conftest.$ac_objext conftest.beam conftest.$ac_ext
16242fi
16243
16244CFLAGS="$saved_cflags"
16245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16246$as_echo "$have_glibc_memmove_bug" >&6; }
16247if test "$have_glibc_memmove_bug" = yes; then
16248
16249$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16250
16251fi
16252
16253if test "$have_gcc_asm_for_x87" = yes; then
16254 # Some versions of gcc miscompile inline asm:
16255 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16256 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16257 case $CC in
16258 *gcc*)
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16260$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16261 saved_cflags="$CFLAGS"
16262 CFLAGS="-O2"
16263 if test "$cross_compiling" = yes; then :
16264 have_ipa_pure_const_bug=undefined
16265else
16266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267/* end confdefs.h. */
16268
16269 __attribute__((noinline)) int
16270 foo(int *p) {
16271 int r;
16272 asm ( "movl \$6, (%1)\n\t"
16273 "xorl %0, %0\n\t"
16274 : "=r" (r) : "r" (p) : "memory"
16275 );
16276 return r;
16277 }
16278 int main() {
16279 int p = 8;
16280 if ((foo(&p) ? : p) != 6)
16281 return 1;
16282 return 0;
16283 }
16284
16285_ACEOF
16286if ac_fn_c_try_run "$LINENO"; then :
16287 have_ipa_pure_const_bug=no
16288else
16289 have_ipa_pure_const_bug=yes
16290fi
16291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16292 conftest.$ac_objext conftest.beam conftest.$ac_ext
16293fi
16294
16295 CFLAGS="$saved_cflags"
16296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16297$as_echo "$have_ipa_pure_const_bug" >&6; }
16298 if test "$have_ipa_pure_const_bug" = yes; then
16299
16300$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16301
16302 fi
16303 ;;
16304 esac
16305fi
16306
Victor Stinner4f5366e2015-01-09 02:13:19 +010016307# Check for stdatomic.h
16308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16309$as_echo_n "checking for stdatomic.h... " >&6; }
16310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16311/* end confdefs.h. */
16312
16313
16314 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016315 atomic_int value = ATOMIC_VAR_INIT(1);
16316 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016317 int main() {
16318 int loaded_value = atomic_load(&value);
16319 return 0;
16320 }
16321
16322
16323_ACEOF
16324if ac_fn_c_try_link "$LINENO"; then :
16325 have_stdatomic_h=yes
16326else
16327 have_stdatomic_h=no
16328fi
16329rm -f core conftest.err conftest.$ac_objext \
16330 conftest$ac_exeext conftest.$ac_ext
16331
16332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16333$as_echo "$have_stdatomic_h" >&6; }
16334
16335if test "$have_stdatomic_h" = yes; then
16336
16337$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16338
16339fi
16340
16341# Check for GCC >= 4.7 __atomic builtins
16342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16343$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16345/* end confdefs.h. */
16346
16347
16348 volatile int val = 1;
16349 int main() {
16350 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16351 return 0;
16352 }
16353
16354
16355_ACEOF
16356if ac_fn_c_try_link "$LINENO"; then :
16357 have_builtin_atomic=yes
16358else
16359 have_builtin_atomic=no
16360fi
16361rm -f core conftest.err conftest.$ac_objext \
16362 conftest$ac_exeext conftest.$ac_ext
16363
16364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16365$as_echo "$have_builtin_atomic" >&6; }
16366
16367if test "$have_builtin_atomic" = yes; then
16368
16369$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16370
16371fi
16372
Ned Deily322f5ba2013-11-21 23:01:59 -080016373# ensurepip option
16374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16375$as_echo_n "checking for ensurepip... " >&6; }
16376
16377# Check whether --with-ensurepip was given.
16378if test "${with_ensurepip+set}" = set; then :
16379 withval=$with_ensurepip;
16380else
16381 with_ensurepip=upgrade
16382fi
16383
16384case $with_ensurepip in #(
16385 yes|upgrade) :
16386 ENSUREPIP=upgrade ;; #(
16387 install) :
16388 ENSUREPIP=install ;; #(
16389 no) :
16390 ENSUREPIP=no ;; #(
16391 *) :
16392 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16393esac
16394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16395$as_echo "$ENSUREPIP" >&6; }
16396
16397
Victor Stinner35a97c02015-03-08 02:59:09 +010016398# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16400$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16402/* end confdefs.h. */
16403
16404
16405 #include <dirent.h>
16406
16407 int main() {
16408 struct dirent entry;
16409 return entry.d_type == DT_UNKNOWN;
16410 }
16411
16412
16413_ACEOF
16414if ac_fn_c_try_link "$LINENO"; then :
16415 have_dirent_d_type=yes
16416else
16417 have_dirent_d_type=no
16418fi
16419rm -f core conftest.err conftest.$ac_objext \
16420 conftest$ac_exeext conftest.$ac_ext
16421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16422$as_echo "$have_dirent_d_type" >&6; }
16423
16424if test "$have_dirent_d_type" = yes; then
16425
16426$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16427
16428fi
16429
Victor Stinner9eb57c52015-03-19 22:21:49 +010016430# check if the Linux getrandom() syscall is available
16431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16432$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16434/* end confdefs.h. */
16435
16436
Victor Stinner1b80b242016-04-12 22:34:58 +020016437 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016438 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016439 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016440
16441 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016442 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016443 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016444 const int flags = GRND_NONBLOCK;
16445 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016446 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016447 return 0;
16448 }
16449
16450
16451_ACEOF
16452if ac_fn_c_try_link "$LINENO"; then :
16453 have_getrandom_syscall=yes
16454else
16455 have_getrandom_syscall=no
16456fi
16457rm -f core conftest.err conftest.$ac_objext \
16458 conftest$ac_exeext conftest.$ac_ext
16459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16460$as_echo "$have_getrandom_syscall" >&6; }
16461
16462if test "$have_getrandom_syscall" = yes; then
16463
16464$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16465
16466fi
16467
Victor Stinnerbae2d622015-10-01 09:47:30 +020016468# check if the getrandom() function is available
16469# the test was written for the Solaris function of <sys/random.h>
16470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16471$as_echo_n "checking for the getrandom() function... " >&6; }
16472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16473/* end confdefs.h. */
16474
16475
16476 #include <sys/random.h>
16477
16478 int main() {
16479 char buffer[1];
16480 const size_t buflen = sizeof(buffer);
16481 const int flags = 0;
16482 /* ignore the result, Python checks for ENOSYS at runtime */
16483 (void)getrandom(buffer, buflen, flags);
16484 return 0;
16485 }
16486
16487
16488_ACEOF
16489if ac_fn_c_try_link "$LINENO"; then :
16490 have_getrandom=yes
16491else
16492 have_getrandom=no
16493fi
16494rm -f core conftest.err conftest.$ac_objext \
16495 conftest$ac_exeext conftest.$ac_ext
16496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16497$as_echo "$have_getrandom" >&6; }
16498
16499if test "$have_getrandom" = yes; then
16500
16501$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16502
16503fi
16504
Guido van Rossum627b2d71993-12-24 10:39:16 +000016505# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016506ac_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 +000016507
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016508ac_config_files="$ac_config_files Modules/ld_so_aix"
16509
Martin v. Löwis11437992002-04-12 09:54:03 +000016510cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016511# This file is a shell script that caches the results of configure
16512# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016513# scripts and configure runs, see configure's option --config-cache.
16514# It is not useful on other systems. If it contains results you don't
16515# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016516#
Martin v. Löwis11437992002-04-12 09:54:03 +000016517# config.status only pays attention to the cache file if you give it
16518# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016519#
Skip Montanaro6dead952003-09-25 14:50:04 +000016520# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016521# loading this file, other *unset* `ac_cv_foo' will be assigned the
16522# following values.
16523
16524_ACEOF
16525
Guido van Rossumf78abae1997-01-21 22:02:36 +000016526# The following way of writing the cache mishandles newlines in values,
16527# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016529# Ultrix sh set writes to stderr and can't be redirected directly,
16530# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531(
16532 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16533 eval ac_val=\$$ac_var
16534 case $ac_val in #(
16535 *${as_nl}*)
16536 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016537 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16538$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016539 esac
16540 case $ac_var in #(
16541 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016542 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16543 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 esac ;;
16545 esac
16546 done
16547
Martin v. Löwis11437992002-04-12 09:54:03 +000016548 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16550 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016551 # `set' does not quote correctly, so add quotes: double-quote
16552 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016554 "s/'/'\\\\''/g;
16555 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016557 *)
16558 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016559 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561 esac |
16562 sort
16563) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016564 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016566 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16569 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16571 :end' >>confcache
16572if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16573 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016574 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016575 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16576$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016577 if test ! -f "$cache_file" || test -h "$cache_file"; then
16578 cat confcache >"$cache_file"
16579 else
16580 case $cache_file in #(
16581 */* | ?:*)
16582 mv -f confcache "$cache_file"$$ &&
16583 mv -f "$cache_file"$$ "$cache_file" ;; #(
16584 *)
16585 mv -f confcache "$cache_file" ;;
16586 esac
16587 fi
16588 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016589 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016590 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16591$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016592 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016593fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016594rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016595
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016596test "x$prefix" = xNONE && prefix=$ac_default_prefix
16597# Let make expand exec_prefix.
16598test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016599
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016600DEFS=-DHAVE_CONFIG_H
16601
Skip Montanaro6dead952003-09-25 14:50:04 +000016602ac_libobjs=
16603ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016604U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016605for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16606 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016608 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16610 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16612 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016613done
16614LIBOBJS=$ac_libobjs
16615
16616LTLIBOBJS=$ac_ltlibobjs
16617
16618
Martin v. Löwis11437992002-04-12 09:54:03 +000016619
Matthias Kloseb9621712010-04-24 17:59:49 +000016620
Victor Stinnere0be4232011-10-25 13:06:09 +020016621: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016622ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016623ac_clean_files_save=$ac_clean_files
16624ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016625{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16626$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16627as_write_fail=0
16628cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016629#! $SHELL
16630# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016631# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016632# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016633# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016634
Martin v. Löwis11437992002-04-12 09:54:03 +000016635debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016636ac_cs_recheck=false
16637ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016638
Matthias Kloseb9621712010-04-24 17:59:49 +000016639SHELL=\${CONFIG_SHELL-$SHELL}
16640export SHELL
16641_ASEOF
16642cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16643## -------------------- ##
16644## M4sh Initialization. ##
16645## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647# Be more Bourne compatible
16648DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016649if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 emulate sh
16651 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016652 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016653 # is contrary to our usage. Disable this feature.
16654 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016656else
Matthias Kloseb9621712010-04-24 17:59:49 +000016657 case `(set -o) 2>/dev/null` in #(
16658 *posix*) :
16659 set -o posix ;; #(
16660 *) :
16661 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016663fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016664
16665
Matthias Kloseb9621712010-04-24 17:59:49 +000016666as_nl='
16667'
16668export as_nl
16669# Printing a long string crashes Solaris 7 /usr/bin/printf.
16670as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16671as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16672as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16673# Prefer a ksh shell builtin over an external printf program on Solaris,
16674# but without wasting forks for bash or zsh.
16675if test -z "$BASH_VERSION$ZSH_VERSION" \
16676 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16677 as_echo='print -r --'
16678 as_echo_n='print -rn --'
16679elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16680 as_echo='printf %s\n'
16681 as_echo_n='printf %s'
16682else
16683 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16684 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16685 as_echo_n='/usr/ucb/echo -n'
16686 else
16687 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16688 as_echo_n_body='eval
16689 arg=$1;
16690 case $arg in #(
16691 *"$as_nl"*)
16692 expr "X$arg" : "X\\(.*\\)$as_nl";
16693 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16694 esac;
16695 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16696 '
16697 export as_echo_n_body
16698 as_echo_n='sh -c $as_echo_n_body as_echo'
16699 fi
16700 export as_echo_body
16701 as_echo='sh -c $as_echo_body as_echo'
16702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016703
16704# The user is always right.
16705if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016706 PATH_SEPARATOR=:
16707 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16708 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16709 PATH_SEPARATOR=';'
16710 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713
16714# IFS
16715# We need space, tab and new line, in precisely that order. Quoting is
16716# there to prevent editors from complaining about space-tab.
16717# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16718# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719IFS=" "" $as_nl"
16720
16721# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016722as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016723case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016724 *[\\/]* ) as_myself=$0 ;;
16725 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016726for as_dir in $PATH
16727do
16728 IFS=$as_save_IFS
16729 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016730 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16731 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734 ;;
16735esac
16736# We did not find ourselves, most probably we were run as `sh COMMAND'
16737# in which case we are not to be found in the path.
16738if test "x$as_myself" = x; then
16739 as_myself=$0
16740fi
16741if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016742 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16743 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744fi
16745
Matthias Kloseb9621712010-04-24 17:59:49 +000016746# Unset variables that we do not need and which cause bugs (e.g. in
16747# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16748# suppresses any "Segmentation fault" message there. '((' could
16749# trigger a bug in pdksh 5.2.14.
16750for as_var in BASH_ENV ENV MAIL MAILPATH
16751do eval test x\${$as_var+set} = xset \
16752 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753done
16754PS1='$ '
16755PS2='> '
16756PS4='+ '
16757
16758# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016759LC_ALL=C
16760export LC_ALL
16761LANGUAGE=C
16762export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016763
Matthias Kloseb9621712010-04-24 17:59:49 +000016764# CDPATH.
16765(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16766
16767
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016768# as_fn_error STATUS ERROR [LINENO LOG_FD]
16769# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016770# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16771# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016772# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016773as_fn_error ()
16774{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016775 as_status=$1; test $as_status -eq 0 && as_status=1
16776 if test "$4"; then
16777 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16778 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016779 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016780 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016781 as_fn_exit $as_status
16782} # as_fn_error
16783
16784
16785# as_fn_set_status STATUS
16786# -----------------------
16787# Set $? to STATUS, without forking.
16788as_fn_set_status ()
16789{
16790 return $1
16791} # as_fn_set_status
16792
16793# as_fn_exit STATUS
16794# -----------------
16795# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16796as_fn_exit ()
16797{
16798 set +e
16799 as_fn_set_status $1
16800 exit $1
16801} # as_fn_exit
16802
16803# as_fn_unset VAR
16804# ---------------
16805# Portably unset VAR.
16806as_fn_unset ()
16807{
16808 { eval $1=; unset $1;}
16809}
16810as_unset=as_fn_unset
16811# as_fn_append VAR VALUE
16812# ----------------------
16813# Append the text in VALUE to the end of the definition contained in VAR. Take
16814# advantage of any shell optimizations that allow amortized linear growth over
16815# repeated appends, instead of the typical quadratic growth present in naive
16816# implementations.
16817if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16818 eval 'as_fn_append ()
16819 {
16820 eval $1+=\$2
16821 }'
16822else
16823 as_fn_append ()
16824 {
16825 eval $1=\$$1\$2
16826 }
16827fi # as_fn_append
16828
16829# as_fn_arith ARG...
16830# ------------------
16831# Perform arithmetic evaluation on the ARGs, and store the result in the
16832# global $as_val. Take advantage of shells that can avoid forks. The arguments
16833# must be portable across $(()) and expr.
16834if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16835 eval 'as_fn_arith ()
16836 {
16837 as_val=$(( $* ))
16838 }'
16839else
16840 as_fn_arith ()
16841 {
16842 as_val=`expr "$@" || test $? -eq 1`
16843 }
16844fi # as_fn_arith
16845
16846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847if expr a : '\(a\)' >/dev/null 2>&1 &&
16848 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16849 as_expr=expr
16850else
16851 as_expr=false
16852fi
16853
16854if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16855 as_basename=basename
16856else
16857 as_basename=false
16858fi
16859
Matthias Kloseb9621712010-04-24 17:59:49 +000016860if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16861 as_dirname=dirname
16862else
16863 as_dirname=false
16864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016866as_me=`$as_basename -- "$0" ||
16867$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16868 X"$0" : 'X\(//\)$' \| \
16869 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016870$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016871 sed '/^.*\/\([^/][^/]*\)\/*$/{
16872 s//\1/
16873 q
16874 }
16875 /^X\/\(\/\/\)$/{
16876 s//\1/
16877 q
16878 }
16879 /^X\/\(\/\).*/{
16880 s//\1/
16881 q
16882 }
16883 s/.*/./; q'`
16884
Matthias Kloseb9621712010-04-24 17:59:49 +000016885# Avoid depending upon Character Ranges.
16886as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16887as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16888as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16889as_cr_digits='0123456789'
16890as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891
16892ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016893case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016895 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016897 xy) ECHO_C='\c';;
16898 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16899 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900 esac;;
16901*)
16902 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016904
Martin v. Löwis11437992002-04-12 09:54:03 +000016905rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016906if test -d conf$$.dir; then
16907 rm -f conf$$.dir/conf$$.file
16908else
16909 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016910 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016912if (echo >conf$$.file) 2>/dev/null; then
16913 if ln -s conf$$.file conf$$ 2>/dev/null; then
16914 as_ln_s='ln -s'
16915 # ... but there are two gotchas:
16916 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16917 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016918 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016919 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016920 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016921 elif ln conf$$.file conf$$ 2>/dev/null; then
16922 as_ln_s=ln
16923 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016924 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016926else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016927 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016929rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16930rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016931
Matthias Kloseb9621712010-04-24 17:59:49 +000016932
16933# as_fn_mkdir_p
16934# -------------
16935# Create "$as_dir" as a directory, including parents if necessary.
16936as_fn_mkdir_p ()
16937{
16938
16939 case $as_dir in #(
16940 -*) as_dir=./$as_dir;;
16941 esac
16942 test -d "$as_dir" || eval $as_mkdir_p || {
16943 as_dirs=
16944 while :; do
16945 case $as_dir in #(
16946 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16947 *) as_qdir=$as_dir;;
16948 esac
16949 as_dirs="'$as_qdir' $as_dirs"
16950 as_dir=`$as_dirname -- "$as_dir" ||
16951$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16952 X"$as_dir" : 'X\(//\)[^/]' \| \
16953 X"$as_dir" : 'X\(//\)$' \| \
16954 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16955$as_echo X"$as_dir" |
16956 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16957 s//\1/
16958 q
16959 }
16960 /^X\(\/\/\)[^/].*/{
16961 s//\1/
16962 q
16963 }
16964 /^X\(\/\/\)$/{
16965 s//\1/
16966 q
16967 }
16968 /^X\(\/\).*/{
16969 s//\1/
16970 q
16971 }
16972 s/.*/./; q'`
16973 test -d "$as_dir" && break
16974 done
16975 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016976 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016977
16978
16979} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016980if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016981 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016982else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016983 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016984 as_mkdir_p=false
16985fi
16986
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016987
16988# as_fn_executable_p FILE
16989# -----------------------
16990# Test if FILE is an executable regular file.
16991as_fn_executable_p ()
16992{
16993 test -f "$1" && test -x "$1"
16994} # as_fn_executable_p
16995as_test_x='test -x'
16996as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016997
16998# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016999as_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 +000017000
17001# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017002as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017003
17004
Martin v. Löwis11437992002-04-12 09:54:03 +000017005exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017006## ----------------------------------- ##
17007## Main body of $CONFIG_STATUS script. ##
17008## ----------------------------------- ##
17009_ASEOF
17010test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017011
Matthias Kloseb9621712010-04-24 17:59:49 +000017012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17013# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017014# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015# values after options handling.
17016ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040017017This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017018generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017019
17020 CONFIG_FILES = $CONFIG_FILES
17021 CONFIG_HEADERS = $CONFIG_HEADERS
17022 CONFIG_LINKS = $CONFIG_LINKS
17023 CONFIG_COMMANDS = $CONFIG_COMMANDS
17024 $ $0 $@
17025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026on `(hostname || uname -n) 2>/dev/null | sed 1q`
17027"
17028
Martin v. Löwis11437992002-04-12 09:54:03 +000017029_ACEOF
17030
Matthias Kloseb9621712010-04-24 17:59:49 +000017031case $ac_config_files in *"
17032"*) set x $ac_config_files; shift; ac_config_files=$*;;
17033esac
17034
17035case $ac_config_headers in *"
17036"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17037esac
17038
17039
17040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017041# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017042config_files="$ac_config_files"
17043config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017046
Matthias Kloseb9621712010-04-24 17:59:49 +000017047cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017048ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017049\`$as_me' instantiates files and other configuration actions
17050from templates according to the current configuration. Unless the files
17051and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017052
Matthias Kloseb9621712010-04-24 17:59:49 +000017053Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017054
17055 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017056 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017057 --config print configuration, then exit
17058 -q, --quiet, --silent
17059 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017060 -d, --debug don't remove temporary files
17061 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017062 --file=FILE[:TEMPLATE]
17063 instantiate the configuration file FILE
17064 --header=FILE[:TEMPLATE]
17065 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017066
17067Configuration files:
17068$config_files
17069
17070Configuration headers:
17071$config_headers
17072
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017073Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017076cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17077ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017078ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040017079python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017080configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017081 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017082
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017083Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017084This config.status script is free software; the Free Software Foundation
17085gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086
17087ac_pwd='$ac_pwd'
17088srcdir='$srcdir'
17089INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017090MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017091test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017092_ACEOF
17093
Matthias Kloseb9621712010-04-24 17:59:49 +000017094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17095# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017096ac_need_defaults=:
17097while test $# != 0
17098do
17099 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017100 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17102 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017103 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017104 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017105 --*=)
17106 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17107 ac_optarg=
17108 ac_shift=:
17109 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017111 ac_option=$1
17112 ac_optarg=$2
17113 ac_shift=shift
17114 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017115 esac
17116
Skip Montanaro6dead952003-09-25 14:50:04 +000017117 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017119 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17120 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017121 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017122 $as_echo "$ac_cs_version"; exit ;;
17123 --config | --confi | --conf | --con | --co | --c )
17124 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017125 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017126 debug=: ;;
17127 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017128 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017129 case $ac_optarg in
17130 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017131 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017132 esac
17133 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017134 ac_need_defaults=false;;
17135 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017136 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017137 case $ac_optarg in
17138 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17139 esac
17140 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017141 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142 --he | --h)
17143 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017144 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017145Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017146 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017147 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17149 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17150 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017151
17152 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017153 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017154Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017155
Matthias Kloseb9621712010-04-24 17:59:49 +000017156 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017158
17159 esac
17160 shift
17161done
17162
Skip Montanaro6dead952003-09-25 14:50:04 +000017163ac_configure_extra_args=
17164
17165if $ac_cs_silent; then
17166 exec 6>/dev/null
17167 ac_configure_extra_args="$ac_configure_extra_args --silent"
17168fi
17169
17170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017172if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017173 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017174 shift
17175 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17176 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017178 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017179fi
17180
Martin v. Löwis11437992002-04-12 09:54:03 +000017181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017182cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183exec 5>>config.log
17184{
17185 echo
17186 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17187## Running $as_me. ##
17188_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017189 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017193cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017195
Matthias Kloseb9621712010-04-24 17:59:49 +000017196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197
17198# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017199for ac_config_target in $ac_config_targets
17200do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201 case $ac_config_target in
17202 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17203 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17204 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017205 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17206 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17208 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017209 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017210 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017211 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017212
Victor Stinnere0be4232011-10-25 13:06:09 +020017213 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017214 esac
17215done
17216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217
Martin v. Löwis11437992002-04-12 09:54:03 +000017218# If the user did not use the arguments to specify the items to instantiate,
17219# then the envvar interface is used. Set only those that are not.
17220# We use the long form for the default assignment because of an extremely
17221# bizarre bug on SunOS 4.1.3.
17222if $ac_need_defaults; then
17223 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17224 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17225fi
17226
Skip Montanaro6dead952003-09-25 14:50:04 +000017227# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017229# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230# Hook for its removal unless debugging.
17231# Note that there is a small window in which the directory will not be cleaned:
17232# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017233$debug ||
17234{
Victor Stinnere0be4232011-10-25 13:06:09 +020017235 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017237 : "${ac_tmp:=$tmp}"
17238 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017240 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017241}
Martin v. Löwis11437992002-04-12 09:54:03 +000017242# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017243
Martin v. Löwis11437992002-04-12 09:54:03 +000017244{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017245 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017246 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017247} ||
17248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017249 tmp=./conf$$-$RANDOM
17250 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017251} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017252ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017253
Matthias Kloseb9621712010-04-24 17:59:49 +000017254# Set up the scripts for CONFIG_FILES section.
17255# No need to generate them if there are no CONFIG_FILES.
17256# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017258
Matthias Kloseb9621712010-04-24 17:59:49 +000017259
17260ac_cr=`echo X | tr X '\015'`
17261# On cygwin, bash can eat \r inside `` if the user requested igncr.
17262# But we know of no other shell where ac_cr would be empty at this
17263# point, so we can use a bashism as a fallback.
17264if test "x$ac_cr" = x; then
17265 eval ac_cr=\$\'\\r\'
17266fi
17267ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17268if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017269 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017270else
17271 ac_cs_awk_cr=$ac_cr
17272fi
17273
Victor Stinnere0be4232011-10-25 13:06:09 +020017274echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017275_ACEOF
17276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277
Matthias Kloseb9621712010-04-24 17:59:49 +000017278{
17279 echo "cat >conf$$subs.awk <<_ACEOF" &&
17280 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17281 echo "_ACEOF"
17282} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017283 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17284ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285ac_delim='%!_!# '
17286for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017287 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017288 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289
Matthias Kloseb9621712010-04-24 17:59:49 +000017290 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17291 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292 break
17293 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017294 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295 else
17296 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017297 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298done
Matthias Kloseb9621712010-04-24 17:59:49 +000017299rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017300
Matthias Kloseb9621712010-04-24 17:59:49 +000017301cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017302cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017304sed -n '
17305h
17306s/^/S["/; s/!.*/"]=/
17307p
17308g
17309s/^[^!]*!//
17310:repl
17311t repl
17312s/'"$ac_delim"'$//
17313t delim
17314:nl
17315h
17316s/\(.\{148\}\)..*/\1/
17317t more1
17318s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17319p
17320n
17321b repl
17322:more1
17323s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17324p
17325g
17326s/.\{148\}//
17327t nl
17328:delim
17329h
17330s/\(.\{148\}\)..*/\1/
17331t more2
17332s/["\\]/\\&/g; s/^/"/; s/$/"/
17333p
17334b
17335:more2
17336s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17337p
17338g
17339s/.\{148\}//
17340t delim
17341' <conf$$subs.awk | sed '
17342/^[^""]/{
17343 N
17344 s/\n//
17345}
17346' >>$CONFIG_STATUS || ac_write_fail=1
17347rm -f conf$$subs.awk
17348cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17349_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017350cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017351 for (key in S) S_is_set[key] = 1
17352 FS = ""
17353
17354}
17355{
17356 line = $ 0
17357 nfields = split(line, field, "@")
17358 substed = 0
17359 len = length(field[1])
17360 for (i = 2; i < nfields; i++) {
17361 key = field[i]
17362 keylen = length(key)
17363 if (S_is_set[key]) {
17364 value = S[key]
17365 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17366 len += length(value) + length(field[++i])
17367 substed = 1
17368 } else
17369 len += 1 + keylen
17370 }
17371
17372 print line
17373}
17374
17375_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017377cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17378if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17379 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17380else
17381 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017382fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017383 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017384_ACEOF
17385
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017386# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17387# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388# trailing colons and then remove the whole line if VPATH becomes empty
17389# (actually we leave an empty line to preserve line numbers).
17390if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017391 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17392h
17393s///
17394s/^/:/
17395s/[ ]*$/:/
17396s/:\$(srcdir):/:/g
17397s/:\${srcdir}:/:/g
17398s/:@srcdir@:/:/g
17399s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017401x
17402s/\(=[ ]*\).*/\1/
17403G
17404s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405s/^[^=]*=[ ]*$//
17406}'
17407fi
17408
Matthias Kloseb9621712010-04-24 17:59:49 +000017409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017410fi # test -n "$CONFIG_FILES"
17411
Matthias Kloseb9621712010-04-24 17:59:49 +000017412# Set up the scripts for CONFIG_HEADERS section.
17413# No need to generate them if there are no CONFIG_HEADERS.
17414# This happens for instance with `./config.status Makefile'.
17415if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017416cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017417BEGIN {
17418_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419
Matthias Kloseb9621712010-04-24 17:59:49 +000017420# Transform confdefs.h into an awk script `defines.awk', embedded as
17421# here-document in config.status, that substitutes the proper values into
17422# config.h.in to produce config.h.
17423
17424# Create a delimiter string that does not exist in confdefs.h, to ease
17425# handling of long lines.
17426ac_delim='%!_!# '
17427for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017428 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17429 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017430 break
17431 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017432 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017433 else
17434 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17435 fi
17436done
17437
17438# For the awk script, D is an array of macro values keyed by name,
17439# likewise P contains macro parameters if any. Preserve backslash
17440# newline sequences.
17441
17442ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17443sed -n '
17444s/.\{148\}/&'"$ac_delim"'/g
17445t rset
17446:rset
17447s/^[ ]*#[ ]*define[ ][ ]*/ /
17448t def
17449d
17450:def
17451s/\\$//
17452t bsnl
17453s/["\\]/\\&/g
17454s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17455D["\1"]=" \3"/p
17456s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17457d
17458:bsnl
17459s/["\\]/\\&/g
17460s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17461D["\1"]=" \3\\\\\\n"\\/p
17462t cont
17463s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17464t cont
17465d
17466:cont
17467n
17468s/.\{148\}/&'"$ac_delim"'/g
17469t clear
17470:clear
17471s/\\$//
17472t bsnlc
17473s/["\\]/\\&/g; s/^/"/; s/$/"/p
17474d
17475:bsnlc
17476s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17477b cont
17478' <confdefs.h | sed '
17479s/'"$ac_delim"'/"\\\
17480"/g' >>$CONFIG_STATUS || ac_write_fail=1
17481
17482cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17483 for (key in D) D_is_set[key] = 1
17484 FS = ""
17485}
17486/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17487 line = \$ 0
17488 split(line, arg, " ")
17489 if (arg[1] == "#") {
17490 defundef = arg[2]
17491 mac1 = arg[3]
17492 } else {
17493 defundef = substr(arg[1], 2)
17494 mac1 = arg[2]
17495 }
17496 split(mac1, mac2, "(") #)
17497 macro = mac2[1]
17498 prefix = substr(line, 1, index(line, defundef) - 1)
17499 if (D_is_set[macro]) {
17500 # Preserve the white space surrounding the "#".
17501 print prefix "define", macro P[macro] D[macro]
17502 next
17503 } else {
17504 # Replace #undef with comments. This is necessary, for example,
17505 # in the case of _POSIX_SOURCE, which is predefined and required
17506 # on some systems where configure will not decide to define it.
17507 if (defundef == "undef") {
17508 print "/*", prefix defundef, macro, "*/"
17509 next
17510 }
17511 }
17512}
17513{ print }
17514_ACAWK
17515_ACEOF
17516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017517 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017518fi # test -n "$CONFIG_HEADERS"
17519
17520
17521eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17522shift
17523for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524do
17525 case $ac_tag in
17526 :[FHLC]) ac_mode=$ac_tag; continue;;
17527 esac
17528 case $ac_mode$ac_tag in
17529 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017530 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531 :[FH]-) ac_tag=-:-;;
17532 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17533 esac
17534 ac_save_IFS=$IFS
17535 IFS=:
17536 set x $ac_tag
17537 IFS=$ac_save_IFS
17538 shift
17539 ac_file=$1
17540 shift
17541
17542 case $ac_mode in
17543 :L) ac_source=$1;;
17544 :[FH])
17545 ac_file_inputs=
17546 for ac_f
17547 do
17548 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017549 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550 *) # Look for the file first in the build tree, then in the source tree
17551 # (if the path is not absolute). The absolute path cannot be DOS-style,
17552 # because $ac_f cannot contain `:'.
17553 test -f "$ac_f" ||
17554 case $ac_f in
17555 [\\/$]*) false;;
17556 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17557 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017558 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017560 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17561 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 done
17563
17564 # Let's still pretend it is `configure' which instantiates (i.e., don't
17565 # use $as_me), people would be surprised to read:
17566 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017567 configure_input='Generated from '`
17568 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17569 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570 if test x"$ac_file" != x-; then
17571 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017572 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17573$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017574 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017575 # Neutralize special characters interpreted by sed in replacement strings.
17576 case $configure_input in #(
17577 *\&* | *\|* | *\\* )
17578 ac_sed_conf_input=`$as_echo "$configure_input" |
17579 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17580 *) ac_sed_conf_input=$configure_input;;
17581 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582
17583 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017584 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17585 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017586 esac
17587 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017588 esac
17589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017591$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017592 X"$ac_file" : 'X\(//\)[^/]' \| \
17593 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017595$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17597 s//\1/
17598 q
17599 }
17600 /^X\(\/\/\)[^/].*/{
17601 s//\1/
17602 q
17603 }
17604 /^X\(\/\/\)$/{
17605 s//\1/
17606 q
17607 }
17608 /^X\(\/\).*/{
17609 s//\1/
17610 q
17611 }
17612 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017613 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017614 ac_builddir=.
17615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616case "$ac_dir" in
17617.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17618*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017619 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017621 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622 case $ac_top_builddir_sub in
17623 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17624 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17625 esac ;;
17626esac
17627ac_abs_top_builddir=$ac_pwd
17628ac_abs_builddir=$ac_pwd$ac_dir_suffix
17629# for backward compatibility:
17630ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017631
17632case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635 ac_top_srcdir=$ac_top_builddir_sub
17636 ac_abs_top_srcdir=$ac_pwd ;;
17637 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017639 ac_top_srcdir=$srcdir
17640 ac_abs_top_srcdir=$srcdir ;;
17641 *) # Relative name.
17642 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17643 ac_top_srcdir=$ac_top_build_prefix$srcdir
17644 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017645esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017647
Martin v. Löwis11437992002-04-12 09:54:03 +000017648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649 case $ac_mode in
17650 :F)
17651 #
17652 # CONFIG_FILE
17653 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017654
17655 case $INSTALL in
17656 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017658 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017659 ac_MKDIR_P=$MKDIR_P
17660 case $MKDIR_P in
17661 [\\/$]* | ?:[\\/]* ) ;;
17662 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17663 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017664_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665
Matthias Kloseb9621712010-04-24 17:59:49 +000017666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667# If the template does not know about datarootdir, expand it.
17668# FIXME: This hack should be removed a few years after 2.60.
17669ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017670ac_sed_dataroot='
17671/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672 p
17673 q
17674}
17675/@datadir@/p
17676/@docdir@/p
17677/@infodir@/p
17678/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017679/@mandir@/p'
17680case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681*datarootdir*) ac_datarootdir_seen=yes;;
17682*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017683 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17684$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687 ac_datarootdir_hack='
17688 s&@datadir@&$datadir&g
17689 s&@docdir@&$docdir&g
17690 s&@infodir@&$infodir&g
17691 s&@localedir@&$localedir&g
17692 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017693 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694esac
17695_ACEOF
17696
17697# Neutralize VPATH when `$srcdir' = `.'.
17698# Shell code in configure.ac might set extrasub.
17699# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017700cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17701ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017702$extrasub
17703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017704cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017705:t
17706/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017707s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017709s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710s&@srcdir@&$ac_srcdir&;t t
17711s&@abs_srcdir@&$ac_abs_srcdir&;t t
17712s&@top_srcdir@&$ac_top_srcdir&;t t
17713s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17714s&@builddir@&$ac_builddir&;t t
17715s&@abs_builddir@&$ac_abs_builddir&;t t
17716s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17717s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017718s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017720"
Victor Stinnere0be4232011-10-25 13:06:09 +020017721eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17722 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017725 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17726 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17727 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017729which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017730$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017731which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017732
Victor Stinnere0be4232011-10-25 13:06:09 +020017733 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017734 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017735 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17736 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017738 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 ;;
17740 :H)
17741 #
17742 # CONFIG_HEADER
17743 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017744 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 {
17746 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017747 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17748 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017749 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017750 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017751 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17752$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017753 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017754 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017755 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017756 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 fi
17758 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017759 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017760 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017761 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017762 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765
17766 esac
17767
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017768
17769 case $ac_file$ac_mode in
17770 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17771
17772 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773done # for ac_tag
17774
Guido van Rossum627b2d71993-12-24 10:39:16 +000017775
Matthias Kloseb9621712010-04-24 17:59:49 +000017776as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017777_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017778ac_clean_files=$ac_clean_files_save
17779
Matthias Kloseb9621712010-04-24 17:59:49 +000017780test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017781 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017782
Martin v. Löwis11437992002-04-12 09:54:03 +000017783
17784# configure is writing to config.log, and then calls config.status.
17785# config.status does its own redirection, appending to config.log.
17786# Unfortunately, on DOS this fails, as config.log is still kept open
17787# by configure, so config.status won't be able to write to it; its
17788# output is simply discarded. So we exec the FD to /dev/null,
17789# effectively closing config.log, so it can be properly (re)opened and
17790# appended to by config.status. When coming back to configure, we
17791# need to make the FD available again.
17792if test "$no_create" != yes; then
17793 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017794 ac_config_status_args=
17795 test "$silent" = yes &&
17796 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017797 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017798 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017799 exec 5>>config.log
17800 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17801 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017802 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017803fi
17804if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17806$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017807fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017808
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017809
Christian Heimes75ed8902013-11-20 01:11:18 +010017810echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017811if test ! -f Modules/Setup
17812then
17813 cp $srcdir/Modules/Setup.dist Modules/Setup
17814fi
17815
Christian Heimes75ed8902013-11-20 01:11:18 +010017816echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017817if test ! -f Modules/Setup.local
17818then
17819 echo "# Edit this file for local setup changes" >Modules/Setup.local
17820fi
17821
Christian Heimes75ed8902013-11-20 01:11:18 +010017822echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017823$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17824 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017825 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017826mv config.c Modules
Brett Cannon8c94f972016-09-06 17:15:21 -070017827
17828if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17829 echo "" >&6
17830 echo "" >&6
17831 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17832 echo "please run ./configure --with-optimizations" >&6
17833 echo "" >&6
17834 echo "" >&6
17835fi
17836