blob: 2541015ce5aca01282afba624f32a8b380ec8158 [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
Brett Cannon8c94f972016-09-06 17:15:21 -07001512 --with-optimizations Enable all optimizations when available (LTO, PGO,
1513 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
Trent Nelson5595ab52012-10-17 04:47:31 -04002823if test "$abs_srcdir" != "$abs_builddir"; 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
6568 Py_LTO='true'
6569 case $ac_sys_system in
6570 Darwin*)
6571 # At least on macOS El Capitan, LTO does not work with PGO.
6572 Py_LTO='false'
6573 ;;
6574 esac
6575 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006576 REQUIRE_PGO="yes"
Brett Cannon8c94f972016-09-06 17:15:21 -07006577 DEF_MAKE_RULE="build_all"
6578else
6579 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006580 REQUIRE_PGO="no"
Brett Cannon8c94f972016-09-06 17:15:21 -07006581 DEF_MAKE_RULE="all"
6582fi
6583
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006584# Enable LTO flags
6585
6586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6587$as_echo_n "checking for --with-lto... " >&6; }
6588
6589# Check whether --with-lto was given.
6590if test "${with_lto+set}" = set; then :
6591 withval=$with_lto;
6592if test "$withval" != no
6593then
6594 Py_LTO='true'
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6596$as_echo "yes" >&6; };
6597else
6598 Py_LTO='false'
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600$as_echo "no" >&6; };
6601fi
6602else
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607if test "$Py_LTO" = 'true' ; then
6608 case $CC in
6609 *clang*)
6610 # Any changes made here should be reflected in the GCC+Darwin case below
6611 LTOFLAGS="-flto"
6612 ;;
6613 *gcc*)
6614 case $ac_sys_system in
6615 Darwin*)
6616 LTOFLAGS="-flto"
6617 ;;
6618 *)
6619 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6620 ;;
6621 esac
6622 ;;
6623 esac
6624fi
6625
Brett Cannon7188a3e2015-09-18 15:13:44 -07006626# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006627
6628
6629
6630
6631
Gregory P. Smith799520c2016-09-07 16:10:00 -07006632# Make this work on systems where llvm tools are not installed with their
6633# normal names in the default $PATH (ie: Ubuntu). They exist under the
6634# non-suffixed name in their versioned llvm directory.
6635llvm_bin_dir=''
6636llvm_path="${PATH}"
6637if test "${CC}" = "clang"
6638then
6639 clang_bin=`which clang`
6640 # Some systems install clang elsewhere as a symlink to the real path
6641 # which is where the related llvm tools are located.
6642 if test -L "${clang_bin}"
6643 then
6644 clang_dir=`dirname "${clang_bin}"`
6645 clang_bin=`readlink "${clang_bin}"`
6646 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6647 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6648 fi
6649fi
Zachary Ware5af85642015-12-21 12:09:17 -06006650
Gregory P. Smith799520c2016-09-07 16:10:00 -07006651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6652$as_echo_n "checking target system type... " >&6; }
6653if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006654 $as_echo_n "(cached) " >&6
6655else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006656 if test "x$target_alias" = x; then
6657 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006658else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006659 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6660 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6661fi
6662
6663fi
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6665$as_echo "$ac_cv_target" >&6; }
6666case $ac_cv_target in
6667*-*-*) ;;
6668*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6669esac
6670target=$ac_cv_target
6671ac_save_IFS=$IFS; IFS='-'
6672set x $ac_cv_target
6673shift
6674target_cpu=$1
6675target_vendor=$2
6676shift; shift
6677# Remember, the first character of IFS is used to create $*,
6678# except with old shells:
6679target_os=$*
6680IFS=$ac_save_IFS
6681case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6682
6683
6684# The aliases save the names the user supplied, while $host etc.
6685# will get canonicalized.
6686test -n "$target_alias" &&
6687 test "$program_prefix$program_suffix$program_transform_name" = \
6688 NONENONEs,x,x, &&
6689 program_prefix=${target_alias}-
6690# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6691set dummy $target_alias-llvm-profdata; ac_word=$2
6692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6693$as_echo_n "checking for $ac_word... " >&6; }
6694if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6695 $as_echo_n "(cached) " >&6
6696else
6697 case $LLVM_PROFDATA in
6698 [\\/]* | ?:[\\/]*)
6699 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6700 ;;
6701 *)
6702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6703for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006704do
6705 IFS=$as_save_IFS
6706 test -z "$as_dir" && as_dir=.
6707 for ac_exec_ext in '' $ac_executable_extensions; do
6708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006709 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6711 break 2
6712 fi
6713done
6714 done
6715IFS=$as_save_IFS
6716
Gregory P. Smith799520c2016-09-07 16:10:00 -07006717 ;;
6718esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006719fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006720LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6721if test -n "$LLVM_PROFDATA"; then
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6723$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006724else
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6726$as_echo "no" >&6; }
6727fi
6728
6729
Gregory P. Smith799520c2016-09-07 16:10:00 -07006730if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6731 if test "$build" = "$target"; then
6732 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6733 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6734set dummy llvm-profdata; ac_word=$2
6735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6736$as_echo_n "checking for $ac_word... " >&6; }
6737if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6738 $as_echo_n "(cached) " >&6
6739else
6740 case $ac_pt_LLVM_PROFDATA in
6741 [\\/]* | ?:[\\/]*)
6742 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6743 ;;
6744 *)
6745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6746for as_dir in ${llvm_path}
6747do
6748 IFS=$as_save_IFS
6749 test -z "$as_dir" && as_dir=.
6750 for ac_exec_ext in '' $ac_executable_extensions; do
6751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6752 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6754 break 2
6755 fi
6756done
6757 done
6758IFS=$as_save_IFS
6759
6760 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6761 ;;
6762esac
6763fi
6764ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6765if test -n "$ac_pt_LLVM_PROFDATA"; then
6766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6767$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6768else
6769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6770$as_echo "no" >&6; }
6771fi
6772
6773 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6774 else
6775 LLVM_PROFDATA="''"
6776 fi
6777else
6778 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6779fi
6780
6781
6782if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6783then
6784 LLVM_PROF_FOUND="found"
6785else
6786 LLVM_PROF_FOUND="not-found"
6787fi
6788if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6789then
6790 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6791 if test -n "${found_llvm_profdata}"
6792 then
6793 # llvm-profdata isn't directly in $PATH in some cases.
6794 # https://apple.stackexchange.com/questions/197053/
6795 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6796 LLVM_PROF_FOUND=found
6797 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6798$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6799 fi
6800fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801LLVM_PROF_ERR=no
6802case $CC in
6803 *clang*)
6804 # Any changes made here should be reflected in the GCC+Darwin case below
6805 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6806 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006807 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006808 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6809 if test $LLVM_PROF_FOUND = not-found
6810 then
6811 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006812 if test "${REQUIRE_PGO}" = "yes"
6813 then
6814 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6815 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006816 fi
6817 ;;
6818 *gcc*)
6819 case $ac_sys_system in
6820 Darwin*)
6821 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6822 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006823 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006824 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006825 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006826 then
6827 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006828 if test "${REQUIRE_PGO}" = "yes"
6829 then
6830 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6831 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006832 fi
6833 ;;
6834 *)
6835 PGO_PROF_GEN_FLAG="-fprofile-generate"
6836 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6837 LLVM_PROF_MERGER="true"
6838 LLVM_PROF_FILE=""
6839 ;;
6840 esac
6841 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006842 *icc*)
6843 PGO_PROF_GEN_FLAG="-prof-gen"
6844 PGO_PROF_USE_FLAG="-prof-use"
6845 LLVM_PROF_MERGER="true"
6846 LLVM_PROF_FILE=""
6847 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006848esac
6849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6851# merged with this chunk of code?
6852
6853# Optimizer/debugger flags
6854# ------------------------
6855# (The following bit of code is complicated enough - please keep things
6856# indented properly. Just pretend you're editing Python code. ;-)
6857
6858# There are two parallel sets of case statements below, one that checks to
6859# see if OPT was set and one that does BASECFLAGS setting based upon
6860# compiler and platform. BASECFLAGS tweaks need to be made even if the
6861# user set OPT.
6862
6863# tweak OPT based on compiler and platform, only if the user didn't set
6864# it on the command line
6865
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006866if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867then
6868 case $GCC in
6869 yes)
6870 if test "$CC" != 'g++' ; then
6871 STRICT_PROTO="-Wstrict-prototypes"
6872 fi
6873 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6874 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6875 WRAP="-fwrapv"
6876 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006877
6878 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006879 case $CC in
6880 *clang*) WRAP="-fwrapv"
6881 ;;
6882 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006883
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884 case $ac_cv_prog_cc_g in
6885 yes)
6886 if test "$Py_DEBUG" = 'true' ; then
6887 # Optimization messes up debuggers, so turn it off for
6888 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006889 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6890 OPT="-g -Og -Wall $STRICT_PROTO"
6891 else
6892 OPT="-g -O0 -Wall $STRICT_PROTO"
6893 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894 else
6895 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6896 fi
6897 ;;
6898 *)
6899 OPT="-O3 -Wall $STRICT_PROTO"
6900 ;;
6901 esac
6902 case $ac_sys_system in
6903 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6904 ;;
6905 esac
6906 ;;
6907
6908 *)
6909 OPT="-O"
6910 ;;
6911 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912fi
6913
6914
6915
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006916
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917# The -arch flags for universal builds on OSX
6918UNIVERSAL_ARCH_FLAGS=
6919
6920
6921# tweak BASECFLAGS based on compiler and platform
6922case $GCC in
6923yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006924 # Python doesn't violate C99 aliasing rules, but older versions of
6925 # GCC produce warnings for legal Python code. Enable
6926 # -fno-strict-aliasing on versions of GCC that support but produce
6927 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6929$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006930 ac_save_cc="$CC"
6931 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006932 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006933 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006935else
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006937/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006938
Matthias Kloseb159a552010-04-25 21:00:44 +00006939
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006940int
6941main ()
6942{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006943
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006944 ;
6945 return 0;
6946}
Matthias Kloseb159a552010-04-25 21:00:44 +00006947
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006949if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006950
6951 CC="$ac_save_cc -fstrict-aliasing"
6952 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006954/* end confdefs.h. */
6955
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006956 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006957int
6958main ()
6959{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006960double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006961 ;
6962 return 0;
6963}
Matthias Kloseb159a552010-04-25 21:00:44 +00006964
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006966if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006967
6968 ac_cv_no_strict_aliasing=no
6969
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970else
Matthias Kloseb159a552010-04-25 21:00:44 +00006971
6972 ac_cv_no_strict_aliasing=yes
6973
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006974fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006976
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006977else
Matthias Kloseb159a552010-04-25 21:00:44 +00006978
6979 ac_cv_no_strict_aliasing=no
6980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006983fi
6984
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6988$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006989 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990 then
6991 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6992 fi
6993
Zachary Ware5af85642015-12-21 12:09:17 -06006994 # ICC doesn't recognize the option, but only emits a warning
6995 ## XXX does it emit an unused result warning and can it be disabled?
6996 case "$CC" in
6997 *icc*)
6998 ac_cv_disable_unused_result_warning=no
6999 ;;
7000 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7002$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7003 ac_save_cc="$CC"
7004 CC="$CC -Wunused-result -Werror"
7005 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007006 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007007 $as_echo_n "(cached) " >&6
7008else
7009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7010/* end confdefs.h. */
7011
7012
7013int
7014main ()
7015{
7016
7017 ;
7018 return 0;
7019}
7020
7021_ACEOF
7022if ac_fn_c_try_compile "$LINENO"; then :
7023
7024 ac_cv_disable_unused_result_warning=yes
7025
7026else
7027
7028 ac_cv_disable_unused_result_warning=no
7029
7030fi
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7032fi
7033
7034 CFLAGS="$save_CFLAGS"
7035 CC="$ac_save_cc"
7036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7037$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007038 ;;
7039 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007040
7041 if test $ac_cv_disable_unused_result_warning = yes
7042 then
7043 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
7044 fi
7045
Benjamin Petersoncc00e012013-05-20 08:22:04 -07007046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
7047$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
7048 ac_save_cc="$CC"
7049 CC="$CC -Werror=declaration-after-statement"
7050 save_CFLAGS="$CFLAGS"
7051 if ${ac_cv_declaration_after_statement_warning+:} false; then :
7052 $as_echo_n "(cached) " >&6
7053else
7054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7055/* end confdefs.h. */
7056
7057
7058int
7059main ()
7060{
7061
7062 ;
7063 return 0;
7064}
7065
7066_ACEOF
7067if ac_fn_c_try_compile "$LINENO"; then :
7068
7069 ac_cv_declaration_after_statement_warning=yes
7070
7071else
7072
7073 ac_cv_declaration_after_statement_warning=no
7074
7075fi
7076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7077fi
7078
7079 CFLAGS="$save_CFLAGS"
7080 CC="$ac_save_cc"
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
7082$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
7083
7084 if test $ac_cv_declaration_after_statement_warning = yes
7085 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007086 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07007087 fi
7088
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7090$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7091 ac_save_cc="$CC"
7092 CC="$CC -Wsign-compare"
7093 save_CFLAGS="$CFLAGS"
7094 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7095 $as_echo_n "(cached) " >&6
7096else
7097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7098/* end confdefs.h. */
7099
7100
7101int
7102main ()
7103{
7104
7105 ;
7106 return 0;
7107}
7108
7109_ACEOF
7110if ac_fn_c_try_compile "$LINENO"; then :
7111
7112 ac_cv_enable_sign_compare_warning=yes
7113
7114else
7115
7116 ac_cv_enable_sign_compare_warning=no
7117
7118fi
7119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7120fi
7121
7122 CFLAGS="$save_CFLAGS"
7123 CC="$ac_save_cc"
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7125$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7126
7127 if test $ac_cv_enable_sign_compare_warning = yes
7128 then
7129 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7130 fi
7131
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7133$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7134 ac_save_cc="$CC"
7135 CC="$CC -Wunreachable-code"
7136 save_CFLAGS="$CFLAGS"
7137 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7138 $as_echo_n "(cached) " >&6
7139else
7140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7141/* end confdefs.h. */
7142
7143
7144int
7145main ()
7146{
7147
7148 ;
7149 return 0;
7150}
7151
7152_ACEOF
7153if ac_fn_c_try_compile "$LINENO"; then :
7154
7155 ac_cv_enable_unreachable_code_warning=yes
7156
7157else
7158
7159 ac_cv_enable_unreachable_code_warning=no
7160
7161fi
7162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7163fi
7164
7165 CFLAGS="$save_CFLAGS"
7166 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007167
7168 # Don't enable unreachable code warning in debug mode, since it usually
7169 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007170 # Issue #24324: Unfortunately, the unreachable code warning does not work
7171 # correctly on gcc and has been silently removed from the compiler.
7172 # It is supported on clang but on OS X systems gcc may be an alias
7173 # for clang. Try to determine if the compiler is not really gcc and,
7174 # if so, only then enable the warning.
7175 if test $ac_cv_enable_unreachable_code_warning = yes && \
7176 test "$Py_DEBUG" != "true" && \
7177 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007178 then
7179 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007180 else
7181 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007182 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7184$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007185
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007186 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7187 # support. Without this, treatment of subnormals doesn't follow
7188 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007189 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190 alpha*)
7191 BASECFLAGS="$BASECFLAGS -mieee"
7192 ;;
7193 esac
7194
7195 case $ac_sys_system in
7196 SCO_SV*)
7197 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7198 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007199
7200 # is there any other compiler on Darwin besides gcc?
7201 Darwin*)
7202 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7203 # used to be here, but non-Apple gcc doesn't accept them.
7204 if test "${CC}" = gcc
7205 then
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007207$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007208 case "${UNIVERSALSDK}" in
7209 */MacOSX10.4u.sdk)
7210 # Build using 10.4 SDK, force usage of gcc when the
7211 # compiler is gcc, otherwise the user will get very
7212 # confusing error messages when building on OSX 10.6
7213 CC=gcc-4.0
7214 CPP=cpp-4.0
7215 ;;
7216 esac
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007218$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007219 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007220
Ned Deily87adb6e2013-10-18 21:09:56 -07007221 if test "${enable_universalsdk}"
7222 then
7223 case "$UNIVERSAL_ARCHS" in
7224 32-bit)
7225 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7226 LIPO_32BIT_FLAGS=""
7227 ARCH_RUN_32BIT=""
7228 ;;
7229 64-bit)
7230 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7231 LIPO_32BIT_FLAGS=""
7232 ARCH_RUN_32BIT="true"
7233 ;;
7234 all)
7235 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7236 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7237 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7238 ;;
7239 intel)
7240 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7241 LIPO_32BIT_FLAGS="-extract i386"
7242 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7243 ;;
7244 intel-32)
7245 UNIVERSAL_ARCH_FLAGS="-arch i386"
7246 LIPO_32BIT_FLAGS=""
7247 ARCH_RUN_32BIT=""
7248 ;;
7249 3-way)
7250 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7251 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7252 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7253 ;;
7254 *)
7255 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7256 ;;
7257 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258
Ned Deily87adb6e2013-10-18 21:09:56 -07007259 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7260 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7261 if test "${UNIVERSALSDK}" != "/"
7262 then
7263 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7264 fi
7265 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 # Calculate an appropriate deployment target for this build:
7268 # The deployment target value is used explicitly to enable certain
7269 # features are enabled (such as builtin libedit support for readline)
7270 # through the use of Apple's Availabiliy Macros and is used as a
7271 # component of the string returned by distutils.get_platform().
7272 #
7273 # Use the value from:
7274 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7275 # 2. the operating system version of the build machine if >= 10.6
7276 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7277 # below to pick either 10.3, 10.4, or 10.5 as the target.
7278 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007279
Ned Deily87adb6e2013-10-18 21:09:56 -07007280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7281$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007282 cur_target_major=`sw_vers -productVersion | \
7283 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7284 cur_target_minor=`sw_vers -productVersion | \
7285 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7286 cur_target="${cur_target_major}.${cur_target_minor}"
7287 if test ${cur_target_major} -eq 10 && \
7288 test ${cur_target_minor} -ge 3 && \
7289 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007290 then
Ned Deily36820b62014-06-25 13:44:22 -07007291 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007292 cur_target=10.3
7293 if test ${enable_universalsdk}
7294 then
7295 case "$UNIVERSAL_ARCHS" in
7296 all|3-way|intel|64-bit)
7297 # These configurations were first supported in 10.5
7298 cur_target='10.5'
7299 ;;
7300 esac
7301 else
7302 if test `/usr/bin/arch` = "i386"
7303 then
7304 # 10.4 was the first release to support Intel archs
7305 cur_target="10.4"
7306 fi
7307 fi
7308 fi
7309 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007310
Ned Deily87adb6e2013-10-18 21:09:56 -07007311 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7312 # environment with a value that is the same as what we'll use
7313 # in the Makefile to ensure that we'll get the same compiler
7314 # environment during configure and build time.
7315 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7316 export MACOSX_DEPLOYMENT_TARGET
7317 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7319$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007320
Ned Deily87adb6e2013-10-18 21:09:56 -07007321 # end of Darwin* tests
7322 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007323 esac
7324 ;;
7325
7326*)
7327 case $ac_sys_system in
7328 OpenUNIX*|UnixWare*)
7329 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7330 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007331 SCO_SV*)
7332 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7333 ;;
7334 esac
7335 ;;
7336esac
7337
Zachary Ware5af85642015-12-21 12:09:17 -06007338# ICC needs -fp-model strict or floats behave badly
7339case "$CC" in
7340*icc*)
7341 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7342 ;;
7343esac
7344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345if test "$Py_DEBUG" = 'true'; then
7346 :
7347else
7348 OPT="-DNDEBUG $OPT"
7349fi
7350
7351if test "$ac_arch_flags"
7352then
7353 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7354fi
7355
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007356# On some compilers, pthreads are available without further options
7357# (e.g. MacOS X). On some of these systems, the compiler will not
7358# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7359# So we have to see first whether pthreads are available without
7360# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7362$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007363if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365else
Matthias Kloseb9621712010-04-24 17:59:49 +00007366 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367 ac_cv_pthread_is_default=no
7368else
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370/* end confdefs.h. */
7371
Stefan Krah7dba5942012-11-22 22:49:11 +01007372#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373#include <pthread.h>
7374
7375void* routine(void* p){return NULL;}
7376
7377int main(){
7378 pthread_t p;
7379 if(pthread_create(&p,NULL,routine,NULL)!=0)
7380 return 1;
7381 (void)pthread_detach(p);
7382 return 0;
7383}
7384
7385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007386if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387
7388 ac_cv_pthread_is_default=yes
7389 ac_cv_kthread=no
7390 ac_cv_pthread=no
7391
7392else
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7396 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397fi
7398
7399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400fi
7401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7403$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404
7405
7406if test $ac_cv_pthread_is_default = yes
7407then
7408 ac_cv_kpthread=no
7409else
7410# -Kpthread, if available, provides the right #defines
7411# and linker options to make pthread_create available
7412# Some compilers won't report that they do not support -Kpthread,
7413# so we need to run a program to see whether it really made the
7414# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7416$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007417if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007418 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419else
7420 ac_save_cc="$CC"
7421CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007422if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423 ac_cv_kpthread=no
7424else
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426/* end confdefs.h. */
7427
Stefan Krah7dba5942012-11-22 22:49:11 +01007428#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429#include <pthread.h>
7430
7431void* routine(void* p){return NULL;}
7432
7433int main(){
7434 pthread_t p;
7435 if(pthread_create(&p,NULL,routine,NULL)!=0)
7436 return 1;
7437 (void)pthread_detach(p);
7438 return 0;
7439}
7440
7441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007442if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443 ac_cv_kpthread=yes
7444else
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449fi
7450
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451CC="$ac_save_cc"
7452fi
7453
Matthias Kloseb9621712010-04-24 17:59:49 +00007454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7455$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456fi
7457
7458if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7459then
7460# -Kthread, if available, provides the right #defines
7461# and linker options to make pthread_create available
7462# Some compilers won't report that they do not support -Kthread,
7463# so we need to run a program to see whether it really made the
7464# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7466$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007467if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469else
7470 ac_save_cc="$CC"
7471CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007472if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473 ac_cv_kthread=no
7474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476/* end confdefs.h. */
7477
Stefan Krah7dba5942012-11-22 22:49:11 +01007478#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479#include <pthread.h>
7480
7481void* routine(void* p){return NULL;}
7482
7483int main(){
7484 pthread_t p;
7485 if(pthread_create(&p,NULL,routine,NULL)!=0)
7486 return 1;
7487 (void)pthread_detach(p);
7488 return 0;
7489}
7490
7491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007492if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493 ac_cv_kthread=yes
7494else
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7498 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499fi
7500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501CC="$ac_save_cc"
7502fi
7503
Matthias Kloseb9621712010-04-24 17:59:49 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7505$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506fi
7507
7508if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7509then
7510# -pthread, if available, provides the right #defines
7511# and linker options to make pthread_create available
7512# Some compilers won't report that they do not support -pthread,
7513# so we need to run a program to see whether it really made the
7514# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7516$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007517if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007518 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519else
7520 ac_save_cc="$CC"
7521CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007522if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523 ac_cv_pthread=no
7524else
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526/* end confdefs.h. */
7527
Stefan Krah7dba5942012-11-22 22:49:11 +01007528#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529#include <pthread.h>
7530
7531void* routine(void* p){return NULL;}
7532
7533int main(){
7534 pthread_t p;
7535 if(pthread_create(&p,NULL,routine,NULL)!=0)
7536 return 1;
7537 (void)pthread_detach(p);
7538 return 0;
7539}
7540
7541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007542if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543 ac_cv_pthread=yes
7544else
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549fi
7550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551CC="$ac_save_cc"
7552fi
7553
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7555$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556fi
7557
7558# If we have set a CC compiler flag for thread support then
7559# check if it works for CXX, too.
7560ac_cv_cxx_thread=no
7561if test ! -z "$CXX"
7562then
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7564$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565ac_save_cxx="$CXX"
7566
7567if test "$ac_cv_kpthread" = "yes"
7568then
7569 CXX="$CXX -Kpthread"
7570 ac_cv_cxx_thread=yes
7571elif test "$ac_cv_kthread" = "yes"
7572then
7573 CXX="$CXX -Kthread"
7574 ac_cv_cxx_thread=yes
7575elif test "$ac_cv_pthread" = "yes"
7576then
7577 CXX="$CXX -pthread"
7578 ac_cv_cxx_thread=yes
7579fi
7580
7581if test $ac_cv_cxx_thread = yes
7582then
7583 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7584 $CXX -c conftest.$ac_ext 2>&5
7585 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7586 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7587 then
7588 ac_cv_cxx_thread=yes
7589 else
7590 ac_cv_cxx_thread=no
7591 fi
7592 rm -fr conftest*
7593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7595$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596fi
7597CXX="$ac_save_cxx"
7598
7599
7600# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7602$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007603if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605else
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607/* end confdefs.h. */
7608#include <stdlib.h>
7609#include <stdarg.h>
7610#include <string.h>
7611#include <float.h>
7612
7613int
7614main ()
7615{
7616
7617 ;
7618 return 0;
7619}
7620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007621if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622 ac_cv_header_stdc=yes
7623else
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7627
7628if test $ac_cv_header_stdc = yes; then
7629 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631/* end confdefs.h. */
7632#include <string.h>
7633
7634_ACEOF
7635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 $EGREP "memchr" >/dev/null 2>&1; then :
7637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638else
7639 ac_cv_header_stdc=no
7640fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007641rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642
7643fi
7644
7645if test $ac_cv_header_stdc = yes; then
7646 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648/* end confdefs.h. */
7649#include <stdlib.h>
7650
7651_ACEOF
7652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 $EGREP "free" >/dev/null 2>&1; then :
7654
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655else
7656 ac_cv_header_stdc=no
7657fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007658rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659
7660fi
7661
7662if test $ac_cv_header_stdc = yes; then
7663 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665 :
7666else
Matthias Kloseb9621712010-04-24 17:59:49 +00007667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668/* end confdefs.h. */
7669#include <ctype.h>
7670#include <stdlib.h>
7671#if ((' ' & 0x0FF) == 0x020)
7672# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7673# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7674#else
7675# define ISLOWER(c) \
7676 (('a' <= (c) && (c) <= 'i') \
7677 || ('j' <= (c) && (c) <= 'r') \
7678 || ('s' <= (c) && (c) <= 'z'))
7679# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7680#endif
7681
7682#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7683int
7684main ()
7685{
7686 int i;
7687 for (i = 0; i < 256; i++)
7688 if (XOR (islower (i), ISLOWER (i))
7689 || toupper (i) != TOUPPER (i))
7690 return 2;
7691 return 0;
7692}
7693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007694if ac_fn_c_try_run "$LINENO"; then :
7695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696else
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701fi
7702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703fi
7704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7706$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707if test $ac_cv_header_stdc = yes; then
7708
Matthias Kloseb9621712010-04-24 17:59:49 +00007709$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710
7711fi
7712
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007713for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007714fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007715ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007716sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007717unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007718poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007719sys/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 +01007720sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007721sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007722sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007723sys/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 -07007724libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007725bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007726sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007727do :
7728 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7729ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007730if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007732#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007733_ACEOF
7734
7735fi
7736
Guido van Rossum627b2d71993-12-24 10:39:16 +00007737done
7738
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007739ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007740for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7743$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007744if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007748/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007749#include <sys/types.h>
7750#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007751
Martin v. Löwis11437992002-04-12 09:54:03 +00007752int
7753main ()
7754{
7755if ((DIR *) 0)
7756return 0;
7757 ;
7758 return 0;
7759}
7760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768eval ac_res=\$$as_ac_Header
7769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7770$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007771if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007773#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007774_ACEOF
7775
7776ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007779done
7780# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7781if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7783$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007784if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007786else
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791/* Override any GCC internal prototype to avoid an error.
7792 Use char because int might match the return type of a GCC
7793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007794#ifdef __cplusplus
7795extern "C"
7796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007797char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007798int
7799main ()
7800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 ;
7803 return 0;
7804}
7805_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806for ac_lib in '' dir; do
7807 if test -z "$ac_lib"; then
7808 ac_res="none required"
7809 else
7810 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007811 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816rm -f core conftest.err conftest.$ac_objext \
7817 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007818 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821done
Victor Stinnere0be4232011-10-25 13:06:09 +02007822if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824else
7825 ac_cv_search_opendir=no
7826fi
7827rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007828LIBS=$ac_func_search_save_LIBS
7829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7831$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007833if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007836fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007837
Michael W. Hudson54241132001-12-07 15:38:26 +00007838else
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7840$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007841if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007843else
7844 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848/* Override any GCC internal prototype to avoid an error.
7849 Use char because int might match the return type of a GCC
7850 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007851#ifdef __cplusplus
7852extern "C"
7853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007854char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007855int
7856main ()
7857{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 ;
7860 return 0;
7861}
7862_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863for ac_lib in '' x; do
7864 if test -z "$ac_lib"; then
7865 ac_res="none required"
7866 else
7867 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007868 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007873rm -f core conftest.err conftest.$ac_objext \
7874 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007875 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878done
Victor Stinnere0be4232011-10-25 13:06:09 +02007879if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881else
7882 ac_cv_search_opendir=no
7883fi
7884rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007885LIBS=$ac_func_search_save_LIBS
7886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7888$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007890if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007892
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007893fi
7894
7895fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7898$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007899if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007901else
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007903/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007904#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007905int
7906main ()
7907{
7908return makedev(0, 0);
7909 ;
7910 return 0;
7911}
7912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007914 ac_cv_header_sys_types_h_makedev=yes
7915else
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007918rm -f core conftest.err conftest.$ac_objext \
7919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007920
7921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7923$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007924
7925if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007926ac_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 +02007927if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007928
Matthias Kloseb9621712010-04-24 17:59:49 +00007929$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007930
7931fi
7932
7933
7934
7935 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 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 +02007937if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007938
Matthias Kloseb9621712010-04-24 17:59:49 +00007939$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007940
7941fi
7942
7943
7944 fi
7945fi
7946
Michael W. Hudson54241132001-12-07 15:38:26 +00007947
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007948# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7949for ac_header in net/if.h
7950do :
7951 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7952#ifdef STDC_HEADERS
7953# include <stdlib.h>
7954# include <stddef.h>
7955#else
7956# ifdef HAVE_STDLIB_H
7957# include <stdlib.h>
7958# endif
7959#endif
7960#ifdef HAVE_SYS_SOCKET_H
7961# include <sys/socket.h>
7962#endif
7963
7964"
Victor Stinnere0be4232011-10-25 13:06:09 +02007965if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007966 cat >>confdefs.h <<_ACEOF
7967#define HAVE_NET_IF_H 1
7968_ACEOF
7969
7970fi
7971
7972done
7973
7974
Martin v. Löwis11017b12006-01-14 18:12:57 +00007975# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007976for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007977do :
7978 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 +00007979#ifdef HAVE_ASM_TYPES_H
7980#include <asm/types.h>
7981#endif
7982#ifdef HAVE_SYS_SOCKET_H
7983#include <sys/socket.h>
7984#endif
7985
Matthias Kloseb9621712010-04-24 17:59:49 +00007986"
Victor Stinnere0be4232011-10-25 13:06:09 +02007987if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007988 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007990_ACEOF
7991
7992fi
7993
7994done
7995
7996
Charles-François Natali47413c12011-10-06 19:47:44 +02007997# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007998for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007999do :
8000 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8001ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8002#ifdef HAVE_SYS_SOCKET_H
8003#include <sys/socket.h>
8004#endif
8005
8006"
8007if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8008 cat >>confdefs.h <<_ACEOF
8009#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8010_ACEOF
8011
8012fi
8013
8014done
8015
8016
Guido van Rossum627b2d71993-12-24 10:39:16 +00008017# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008018was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8020$as_echo_n "checking for clock_t in time.h... " >&6; }
8021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008022/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
8025_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008028 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008029else
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
8031
Matthias Kloseb9621712010-04-24 17:59:49 +00008032$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008033
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008034
Guido van Rossum627b2d71993-12-24 10:39:16 +00008035fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008036rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8039$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008040
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8042$as_echo_n "checking for makedev... " >&6; }
8043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008044/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008045
Jesus Cea740f53a2010-04-28 11:35:30 +00008046#if defined(MAJOR_IN_MKDEV)
8047#include <sys/mkdev.h>
8048#elif defined(MAJOR_IN_SYSMACROS)
8049#include <sys/sysmacros.h>
8050#else
8051#include <sys/types.h>
8052#endif
8053
Neal Norwitz11690112002-07-30 01:08:28 +00008054int
8055main ()
8056{
Jesus Cea740f53a2010-04-28 11:35:30 +00008057
8058 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008059 ;
8060 return 0;
8061}
Matthias Kloseb159a552010-04-25 21:00:44 +00008062
Neal Norwitz11690112002-07-30 01:08:28 +00008063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008064if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008065 ac_cv_has_makedev=yes
8066else
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008069rm -f core conftest.err conftest.$ac_objext \
8070 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8072$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008073if test "$ac_cv_has_makedev" = "yes"; then
8074
Matthias Kloseb9621712010-04-24 17:59:49 +00008075$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008076
8077fi
8078
Christian Heimes985ecdc2013-11-20 11:46:18 +01008079# byte swapping
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8081$as_echo_n "checking for le64toh... " >&6; }
8082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8083/* end confdefs.h. */
8084
8085#ifdef HAVE_ENDIAN_H
8086#include <endian.h>
8087#elif defined(HAVE_SYS_ENDIAN_H)
8088#include <sys/endian.h>
8089#endif
8090
8091int
8092main ()
8093{
8094
8095 le64toh(1)
8096 ;
8097 return 0;
8098}
8099
8100_ACEOF
8101if ac_fn_c_try_link "$LINENO"; then :
8102 ac_cv_has_le64toh=yes
8103else
8104 ac_cv_has_le64toh=no
8105fi
8106rm -f core conftest.err conftest.$ac_objext \
8107 conftest$ac_exeext conftest.$ac_ext
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8109$as_echo "$ac_cv_has_le64toh" >&6; }
8110if test "$ac_cv_has_le64toh" = "yes"; then
8111
8112$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8113
8114fi
8115
Martin v. Löwis399a6892002-10-04 10:22:02 +00008116# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8117# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8118# defined, but the compiler does not support pragma redefine_extname,
8119# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8120# structures (such as rlimit64) without declaring them. As a
8121# work-around, disable LFS on such configurations
8122
8123use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8125$as_echo_n "checking Solaris LFS bug... " >&6; }
8126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008127/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008128
8129#define _LARGEFILE_SOURCE 1
8130#define _FILE_OFFSET_BITS 64
8131#include <sys/resource.h>
8132
Martin v. Löwis399a6892002-10-04 10:22:02 +00008133int
8134main ()
8135{
8136struct rlimit foo;
8137 ;
8138 return 0;
8139}
8140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008142 sol_lfs_bug=no
8143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8148$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008149if test "$sol_lfs_bug" = "yes"; then
8150 use_lfs=no
8151fi
8152
8153if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008154# Two defines needed to enable largefile support on various platforms
8155# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008156case $ac_sys_system/$ac_sys_release in
8157AIX*)
8158
8159$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8160
8161 ;;
8162esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008165
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008168
Martin v. Löwis399a6892002-10-04 10:22:02 +00008169fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008170
Guido van Rossum84e7b241996-08-19 21:59:00 +00008171# Add some code to confdefs.h so that the test for off_t works on SCO
8172cat >> confdefs.h <<\EOF
8173#if defined(SCO_DS)
8174#undef _OFF_T
8175#endif
8176EOF
8177
Guido van Rossumef2255b2000-03-10 22:30:29 +00008178# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008179ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008180if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008182else
Martin v. Löwis11437992002-04-12 09:54:03 +00008183
8184cat >>confdefs.h <<_ACEOF
8185#define mode_t int
8186_ACEOF
8187
8188fi
8189
Matthias Kloseb9621712010-04-24 17:59:49 +00008190ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008191if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008192
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008193else
Martin v. Löwis11437992002-04-12 09:54:03 +00008194
8195cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008197_ACEOF
8198
8199fi
8200
Matthias Kloseb9621712010-04-24 17:59:49 +00008201ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008202if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008203
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008204else
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
8206cat >>confdefs.h <<_ACEOF
8207#define pid_t int
8208_ACEOF
8209
8210fi
8211
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008212
Martin v. Löwis11437992002-04-12 09:54:03 +00008213cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008214#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008215_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008216
Matthias Kloseb9621712010-04-24 17:59:49 +00008217ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008218if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008220else
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008224_ACEOF
8225
8226fi
8227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8229$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008230if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008232else
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008234/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008235#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008236
8237_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008240 ac_cv_type_uid_t=yes
8241else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008242 ac_cv_type_uid_t=no
8243fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008244rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008245
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8248$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008249if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008250
Matthias Kloseb9621712010-04-24 17:59:49 +00008251$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008252
8253
Matthias Kloseb9621712010-04-24 17:59:49 +00008254$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008255
8256fi
8257
Mark Dickinson983bc162012-12-02 12:11:38 +00008258
8259# There are two separate checks for each of the exact-width integer types we
8260# need. First we check whether the type is available using the usual
8261# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8262# and <stdint.h> where available). We then also use the special type checks of
8263# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8264# directly, #define's uint32_t to be a suitable type.
8265
8266ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8267if test "x$ac_cv_type_uint32_t" = xyes; then :
8268
8269$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8270
8271fi
8272
Matthias Kloseb9621712010-04-24 17:59:49 +00008273ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8274case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008275 no|yes) ;; #(
8276 *)
8277
Matthias Kloseb9621712010-04-24 17:59:49 +00008278$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008279
8280
8281cat >>confdefs.h <<_ACEOF
8282#define uint32_t $ac_cv_c_uint32_t
8283_ACEOF
8284;;
8285 esac
8286
Mark Dickinson983bc162012-12-02 12:11:38 +00008287
8288ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8289if test "x$ac_cv_type_uint64_t" = xyes; then :
8290
8291$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8292
8293fi
8294
Matthias Kloseb9621712010-04-24 17:59:49 +00008295ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8296case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008297 no|yes) ;; #(
8298 *)
8299
Matthias Kloseb9621712010-04-24 17:59:49 +00008300$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008301
8302
8303cat >>confdefs.h <<_ACEOF
8304#define uint64_t $ac_cv_c_uint64_t
8305_ACEOF
8306;;
8307 esac
8308
Mark Dickinson983bc162012-12-02 12:11:38 +00008309
8310ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8311if test "x$ac_cv_type_int32_t" = xyes; then :
8312
8313$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8314
8315fi
8316
Matthias Kloseb9621712010-04-24 17:59:49 +00008317ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8318case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008319 no|yes) ;; #(
8320 *)
8321
8322cat >>confdefs.h <<_ACEOF
8323#define int32_t $ac_cv_c_int32_t
8324_ACEOF
8325;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008326esac
8327
Mark Dickinson983bc162012-12-02 12:11:38 +00008328
8329ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8330if test "x$ac_cv_type_int64_t" = xyes; then :
8331
8332$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8333
8334fi
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8337case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008338 no|yes) ;; #(
8339 *)
8340
8341cat >>confdefs.h <<_ACEOF
8342#define int64_t $ac_cv_c_int64_t
8343_ACEOF
8344;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008345esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008346
Mark Dickinson983bc162012-12-02 12:11:38 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008349if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008352
8353fi
8354
Stefan Krah1919b7e2012-03-21 18:25:23 +01008355ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8356if test "x$ac_cv_type___uint128_t" = xyes; then :
8357
8358$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8359
8360fi
8361
Jack Jansendd19cf82001-12-06 22:36:17 +00008362
Michael W. Hudson54241132001-12-07 15:38:26 +00008363# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008364# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365# The cast to long int works around a bug in the HP C Compiler
8366# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8367# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8368# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8370$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008371if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 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 +00008375
Martin v. Löwis11437992002-04-12 09:54:03 +00008376else
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 if test "$ac_cv_type_int" = yes; then
8378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008380as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008381See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382 else
8383 ac_cv_sizeof_int=0
8384 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008385fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008386
Martin v. Löwis11437992002-04-12 09:54:03 +00008387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8389$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390
8391
8392
Martin v. Löwis11437992002-04-12 09:54:03 +00008393cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008394#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008395_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008396
8397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398# The cast to long int works around a bug in the HP C Compiler
8399# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8400# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8401# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8403$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008404if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008406else
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 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 +00008408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409else
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 if test "$ac_cv_type_long" = yes; then
8411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008413as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008414See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415 else
8416 ac_cv_sizeof_long=0
8417 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008419
Martin v. Löwis11437992002-04-12 09:54:03 +00008420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8422$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423
8424
8425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008427#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008428_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008429
8430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431# The cast to long int works around a bug in the HP C Compiler
8432# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8433# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8434# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8436$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008437if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008439else
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 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 +00008441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442else
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 if test "$ac_cv_type_void_p" = yes; then
8444 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8445$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008446as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008447See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448 else
8449 ac_cv_sizeof_void_p=0
8450 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008452
Martin v. Löwis11437992002-04-12 09:54:03 +00008453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8455$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456
8457
8458
Martin v. Löwis11437992002-04-12 09:54:03 +00008459cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008460#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008461_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008462
8463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464# The cast to long int works around a bug in the HP C Compiler
8465# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8466# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8467# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8469$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008470if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 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 +00008474
Martin v. Löwis11437992002-04-12 09:54:03 +00008475else
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 if test "$ac_cv_type_short" = yes; then
8477 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8478$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008479as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008480See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481 else
8482 ac_cv_sizeof_short=0
8483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008485
Martin v. Löwis11437992002-04-12 09:54:03 +00008486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8488$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489
8490
8491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008493#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008494_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008495
8496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497# The cast to long int works around a bug in the HP C Compiler
8498# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8499# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8500# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8502$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008503if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 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 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508else
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 if test "$ac_cv_type_float" = yes; then
8510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008512as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008513See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514 else
8515 ac_cv_sizeof_float=0
8516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8521$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522
8523
8524
Martin v. Löwis11437992002-04-12 09:54:03 +00008525cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008526#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008527_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008528
8529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530# The cast to long int works around a bug in the HP C Compiler
8531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8533# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8535$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008536if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008538else
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 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 +00008540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541else
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 if test "$ac_cv_type_double" = yes; then
8543 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008545as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008546See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547 else
8548 ac_cv_sizeof_double=0
8549 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008551
Martin v. Löwis11437992002-04-12 09:54:03 +00008552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8554$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555
8556
8557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008559#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008560_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008561
8562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563# The cast to long int works around a bug in the HP C Compiler
8564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8566# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8568$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008569if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008571else
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 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 +00008573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 if test "$ac_cv_type_fpos_t" = yes; then
8576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008578as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008579See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580 else
8581 ac_cv_sizeof_fpos_t=0
8582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8587$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588
8589
8590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008592#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008593_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008594
Michael W. Hudson54241132001-12-07 15:38:26 +00008595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596# The cast to long int works around a bug in the HP C Compiler
8597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8601$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008602if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 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 +00008606
Martin v. Löwis18e16552006-02-15 17:27:45 +00008607else
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 if test "$ac_cv_type_size_t" = yes; then
8609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008611as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008612See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613 else
8614 ac_cv_sizeof_size_t=0
8615 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617
Martin v. Löwis18e16552006-02-15 17:27:45 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8620$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621
8622
8623
Martin v. Löwis18e16552006-02-15 17:27:45 +00008624cat >>confdefs.h <<_ACEOF
8625#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8626_ACEOF
8627
8628
Christian Heimes400adb02008-02-01 08:12:03 +00008629# The cast to long int works around a bug in the HP C Compiler
8630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8632# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8634$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008635if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008637else
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 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 +00008639
Christian Heimes400adb02008-02-01 08:12:03 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 if test "$ac_cv_type_pid_t" = yes; then
8642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008644as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008645See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008646 else
8647 ac_cv_sizeof_pid_t=0
8648 fi
8649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650
Christian Heimes400adb02008-02-01 08:12:03 +00008651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8653$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008654
8655
8656
8657cat >>confdefs.h <<_ACEOF
8658#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8659_ACEOF
8660
8661
Michael W. Hudson54241132001-12-07 15:38:26 +00008662
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8664$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008665have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008667/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008668
Martin v. Löwis11437992002-04-12 09:54:03 +00008669int
8670main ()
8671{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008672long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 ;
8674 return 0;
8675}
8676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008678
8679
Matthias Kloseb9621712010-04-24 17:59:49 +00008680$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008681
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008682 have_long_long=yes
8683
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8687$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008688if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689# The cast to long int works around a bug in the HP C Compiler
8690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8692# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8694$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008695if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 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 +00008699
Martin v. Löwis11437992002-04-12 09:54:03 +00008700else
Matthias Kloseb9621712010-04-24 17:59:49 +00008701 if test "$ac_cv_type_long_long" = yes; then
8702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008704as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008705See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706 else
8707 ac_cv_sizeof_long_long=0
8708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008710
Martin v. Löwis11437992002-04-12 09:54:03 +00008711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8713$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714
8715
8716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008718#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008719_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008720
Michael W. Hudson54241132001-12-07 15:38:26 +00008721
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008722fi
8723
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8725$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008726have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008728/* end confdefs.h. */
8729
8730int
8731main ()
8732{
8733long double x; x = (long double)0;
8734 ;
8735 return 0;
8736}
8737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008738if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008739
8740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008742
8743 have_long_double=yes
8744
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008745fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8748$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008749if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008750# The cast to long int works around a bug in the HP C Compiler
8751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8753# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8755$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008756if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 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 +00008760
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 if test "$ac_cv_type_long_double" = yes; then
8763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008765as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008766See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008767 else
8768 ac_cv_sizeof_long_double=0
8769 fi
8770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8774$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008775
8776
8777
8778cat >>confdefs.h <<_ACEOF
8779#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8780_ACEOF
8781
8782
8783fi
8784
8785
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8787$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008788have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008790/* end confdefs.h. */
8791
8792int
8793main ()
8794{
8795_Bool x; x = (_Bool)0;
8796 ;
8797 return 0;
8798}
8799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008800if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008801
8802
Matthias Kloseb9621712010-04-24 17:59:49 +00008803$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008804
8805 have_c99_bool=yes
8806
Thomas Woutersb2137042007-02-01 18:02:27 +00008807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8810$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008811if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812# The cast to long int works around a bug in the HP C Compiler
8813# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8814# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8815# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8817$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008818if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008820else
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 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 +00008822
Thomas Woutersb2137042007-02-01 18:02:27 +00008823else
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 if test "$ac_cv_type__Bool" = yes; then
8825 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8826$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008827as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008828See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829 else
8830 ac_cv_sizeof__Bool=0
8831 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008833
Thomas Woutersb2137042007-02-01 18:02:27 +00008834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8836$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837
8838
8839
Thomas Woutersb2137042007-02-01 18:02:27 +00008840cat >>confdefs.h <<_ACEOF
8841#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8842_ACEOF
8843
8844
8845fi
8846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008848 #include <stdint.h>
8849 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008850 #ifdef HAVE_INTTYPES_H
8851 #include <inttypes.h>
8852 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008853"
Victor Stinnere0be4232011-10-25 13:06:09 +02008854if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008855
8856cat >>confdefs.h <<_ACEOF
8857#define HAVE_UINTPTR_T 1
8858_ACEOF
8859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860# The cast to long int works around a bug in the HP C Compiler
8861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8863# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8865$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008866if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008868else
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 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 +00008870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 if test "$ac_cv_type_uintptr_t" = yes; then
8873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008875as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008876See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877 else
8878 ac_cv_sizeof_uintptr_t=0
8879 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881
Martin v. Löwis11437992002-04-12 09:54:03 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8884$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885
8886
8887
Martin v. Löwis11437992002-04-12 09:54:03 +00008888cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008889#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008890_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008891
Michael W. Hudson54241132001-12-07 15:38:26 +00008892
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008893fi
8894
Thomas Wouters89f507f2006-12-13 04:49:30 +00008895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008896# The cast to long int works around a bug in the HP C Compiler
8897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8901$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008902if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904else
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008906#ifdef HAVE_SYS_TYPES_H
8907#include <sys/types.h>
8908#endif
8909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008912else
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 if test "$ac_cv_type_off_t" = yes; then
8914 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008916as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008917See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008918 else
8919 ac_cv_sizeof_off_t=0
8920 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8925$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008926
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008927
8928
Martin v. Löwis11437992002-04-12 09:54:03 +00008929cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008930#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008931_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008932
Michael W. Hudson54241132001-12-07 15:38:26 +00008933
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008934
Matthias Kloseb9621712010-04-24 17:59:49 +00008935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8936$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008937if test "$have_long_long" = yes
8938then
8939if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008940 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008941
Matthias Kloseb9621712010-04-24 17:59:49 +00008942$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008943
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8945$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008946else
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8948$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008949fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008950else
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8952$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008953fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008954
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008955# The cast to long int works around a bug in the HP C Compiler
8956# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8957# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8958# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8960$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008961if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008963else
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008965#ifdef HAVE_SYS_TYPES_H
8966#include <sys/types.h>
8967#endif
8968#ifdef HAVE_TIME_H
8969#include <time.h>
8970#endif
8971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 if test "$ac_cv_type_time_t" = yes; then
8976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008978as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008979See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980 else
8981 ac_cv_sizeof_time_t=0
8982 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008984
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8987$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008988
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008989
8990
Martin v. Löwis11437992002-04-12 09:54:03 +00008991cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008992#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008994
Michael W. Hudson54241132001-12-07 15:38:26 +00008995
8996
Trent Mick635f6fb2000-08-23 21:33:05 +00008997# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008998ac_save_cc="$CC"
8999if test "$ac_cv_kpthread" = "yes"
9000then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009001elif test "$ac_cv_kthread" = "yes"
9002then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009003elif test "$ac_cv_pthread" = "yes"
9004then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009005fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009006
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9008$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009009have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009012
9013 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009014int
9015main ()
9016{
Guido van Rossum12580492000-09-24 16:47:19 +00009017pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 ;
9019 return 0;
9020}
Matthias Kloseb159a552010-04-25 21:00:44 +00009021
Martin v. Löwis11437992002-04-12 09:54:03 +00009022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009023if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009024 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9028$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009029if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9033# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9035$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009036if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038else
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009040#ifdef HAVE_PTHREAD_H
9041#include <pthread.h>
9042#endif
9043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046else
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 if test "$ac_cv_type_pthread_t" = yes; then
9048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009050as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009051See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052 else
9053 ac_cv_sizeof_pthread_t=0
9054 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009056
Trent Mick635f6fb2000-08-23 21:33:05 +00009057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9059$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009061
9062
Martin v. Löwis11437992002-04-12 09:54:03 +00009063cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009064#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009065_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009066
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009067
Trent Mick635f6fb2000-08-23 21:33:05 +00009068fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009069CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009070
Michael W. Hudson54241132001-12-07 15:38:26 +00009071
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009072case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009073 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009074 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9075 ;;
9076 Darwin/*)
9077 OTHER_LIBTOOL_OPT=""
9078 ;;
9079esac
9080
9081
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009082
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009083case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009084 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009085 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9086 if test "${enable_universalsdk}"; then
9087 :
9088 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009089 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009090 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009091 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009092 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009093 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009094 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009095 if test ${gcc_version} '<' 4.0
9096 then
9097 LIBTOOL_CRUFT="-lcc_dynamic"
9098 else
9099 LIBTOOL_CRUFT=""
9100 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009102 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009103else
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009105/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009106
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009107 #include <unistd.h>
9108 int main(int argc, char*argv[])
9109 {
9110 if (sizeof(long) == 4) {
9111 return 0;
9112 } else {
9113 return 1;
9114 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009115 }
9116
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009118if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009119 ac_osx_32bit=yes
9120else
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9124 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009125fi
9126
9127
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009128 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009129 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009130 i386)
9131 MACOSX_DEFAULT_ARCH="i386"
9132 ;;
9133 ppc)
9134 MACOSX_DEFAULT_ARCH="ppc"
9135 ;;
9136 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009137 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009138 ;;
9139 esac
9140 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009141 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009142 i386)
9143 MACOSX_DEFAULT_ARCH="x86_64"
9144 ;;
9145 ppc)
9146 MACOSX_DEFAULT_ARCH="ppc64"
9147 ;;
9148 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009149 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009150 ;;
9151 esac
9152
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009153 fi
9154
9155 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009156 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009157 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009158esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9160$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009161if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009162then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009163 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009165 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009166
Matthias Kloseb9621712010-04-24 17:59:49 +00009167$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009168
Matthias Kloseb9621712010-04-24 17:59:49 +00009169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9170$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009171 if test $enable_shared = "yes"
9172 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009173 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 +00009174 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009175else
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009178fi
9179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9181$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009182case $ac_sys_system/$ac_sys_release in
9183 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009184
Matthias Kloseb9621712010-04-24 17:59:49 +00009185$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009186
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9188$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009189 ;;
9190 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009193 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009194esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009195
Guido van Rossum0a516c91994-09-12 10:58:40 +00009196# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009197
Michael W. Hudson54241132001-12-07 15:38:26 +00009198
9199
9200
9201
Benjamin Peterson99f03762010-04-11 22:15:28 +00009202
Thomas Wouters477c8d52006-05-27 19:21:47 +00009203
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009204# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9205# -- usually .so, .sl on HP-UX, .dll on Cygwin
9206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9207$as_echo_n "checking the extension of shared libraries... " >&6; }
9208if test -z "$SHLIB_SUFFIX"; then
9209 case $ac_sys_system in
9210 hp*|HP*)
9211 case `uname -m` in
9212 ia64) SHLIB_SUFFIX=.so;;
9213 *) SHLIB_SUFFIX=.sl;;
9214 esac
9215 ;;
9216 CYGWIN*) SHLIB_SUFFIX=.dll;;
9217 *) SHLIB_SUFFIX=.so;;
9218 esac
9219fi
9220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9221$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009222
Guido van Rossum0a516c91994-09-12 10:58:40 +00009223# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009224# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009225# (Shared libraries in this instance are shared modules to be loaded into
9226# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9228$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229if test -z "$LDSHARED"
9230then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009231 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009232 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009233 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009234 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009235 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009236 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009237 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009239 if test "$GCC" = "yes" ; then
9240 LDSHARED='$(CC) -shared'
9241 LDCXXSHARED='$(CXX) -shared'
9242 else
9243 LDSHARED='$(CC) -G'
9244 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009245 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009246 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009247 if test "$GCC" = "yes" ; then
9248 LDSHARED='$(CC) -shared'
9249 LDCXXSHARED='$(CXX) -shared'
9250 else
9251 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009252 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009253 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009254 LDSHARED='$(CC) -bundle'
9255 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009256 if test "$enable_framework" ; then
9257 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009258 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9259 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009260 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009261 else
9262 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009263 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009264 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009265 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009266 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009267 LDSHARED='$(CC) -bundle'
9268 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009269 if test "$enable_framework" ; then
9270 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009271 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9272 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009273 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009274 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009275 # No framework, use the Python app as bundle-loader
9276 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009277 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009278 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009279 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009280 Darwin/*)
9281 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9282 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009283
Ned Deily36820b62014-06-25 13:44:22 -07009284 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9285 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9286 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9287 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9288 if test ${dep_target_major} -eq 10 && \
9289 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009290 then
Ned Deily36820b62014-06-25 13:44:22 -07009291 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009292 LDSHARED='$(CC) -bundle'
9293 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009294 if test "$enable_framework" ; then
9295 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009296 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9297 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009298 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009299 else
9300 # No framework, use the Python app as bundle-loader
9301 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9302 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009303 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009304 fi
Ned Deily36820b62014-06-25 13:44:22 -07009305 else
9306 # building for OS X 10.3 and later
9307 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9308 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9309 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009310 fi
9311 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009312 Linux*|GNU*|QNX*)
9313 LDSHARED='$(CC) -shared'
9314 LDCXXSHARED='$(CXX) -shared';;
9315 BSD/OS*/4*)
9316 LDSHARED="gcc -shared"
9317 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009318 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009319 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009320 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009321 LDSHARED='$(CC) -shared'
9322 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009323 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009324 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009325 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009326 OpenBSD*)
9327 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9328 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009329 LDSHARED='$(CC) -shared $(CCSHARED)'
9330 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009331 else
9332 case `uname -r` in
9333 [01].* | 2.[0-7] | 2.[0-7].*)
9334 LDSHARED="ld -Bshareable ${LDFLAGS}"
9335 ;;
9336 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009337 LDSHARED='$(CC) -shared $(CCSHARED)'
9338 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009339 ;;
9340 esac
9341 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009342 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009343 LDSHARED='$(CC) -shared'
9344 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009345 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009346 if test "$GCC" = "yes" ; then
9347 LDSHARED='$(CC) -shared'
9348 LDCXXSHARED='$(CXX) -shared'
9349 else
9350 LDSHARED='$(CC) -G'
9351 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009352 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009353 SCO_SV*)
9354 LDSHARED='$(CC) -Wl,-G,-Bexport'
9355 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9356 CYGWIN*)
9357 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9358 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009359 *) LDSHARED="ld";;
9360 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9363$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009364LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009365BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009366# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009367# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9369$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009370if test -z "$CCSHARED"
9371then
Guido van Rossum07397971997-04-29 21:49:50 +00009372 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009373 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009374 then CCSHARED="-fPIC";
9375 elif test `uname -p` = sparc;
9376 then CCSHARED="-xcode=pic32";
9377 else CCSHARED="-Kpic";
9378 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009379 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009380 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009381 else CCSHARED="+z";
9382 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009383 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009384 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009385 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009386 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009387 if test "$GCC" = "yes"
9388 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009389 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009390 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009391 SCO_SV*)
9392 if test "$GCC" = "yes"
9393 then CCSHARED="-fPIC"
9394 else CCSHARED="-Kpic -belf"
9395 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009396 IRIX*/6*) case $CC in
9397 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009398 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009399 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9403$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009404# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009405# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9407$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009408if test -z "$LINKFORSHARED"
9409then
Guido van Rossum07397971997-04-29 21:49:50 +00009410 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009411 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009412 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009413 LINKFORSHARED="-Wl,-E -Wl,+s";;
9414# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009415 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009416 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009417 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009419 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009420
9421 # Issue #18075: the default maximum stack size (8MBytes) is too
9422 # small for the default recursion limit. Increase the stack size
9423 # to ensure that tests don't crash
9424 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9425
Jack Jansene578a632001-08-15 01:27:14 +00009426 if test "$enable_framework"
9427 then
Jack Jansenda49e192005-01-07 13:08:22 +00009428 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009429 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009430 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009431 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009432 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009433 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009434 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009435 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9436 then
9437 LINKFORSHARED="-Wl,--export-dynamic"
9438 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009439 SunOS/5*) case $CC in
9440 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009441 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009442 then
9443 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009444 fi;;
9445 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009446 CYGWIN*)
9447 if test $enable_shared = "no"
9448 then
9449 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9450 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009451 QNX*)
9452 # -Wl,-E causes the symbols to be added to the dynamic
9453 # symbol table so that they can be found when a module
9454 # is loaded. -N 2048K causes the stack size to be set
9455 # to 2048 kilobytes so that the stack doesn't overflow
9456 # when running test_compile.py.
9457 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009458 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9461$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009462
Michael W. Hudson54241132001-12-07 15:38:26 +00009463
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009464
Matthias Kloseb9621712010-04-24 17:59:49 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9466$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009467if test ! "$LIBRARY" = "$LDLIBRARY"
9468then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009469 case $ac_sys_system in
9470 CYGWIN*)
9471 # Cygwin needs CCSHARED when building extension DLLs
9472 # but not when building the interpreter DLL.
9473 CFLAGSFORSHARED='';;
9474 *)
9475 CFLAGSFORSHARED='$(CCSHARED)'
9476 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9479$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009480
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009481# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9482# library (with --enable-shared).
9483# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009484# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9485# if it is not required, since it creates a dependency of the shared library
9486# to LIBS. This, in turn, means that applications linking the shared libpython
9487# don't need to link LIBS explicitly. The default should be only changed
9488# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009489
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9491$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009492case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009493 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009494 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009495esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9497$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009498
9499
Guido van Rossum627b2d71993-12-24 10:39:16 +00009500# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9502$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009503if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009504 $as_echo_n "(cached) " >&6
9505else
9506 ac_check_lib_save_LIBS=$LIBS
9507LIBS="-lsendfile $LIBS"
9508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9509/* end confdefs.h. */
9510
9511/* Override any GCC internal prototype to avoid an error.
9512 Use char because int might match the return type of a GCC
9513 builtin and then its argument prototype would still apply. */
9514#ifdef __cplusplus
9515extern "C"
9516#endif
9517char sendfile ();
9518int
9519main ()
9520{
9521return sendfile ();
9522 ;
9523 return 0;
9524}
9525_ACEOF
9526if ac_fn_c_try_link "$LINENO"; then :
9527 ac_cv_lib_sendfile_sendfile=yes
9528else
9529 ac_cv_lib_sendfile_sendfile=no
9530fi
9531rm -f core conftest.err conftest.$ac_objext \
9532 conftest$ac_exeext conftest.$ac_ext
9533LIBS=$ac_check_lib_save_LIBS
9534fi
9535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9536$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009537if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009538 cat >>confdefs.h <<_ACEOF
9539#define HAVE_LIBSENDFILE 1
9540_ACEOF
9541
9542 LIBS="-lsendfile $LIBS"
9543
9544fi
9545
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9547$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009548if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009550else
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009552LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556/* Override any GCC internal prototype to avoid an error.
9557 Use char because int might match the return type of a GCC
9558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009559#ifdef __cplusplus
9560extern "C"
9561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009562char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009563int
9564main ()
9565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ;
9568 return 0;
9569}
9570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009573else
Matthias Kloseb9621712010-04-24 17:59:49 +00009574 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009576rm -f core conftest.err conftest.$ac_objext \
9577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009578LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9581$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009582if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 cat >>confdefs.h <<_ACEOF
9584#define HAVE_LIBDL 1
9585_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009587 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009588
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009589fi
9590 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9592$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009593if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009594 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009595else
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009597LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601/* Override any GCC internal prototype to avoid an error.
9602 Use char because int might match the return type of a GCC
9603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604#ifdef __cplusplus
9605extern "C"
9606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009607char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009608int
9609main ()
9610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 ;
9613 return 0;
9614}
9615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009618else
Matthias Kloseb9621712010-04-24 17:59:49 +00009619 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009621rm -f core conftest.err conftest.$ac_objext \
9622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009623LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9626$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009627if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 cat >>confdefs.h <<_ACEOF
9629#define HAVE_LIBDLD 1
9630_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009631
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009632 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009633
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009634fi
9635 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009636
Georg Brandlb1441c72009-01-03 22:33:39 +00009637# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009638if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9640$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009641if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009643else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009644 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648/* Override any GCC internal prototype to avoid an error.
9649 Use char because int might match the return type of a GCC
9650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651#ifdef __cplusplus
9652extern "C"
9653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009654char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009655int
9656main ()
9657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ;
9660 return 0;
9661}
9662_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663for ac_lib in '' pthread rt posix4; do
9664 if test -z "$ac_lib"; then
9665 ac_res="none required"
9666 else
9667 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009668 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009673rm -f core conftest.err conftest.$ac_objext \
9674 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009675 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678done
Victor Stinnere0be4232011-10-25 13:06:09 +02009679if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681else
9682 ac_cv_search_sem_init=no
9683fi
9684rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009685LIBS=$ac_func_search_save_LIBS
9686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9688$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009690if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009692
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009693fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009694 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009695 # posix4 on Solaris 2.6
9696 # pthread (first!) on Linux
9697fi
9698
Martin v. Löwis19d17342003-06-14 21:03:05 +00009699# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9701$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009702if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009704else
9705 ac_check_lib_save_LIBS=$LIBS
9706LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009708/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710/* Override any GCC internal prototype to avoid an error.
9711 Use char because int might match the return type of a GCC
9712 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009713#ifdef __cplusplus
9714extern "C"
9715#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009716char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009717int
9718main ()
9719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009721 ;
9722 return 0;
9723}
9724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009726 ac_cv_lib_intl_textdomain=yes
9727else
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730rm -f core conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009732LIBS=$ac_check_lib_save_LIBS
9733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9735$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009736if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009737
Matthias Kloseb9621712010-04-24 17:59:49 +00009738$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009739
Brett Cannonc6d936e2009-06-07 20:09:53 +00009740 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009741fi
9742
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009743
9744# checks for system dependent C++ extensions support
9745case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9747$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009749/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009750
Georg Brandl59e87bd2011-02-15 19:48:59 +00009751 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009752int
9753main ()
9754{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009755loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ;
9757 return 0;
9758}
Matthias Kloseb159a552010-04-25 21:00:44 +00009759
Martin v. Löwis11437992002-04-12 09:54:03 +00009760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009761if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009762
Matthias Kloseb159a552010-04-25 21:00:44 +00009763
Matthias Kloseb9621712010-04-24 17:59:49 +00009764$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009765
Matthias Kloseb159a552010-04-25 21:00:44 +00009766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009767$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009768
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009769else
Matthias Kloseb159a552010-04-25 21:00:44 +00009770
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009772$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009773
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009775rm -f core conftest.err conftest.$ac_objext \
9776 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009777 *) ;;
9778esac
9779
Christian Heimes985ecdc2013-11-20 11:46:18 +01009780# check for systems that require aligned memory access
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9782$as_echo_n "checking aligned memory access is required... " >&6; }
9783if test "$cross_compiling" = yes; then :
9784 aligned_required=yes
9785else
9786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9787/* end confdefs.h. */
9788
9789int main()
9790{
9791 char s[16];
9792 int i, *p1, *p2;
9793 for (i=0; i < 16; i++)
9794 s[i] = i;
9795 p1 = (int*)(s+1);
9796 p2 = (int*)(s+2);
9797 if (*p1 == *p2)
9798 return 1;
9799 return 0;
9800}
9801
9802_ACEOF
9803if ac_fn_c_try_run "$LINENO"; then :
9804 aligned_required=no
9805else
9806 aligned_required=yes
9807fi
9808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9809 conftest.$ac_objext conftest.beam conftest.$ac_ext
9810fi
9811
9812
9813if test "$aligned_required" = yes ; then
9814
9815$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9816
9817fi
9818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9819$as_echo "$aligned_required" >&6; }
9820
9821
9822# str, bytes and memoryview hash algorithm
9823
9824
9825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9826$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9827
9828# Check whether --with-hash_algorithm was given.
9829if test "${with_hash_algorithm+set}" = set; then :
9830 withval=$with_hash_algorithm;
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9832$as_echo "$withval" >&6; }
9833case "$withval" in
9834 siphash24)
9835 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9836
9837 ;;
9838 fnv)
9839 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9840
9841 ;;
9842 *)
9843 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9844 ;;
9845esac
9846
9847else
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9849$as_echo "default" >&6; }
9850fi
9851
9852
Charles-François Natalid30b0222014-05-08 23:08:51 +01009853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9854$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9855
9856# Check whether --with-address_sanitizer was given.
9857if test "${with_address_sanitizer+set}" = set; then :
9858 withval=$with_address_sanitizer;
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9860$as_echo "$withval" >&6; }
9861BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9862LDFLAGS="-fsanitize=address $LDFLAGS"
9863
9864else
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867fi
9868
9869
Guido van Rossum70c7f481998-03-26 18:44:10 +00009870# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9872$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009873if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009874 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009875else
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009877LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881/* Override any GCC internal prototype to avoid an error.
9882 Use char because int might match the return type of a GCC
9883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009884#ifdef __cplusplus
9885extern "C"
9886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009887char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009888int
9889main ()
9890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ;
9893 return 0;
9894}
9895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009898else
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901rm -f core conftest.err conftest.$ac_objext \
9902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009903LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9906$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009907if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009908 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009909fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009910 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9912$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009913if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009915else
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009917LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921/* Override any GCC internal prototype to avoid an error.
9922 Use char because int might match the return type of a GCC
9923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009924#ifdef __cplusplus
9925extern "C"
9926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009927char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009928int
9929main ()
9930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009932 ;
9933 return 0;
9934}
9935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009938else
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941rm -f core conftest.err conftest.$ac_objext \
9942 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009943LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9946$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009947if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009948 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009949fi
9950 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009951
Matthias Kloseb9621712010-04-24 17:59:49 +00009952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9953$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009956if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9959$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009960LIBS="$withval $LIBS"
9961
9962else
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9964$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965fi
9966
Guido van Rossum7f43da71994-08-01 12:15:30 +00009967
Victor Stinner8291b5e2015-03-20 16:03:14 +01009968
9969
9970
9971
9972
9973
9974
9975if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9976 if test -n "$ac_tool_prefix"; then
9977 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9978set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9980$as_echo_n "checking for $ac_word... " >&6; }
9981if ${ac_cv_path_PKG_CONFIG+:} false; then :
9982 $as_echo_n "(cached) " >&6
9983else
9984 case $PKG_CONFIG in
9985 [\\/]* | ?:[\\/]*)
9986 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9987 ;;
9988 *)
9989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9990for as_dir in $PATH
9991do
9992 IFS=$as_save_IFS
9993 test -z "$as_dir" && as_dir=.
9994 for ac_exec_ext in '' $ac_executable_extensions; do
9995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9996 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9998 break 2
9999 fi
10000done
10001 done
10002IFS=$as_save_IFS
10003
10004 ;;
10005esac
10006fi
10007PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10008if test -n "$PKG_CONFIG"; then
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10010$as_echo "$PKG_CONFIG" >&6; }
10011else
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
10014fi
10015
10016
10017fi
10018if test -z "$ac_cv_path_PKG_CONFIG"; then
10019 ac_pt_PKG_CONFIG=$PKG_CONFIG
10020 # Extract the first word of "pkg-config", so it can be a program name with args.
10021set dummy pkg-config; ac_word=$2
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10023$as_echo_n "checking for $ac_word... " >&6; }
10024if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10025 $as_echo_n "(cached) " >&6
10026else
10027 case $ac_pt_PKG_CONFIG in
10028 [\\/]* | ?:[\\/]*)
10029 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10030 ;;
10031 *)
10032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10033for as_dir in $PATH
10034do
10035 IFS=$as_save_IFS
10036 test -z "$as_dir" && as_dir=.
10037 for ac_exec_ext in '' $ac_executable_extensions; do
10038 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10039 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10041 break 2
10042 fi
10043done
10044 done
10045IFS=$as_save_IFS
10046
10047 ;;
10048esac
10049fi
10050ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10051if test -n "$ac_pt_PKG_CONFIG"; then
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10053$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10054else
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056$as_echo "no" >&6; }
10057fi
10058
10059 if test "x$ac_pt_PKG_CONFIG" = x; then
10060 PKG_CONFIG=""
10061 else
10062 case $cross_compiling:$ac_tool_warned in
10063yes:)
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10066ac_tool_warned=yes ;;
10067esac
10068 PKG_CONFIG=$ac_pt_PKG_CONFIG
10069 fi
10070else
10071 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10072fi
10073
10074fi
10075if test -n "$PKG_CONFIG"; then
10076 _pkg_min_version=0.9.0
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10078$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10079 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10081$as_echo "yes" >&6; }
10082 else
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10084$as_echo "no" >&6; }
10085 PKG_CONFIG=""
10086 fi
10087fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010088
10089# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10091$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010092
10093# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010094if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010095 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010096else
10097 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010098fi
10099
10100
Matthias Kloseb9621712010-04-24 17:59:49 +000010101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10102$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010103
10104# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10106$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010107
10108# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010109if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010110 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +000010111else
10112 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010113fi
10114
10115
10116if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010117 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10118else
10119 LIBFFI_INCLUDEDIR=""
10120fi
10121
10122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10124$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010125
Stefan Krah60187b52012-03-23 19:06:27 +010010126# Check for use of the system libmpdec library
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10128$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10129
10130# Check whether --with-system_libmpdec was given.
10131if test "${with_system_libmpdec+set}" = set; then :
10132 withval=$with_system_libmpdec;
10133else
10134 with_system_libmpdec="no"
10135fi
10136
10137
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10139$as_echo "$with_system_libmpdec" >&6; }
10140
Benjamin Peterson076ed002010-10-31 17:11:02 +000010141# Check for support for loadable sqlite extensions
10142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10143$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10144# Check whether --enable-loadable-sqlite-extensions was given.
10145if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10146 enableval=$enable_loadable_sqlite_extensions;
10147else
10148 enable_loadable_sqlite_extensions="no"
10149fi
10150
10151
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10153$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10154
Ned Deilyd819b932013-09-06 01:07:05 -070010155# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10156
10157
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10159$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10160
10161# Check whether --with-tcltk-includes was given.
10162if test "${with_tcltk_includes+set}" = set; then :
10163 withval=$with_tcltk_includes;
10164else
10165 with_tcltk_includes="default"
10166fi
10167
10168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10169$as_echo "$with_tcltk_includes" >&6; }
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10171$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10172
10173# Check whether --with-tcltk-libs was given.
10174if test "${with_tcltk_libs+set}" = set; then :
10175 withval=$with_tcltk_libs;
10176else
10177 with_tcltk_libs="default"
10178fi
10179
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10181$as_echo "$with_tcltk_libs" >&6; }
10182if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10183then
10184 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10185 then
10186 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10187 fi
10188 TCLTK_INCLUDES=""
10189 TCLTK_LIBS=""
10190else
10191 TCLTK_INCLUDES="$with_tcltk_includes"
10192 TCLTK_LIBS="$with_tcltk_libs"
10193fi
10194
Matthias Klose55708cc2009-04-30 08:06:49 +000010195# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10197$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010198
10199# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010200if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010201 withval=$with_dbmliborder;
10202if test x$with_dbmliborder = xyes
10203then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010204as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010205else
10206 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10207 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10208 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010209 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010210 fi
10211 done
10212fi
10213fi
10214
Matthias Kloseb9621712010-04-24 17:59:49 +000010215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10216$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010217
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010218# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010219
10220
Matthias Kloseb9621712010-04-24 17:59:49 +000010221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10222$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010225if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 withval=$with_signal_module;
10227fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010228
10229
10230if test -z "$with_signal_module"
10231then with_signal_module="yes"
10232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10234$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010235
10236if test "${with_signal_module}" = "yes"; then
10237 USE_SIGNAL_MODULE=""
10238 SIGNAL_OBJS=""
10239else
10240 USE_SIGNAL_MODULE="#"
10241 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10242fi
10243
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010244# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010245
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010246USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
10250# Templates for things AC_DEFINEd more than once.
10251# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010252
10253
Martin v. Löwis11437992002-04-12 09:54:03 +000010254
Matthias Kloseb9621712010-04-24 17:59:49 +000010255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10256$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010259if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260 withval=$with_threads;
10261fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010262
10263
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010264# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010266# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010267if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268 withval=$with_thread; with_threads=$with_thread
10269fi
10270
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010271
10272if test -z "$with_threads"
10273then with_threads="yes"
10274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10276$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010277
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010278
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010279if test "$with_threads" = "no"
10280then
10281 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010282elif test "$ac_cv_pthread_is_default" = yes
10283then
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010285
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010286 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010288
10289 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010291elif test "$ac_cv_kpthread" = "yes"
10292then
10293 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010294 if test "$ac_cv_cxx_thread" = "yes"; then
10295 CXX="$CXX -Kpthread"
10296 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010298
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010299 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010300 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010301elif test "$ac_cv_kthread" = "yes"
10302then
10303 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010304 if test "$ac_cv_cxx_thread" = "yes"; then
10305 CXX="$CXX -Kthread"
10306 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010308
10309 posix_threads=yes
10310 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010311elif test "$ac_cv_pthread" = "yes"
10312then
10313 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010314 if test "$ac_cv_cxx_thread" = "yes"; then
10315 CXX="$CXX -pthread"
10316 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010318
10319 posix_threads=yes
10320 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010321else
10322 if test ! -z "$with_threads" -a -d "$with_threads"
10323 then LDFLAGS="$LDFLAGS -L$with_threads"
10324 fi
10325 if test ! -z "$withval" -a -d "$withval"
10326 then LDFLAGS="$LDFLAGS -L$withval"
10327 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010328
10329 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010330 # define _POSIX_THREADS in unistd.h. Some apparently don't
10331 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10333$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010335/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010336
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010337#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010338#ifdef _POSIX_THREADS
10339yes
10340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010341
10342_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010345 unistd_defines_pthreads=yes
10346else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010347 unistd_defines_pthreads=no
10348fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010349rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10352$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010353
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010355
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010356 # Just looking for pthread_create in libpthread is not enough:
10357 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10358 # So we really have to include pthread.h, and then link.
10359 _libs=$LIBS
10360 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10362$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010364/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010365
10366#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010367#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010368
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010369void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010370int
10371main ()
10372{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010373
10374pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ;
10376 return 0;
10377}
10378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010379if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010380
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10382$as_echo "yes" >&6; }
10383 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010384
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010385 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010386 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010389 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010391if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010393
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010394 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010395 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010396else
Guido van Rossumad678af1998-10-02 14:42:15 +000010397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10399$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010400if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010402else
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010404LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408/* Override any GCC internal prototype to avoid an error.
10409 Use char because int might match the return type of a GCC
10410 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010411#ifdef __cplusplus
10412extern "C"
10413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010414char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010415int
10416main ()
10417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428rm -f core conftest.err conftest.$ac_objext \
10429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010430LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10433$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010434if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010437 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010438 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010439 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010440else
Greg Steinadf63d62000-07-05 10:38:09 +000010441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10443$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010444if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010446else
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010448LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452/* Override any GCC internal prototype to avoid an error.
10453 Use char because int might match the return type of a GCC
10454 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010455#ifdef __cplusplus
10456extern "C"
10457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010458char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010459int
10460main ()
10461{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 ;
10464 return 0;
10465}
10466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010467if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010468 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010469else
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472rm -f core conftest.err conftest.$ac_objext \
10473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010474LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10477$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010478if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010480
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010481 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010482 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010483 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010484else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10487$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010488if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010490else
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010492LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496/* Override any GCC internal prototype to avoid an error.
10497 Use char because int might match the return type of a GCC
10498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010499#ifdef __cplusplus
10500extern "C"
10501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010502char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010503int
10504main ()
10505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ;
10508 return 0;
10509}
10510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010511if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010513else
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516rm -f core conftest.err conftest.$ac_objext \
10517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010518LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10521$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010522if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010524
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010525 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010526 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010527 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010528else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010529
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10531$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010532if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010534else
Martin v. Löwis11437992002-04-12 09:54:03 +000010535 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010536LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010540/* Override any GCC internal prototype to avoid an error.
10541 Use char because int might match the return type of a GCC
10542 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010543#ifdef __cplusplus
10544extern "C"
10545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010546char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010547int
10548main ()
10549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010550return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ;
10552 return 0;
10553}
10554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010555if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010556 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010557else
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010560rm -f core conftest.err conftest.$ac_objext \
10561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010562LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10565$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010566if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010567 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010568
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010569 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010570 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010571 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010572else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010573
Martin v. Löwis130fb172001-07-19 11:00:41 +000010574 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010575fi
10576
Guido van Rossum627b2d71993-12-24 10:39:16 +000010577
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010578fi
10579
Guido van Rossum0be3e491997-05-22 20:33:33 +000010580fi
10581
Guido van Rossum49545951997-12-02 19:28:29 +000010582fi
10583
Guido van Rossumb93a8621998-05-07 13:27:32 +000010584fi
10585
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010587rm -f core conftest.err conftest.$ac_objext \
10588 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010589
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10591$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010592if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010594else
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010596LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600/* Override any GCC internal prototype to avoid an error.
10601 Use char because int might match the return type of a GCC
10602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010603#ifdef __cplusplus
10604extern "C"
10605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010606char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010607int
10608main ()
10609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010610return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 ;
10612 return 0;
10613}
10614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010617else
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010620rm -f core conftest.err conftest.$ac_objext \
10621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10625$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010626if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628
Martin v. Löwis130fb172001-07-19 11:00:41 +000010629 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010630 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010631 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010632fi
10633
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010634
Neal Norwitza978ab02002-11-02 16:58:05 +000010635 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10637$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010638if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010640else
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010642LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646/* Override any GCC internal prototype to avoid an error.
10647 Use char because int might match the return type of a GCC
10648 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010649#ifdef __cplusplus
10650extern "C"
10651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010652char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010653int
10654main ()
10655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ;
10658 return 0;
10659}
10660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010663else
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666rm -f core conftest.err conftest.$ac_objext \
10667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010668LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10671$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010672if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010674
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010675 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010676 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010677 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010678fi
10679
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010680 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010681fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010682
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010683if test "$posix_threads" = "yes"; then
10684 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010685
Matthias Kloseb9621712010-04-24 17:59:49 +000010686$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010687
10688 fi
10689
10690 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10691 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010692 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010693$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010694
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010695 ;;
10696 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698
10699 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010700 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010701$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010702
10703 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010704 esac
10705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10707$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010708 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010712 ac_cv_pthread_system_supported=no
10713else
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010715/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010716
10717 #include <stdio.h>
10718 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010719 void *foo(void *parm) {
10720 return NULL;
10721 }
10722 main() {
10723 pthread_attr_t attr;
10724 pthread_t id;
10725 if (pthread_attr_init(&attr)) exit(-1);
10726 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10727 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10728 exit(0);
10729 }
10730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010731if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010732 ac_cv_pthread_system_supported=yes
10733else
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010738fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740
Guido van Rossum627b2d71993-12-24 10:39:16 +000010741fi
10742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10744$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010745 if test "$ac_cv_pthread_system_supported" = "yes"; then
10746
Matthias Kloseb9621712010-04-24 17:59:49 +000010747$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010748
10749 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 for ac_func in pthread_sigmask
10751do :
10752 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010753if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010754 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010755#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010756_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010757 case $ac_sys_system in
10758 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010761
10762 ;;
10763 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010764fi
10765done
10766
Christian Heimesf77b4b22013-08-21 13:26:05 +020010767 for ac_func in pthread_atfork
10768do :
10769 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10770if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10771 cat >>confdefs.h <<_ACEOF
10772#define HAVE_PTHREAD_ATFORK 1
10773_ACEOF
10774
10775fi
10776done
10777
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010778fi
10779
10780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10784$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010786if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010787 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791 ipv6=no
10792 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10794$as_echo "yes" >&6; }
10795 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796
10797 ipv6=yes
10798 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800else
Martin v. Löwis11437992002-04-12 09:54:03 +000010801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010803/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804 /* AF_INET6 available check */
10805#include <sys/types.h>
10806#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010807int
10808main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010810int domain = AF_INET6;
10811 ;
10812 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813}
Martin v. Löwis11437992002-04-12 09:54:03 +000010814_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010815if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010816
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10818$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010820
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821else
Matthias Kloseb159a552010-04-25 21:00:44 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10824$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010826
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010829
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010830if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10832$as_echo_n "checking if RFC2553 API is available... " >&6; }
10833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010835
10836 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010837#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010838int
10839main ()
10840{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010841struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010842 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 ;
10844 return 0;
10845}
Matthias Kloseb159a552010-04-25 21:00:44 +000010846
Martin v. Löwis11437992002-04-12 09:54:03 +000010847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010848if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010849
10850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010851$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010852 ipv6=yes
10853
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010854else
Matthias Kloseb159a552010-04-25 21:00:44 +000010855
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010857$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010858 ipv6=no
10859
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010862fi
10863
10864if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010866
10867fi
10868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010869fi
10870
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871
10872ipv6type=unknown
10873ipv6lib=none
10874ipv6trylibc=no
10875
10876if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10878$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010879 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10880 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881 case $i in
10882 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010885
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886#include <netinet/in.h>
10887#ifdef IPV6_INRIA_VERSION
10888yes
10889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010893 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010895rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896
10897 ;;
10898 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010900/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902#include <netinet/in.h>
10903#ifdef __KAME__
10904yes
10905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010906_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909 ipv6type=$i;
10910 ipv6lib=inet6
10911 ipv6libdir=/usr/local/v6/lib
10912 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010914rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915
10916 ;;
10917 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010919/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921#include <features.h>
10922#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10923yes
10924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010925_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928 ipv6type=$i;
10929 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010931rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932
10933 ;;
10934 linux-inet6)
10935 if test -d /usr/inet6; then
10936 ipv6type=$i
10937 ipv6lib=inet6
10938 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010939 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940 fi
10941 ;;
10942 solaris)
10943 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010944 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945 ipv6type=$i
10946 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010947 fi
10948 fi
10949 ;;
10950 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010952/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010953
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010954#include <sys/param.h>
10955#ifdef _TOSHIBA_INET6
10956yes
10957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010958_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961 ipv6type=$i;
10962 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010963 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010965rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010966
10967 ;;
10968 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010970/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010971
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010972#include </usr/local/v6/include/sys/v6config.h>
10973#ifdef __V6D__
10974yes
10975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010976_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979 ipv6type=$i;
10980 ipv6lib=v6;
10981 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010982 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010983fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010984rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985
10986 ;;
10987 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010989/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991#include <sys/param.h>
10992#ifdef _ZETA_MINAMI_INET6
10993yes
10994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010995_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010998 ipv6type=$i;
10999 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011000 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011002rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003
11004 ;;
11005 esac
11006 if test "$ipv6type" != "unknown"; then
11007 break
11008 fi
11009 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11011$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011012fi
11013
11014if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11015 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11016 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11017 echo "using lib$ipv6lib"
11018 else
11019 if test $ipv6trylibc = "yes"; then
11020 echo "using libc"
11021 else
11022 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11023 echo "You need to fetch lib$ipv6lib.a from appropriate"
11024 echo 'ipv6 kit and compile beforehand.'
11025 exit 1
11026 fi
11027 fi
11028fi
11029
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11031$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11033/* end confdefs.h. */
11034 /* CAN_RAW_FD_FRAMES available check */
11035#include <linux/can/raw.h>
11036int
11037main ()
11038{
11039int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11040 ;
11041 return 0;
11042}
11043_ACEOF
11044if ac_fn_c_try_compile "$LINENO"; then :
11045
11046
11047$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11048
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11050$as_echo "yes" >&6; }
11051
11052else
11053
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11055$as_echo "no" >&6; }
11056
11057fi
11058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
11061$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
11062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011063/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011064
11065 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011066int
11067main ()
11068{
11069FSIORefNum fRef = 0
11070 ;
11071 return 0;
11072}
Matthias Kloseb159a552010-04-25 21:00:44 +000011073
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011075if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011076
Matthias Kloseb159a552010-04-25 21:00:44 +000011077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011079
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11081$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011082
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011083else
Matthias Kloseb159a552010-04-25 21:00:44 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11086$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011087
11088fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11090
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011091# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11093$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011095# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011096if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011097 withval=$with_doc_strings;
11098fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011099
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011100
11101if test -z "$with_doc_strings"
11102then with_doc_strings="yes"
11103fi
11104if test "$with_doc_strings" != "no"
11105then
11106
Matthias Kloseb9621712010-04-24 17:59:49 +000011107$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011108
11109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11111$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011112
Antoine Pitrou042b1282010-08-13 21:15:58 +000011113# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11115$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011118if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011120if test "$withval" != no
11121then
11122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011124
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11126$as_echo "yes" >&6; }
11127else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11128$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011129fi
11130else
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11132$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133fi
11134
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011135
11136# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11138$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011140# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011141if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011142 withval=$with_pymalloc;
11143fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011144
Neil Schemenauera35c6882001-02-27 04:45:05 +000011145
Neil Schemenauer16c22972002-03-22 15:34:49 +000011146if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011147then
11148 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011149fi
11150if test "$with_pymalloc" != "no"
11151then
Martin v. Löwis11437992002-04-12 09:54:03 +000011152
Matthias Kloseb9621712010-04-24 17:59:49 +000011153$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011154
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011155 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11158$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011159
Benjamin Peterson05159c42009-12-03 03:01:27 +000011160# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11162$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011163
11164# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011165if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011166 withval=$with_valgrind;
11167else
11168 with_valgrind=no
11169fi
11170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11172$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011173if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 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 +020011175if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011176
Matthias Kloseb9621712010-04-24 17:59:49 +000011177$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011178
11179else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011180 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011181
11182fi
11183
11184
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011185 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011186fi
11187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011188# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011189
Guido van Rossum98935bf2001-09-05 19:13:16 +000011190DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011191
Guido van Rossume97ee181999-12-20 21:27:22 +000011192# the dlopen() function means we might want to use dynload_shlib.o. some
11193# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011194for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011195do :
11196 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011197if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011199#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011200_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011201
Guido van Rossume97ee181999-12-20 21:27:22 +000011202fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011203done
Guido van Rossume97ee181999-12-20 21:27:22 +000011204
Michael W. Hudson54241132001-12-07 15:38:26 +000011205
Guido van Rossume97ee181999-12-20 21:27:22 +000011206# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11207# loading of modules.
11208
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11210$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011211if test -z "$DYNLOADFILE"
11212then
11213 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011214 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11215 if test "$ac_cv_func_dlopen" = yes
11216 then DYNLOADFILE="dynload_shlib.o"
11217 else DYNLOADFILE="dynload_aix.o"
11218 fi
11219 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011220 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011221 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11222 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011223 *)
11224 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11225 # out any dynamic loading
11226 if test "$ac_cv_func_dlopen" = yes
11227 then DYNLOADFILE="dynload_shlib.o"
11228 else DYNLOADFILE="dynload_stub.o"
11229 fi
11230 ;;
11231 esac
11232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11234$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011235if test "$DYNLOADFILE" != "dynload_stub.o"
11236then
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Matthias Kloseb9621712010-04-24 17:59:49 +000011238$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011239
11240fi
11241
Neil Schemenauer4e425612001-06-19 15:44:15 +000011242# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11243
Michael W. Hudson54241132001-12-07 15:38:26 +000011244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11246$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011247if test -z "$MACHDEP_OBJS"
11248then
Jack Jansene578a632001-08-15 01:27:14 +000011249 MACHDEP_OBJS=$extra_machdep_objs
11250else
11251 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011252fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011253if test -z "$MACHDEP_OBJS"; then
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11255$as_echo "none" >&6; }
11256else
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11258$as_echo "$MACHDEP_OBJS" >&6; }
11259fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011260
Guido van Rossum627b2d71993-12-24 10:39:16 +000011261# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011262for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011263 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011264 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011265 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011266 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011267 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011268 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011269 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11270 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011271 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011272 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011273 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011274 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011275 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011276 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011277 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11278 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011279 sigaction sigaltstack siginterrupt sigpending sigrelse \
11280 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011281 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011282 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011283 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011284do :
11285 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11286ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011287if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011290_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011291
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011292fi
11293done
11294
Michael W. Hudson54241132001-12-07 15:38:26 +000011295
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011296ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11297 #include <dirent.h>
11298"
11299if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11300
11301$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11302
11303fi
11304
11305
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306# For some functions, having a definition is not sufficient, since
11307# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11309$as_echo_n "checking for chroot... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011313int
11314main ()
11315{
11316void *x=chroot
11317 ;
11318 return 0;
11319}
11320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011324
Matthias Kloseb159a552010-04-25 21:00:44 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011327else
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11329$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330
11331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11334$as_echo_n "checking for link... " >&6; }
11335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011336/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011337#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011338int
11339main ()
11340{
11341void *x=link
11342 ;
11343 return 0;
11344}
11345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011349
Matthias Kloseb159a552010-04-25 21:00:44 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352else
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355
11356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11359$as_echo_n "checking for symlink... " >&6; }
11360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011361/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011362#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011363int
11364main ()
11365{
11366void *x=symlink
11367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011372
Matthias Kloseb9621712010-04-24 17:59:49 +000011373$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011374
Matthias Kloseb159a552010-04-25 21:00:44 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011377else
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011380
11381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11384$as_echo_n "checking for fchdir... " >&6; }
11385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011387#include <unistd.h>
11388int
11389main ()
11390{
11391void *x=fchdir
11392 ;
11393 return 0;
11394}
11395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011397
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011399
Matthias Kloseb159a552010-04-25 21:00:44 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011401$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011402else
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405
11406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11409$as_echo_n "checking for fsync... " >&6; }
11410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011411/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011412#include <unistd.h>
11413int
11414main ()
11415{
11416void *x=fsync
11417 ;
11418 return 0;
11419}
11420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011424
Matthias Kloseb159a552010-04-25 21:00:44 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427else
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11429$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430
11431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11434$as_echo_n "checking for fdatasync... " >&6; }
11435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011436/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011437#include <unistd.h>
11438int
11439main ()
11440{
11441void *x=fdatasync
11442 ;
11443 return 0;
11444}
11445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011449
Matthias Kloseb159a552010-04-25 21:00:44 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011451$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011452else
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11454$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011455
11456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11459$as_echo_n "checking for epoll... " >&6; }
11460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011461/* end confdefs.h. */
11462#include <sys/epoll.h>
11463int
11464main ()
11465{
11466void *x=epoll_create
11467 ;
11468 return 0;
11469}
11470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011471if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011474
Matthias Kloseb159a552010-04-25 21:00:44 +000011475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011476$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011477else
Matthias Kloseb9621712010-04-24 17:59:49 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011480
11481fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11484$as_echo_n "checking for epoll_create1... " >&6; }
11485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486/* end confdefs.h. */
11487#include <sys/epoll.h>
11488int
11489main ()
11490{
11491void *x=epoll_create1
11492 ;
11493 return 0;
11494}
11495_ACEOF
11496if ac_fn_c_try_compile "$LINENO"; then :
11497
11498$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11499
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11501$as_echo "yes" >&6; }
11502else
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11504$as_echo "no" >&6; }
11505
11506fi
11507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11509$as_echo_n "checking for kqueue... " >&6; }
11510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011511/* end confdefs.h. */
11512
11513#include <sys/types.h>
11514#include <sys/event.h>
11515
11516int
11517main ()
11518{
11519int x=kqueue()
11520 ;
11521 return 0;
11522}
11523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011524if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011525
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011527
Matthias Kloseb159a552010-04-25 21:00:44 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011529$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011530else
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011533
11534fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11537$as_echo_n "checking for prlimit... " >&6; }
11538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11539/* end confdefs.h. */
11540
11541#include <sys/time.h>
11542#include <sys/resource.h>
11543
11544int
11545main ()
11546{
11547void *x=prlimit
11548 ;
11549 return 0;
11550}
11551_ACEOF
11552if ac_fn_c_try_compile "$LINENO"; then :
11553
11554$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11555
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11557$as_echo "yes" >&6; }
11558else
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
11561
11562fi
11563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11564
Martin v. Löwisd5843682002-11-21 20:41:28 +000011565# On some systems (eg. FreeBSD 5), we would find a definition of the
11566# functions ctermid_r, setgroups in the library, but no prototype
11567# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11568# address to avoid compiler warnings and potential miscompilations
11569# because of the missing prototypes.
11570
Matthias Kloseb9621712010-04-24 17:59:49 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11572$as_echo_n "checking for ctermid_r... " >&6; }
11573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011574/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011575
Martin v. Löwisd5843682002-11-21 20:41:28 +000011576#include <stdio.h>
11577
Martin v. Löwisd5843682002-11-21 20:41:28 +000011578int
11579main ()
11580{
11581void* p = ctermid_r
11582 ;
11583 return 0;
11584}
11585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011587
Matthias Kloseb9621712010-04-24 17:59:49 +000011588$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011589
Matthias Kloseb159a552010-04-25 21:00:44 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011591$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011592else
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11594$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011595
11596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11598
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11600$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011601if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011602 $as_echo_n "(cached) " >&6
11603else
11604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011605/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011606#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011607int
11608main ()
11609{
11610void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011611
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011612 ;
11613 return 0;
11614}
11615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011616if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011617 ac_cv_flock_decl=yes
11618else
11619 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011620
11621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011623
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011624fi
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11626$as_echo "$ac_cv_flock_decl" >&6; }
11627if test "x${ac_cv_flock_decl}" = xyes; then
11628 for ac_func in flock
11629do :
11630 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011631if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011632 cat >>confdefs.h <<_ACEOF
11633#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011634_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011635
Antoine Pitroua3000072010-09-07 14:52:42 +000011636else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011638$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011639if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011640 $as_echo_n "(cached) " >&6
11641else
11642 ac_check_lib_save_LIBS=$LIBS
11643LIBS="-lbsd $LIBS"
11644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11645/* end confdefs.h. */
11646
11647/* Override any GCC internal prototype to avoid an error.
11648 Use char because int might match the return type of a GCC
11649 builtin and then its argument prototype would still apply. */
11650#ifdef __cplusplus
11651extern "C"
11652#endif
11653char flock ();
11654int
11655main ()
11656{
11657return flock ();
11658 ;
11659 return 0;
11660}
11661_ACEOF
11662if ac_fn_c_try_link "$LINENO"; then :
11663 ac_cv_lib_bsd_flock=yes
11664else
11665 ac_cv_lib_bsd_flock=no
11666fi
11667rm -f core conftest.err conftest.$ac_objext \
11668 conftest$ac_exeext conftest.$ac_ext
11669LIBS=$ac_check_lib_save_LIBS
11670fi
11671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11672$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011673if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011674 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011675
11676
11677$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11678
11679
11680fi
11681
11682
11683fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011684done
11685
Antoine Pitroua3000072010-09-07 14:52:42 +000011686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11689$as_echo_n "checking for getpagesize... " >&6; }
11690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011691/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011692
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011693#include <unistd.h>
11694
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011695int
11696main ()
11697{
11698void* p = getpagesize
11699 ;
11700 return 0;
11701}
11702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011706
Matthias Kloseb159a552010-04-25 21:00:44 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011709else
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011712
11713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011715
Victor Stinner984890f2011-11-24 13:53:38 +010011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11717$as_echo_n "checking for broken unsetenv... " >&6; }
11718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11719/* end confdefs.h. */
11720
11721#include <stdlib.h>
11722
11723int
11724main ()
11725{
11726int res = unsetenv("DUMMY")
11727 ;
11728 return 0;
11729}
11730_ACEOF
11731if ac_fn_c_try_compile "$LINENO"; then :
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11733$as_echo "no" >&6; }
11734else
11735
11736$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11737
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11739$as_echo "yes" >&6; }
11740
11741fi
11742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11743
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011744for ac_prog in true
11745do
11746 # Extract the first word of "$ac_prog", so it can be a program name with args.
11747set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11749$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011750if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011751 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011752else
11753 if test -n "$TRUE"; then
11754 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11755else
11756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11757for as_dir in $PATH
11758do
11759 IFS=$as_save_IFS
11760 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011763 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 $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 +000011765 break 2
11766 fi
11767done
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011769IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011770
11771fi
11772fi
11773TRUE=$ac_cv_prog_TRUE
11774if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11776$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011777else
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011780fi
11781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011782
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011783 test -n "$TRUE" && break
11784done
11785test -n "$TRUE" || TRUE="/bin/true"
11786
11787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11789$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011790if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792else
11793 ac_check_lib_save_LIBS=$LIBS
11794LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011796/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011798/* Override any GCC internal prototype to avoid an error.
11799 Use char because int might match the return type of a GCC
11800 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801#ifdef __cplusplus
11802extern "C"
11803#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011804char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805int
11806main ()
11807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011808return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011809 ;
11810 return 0;
11811}
11812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011814 ac_cv_lib_c_inet_aton=yes
11815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011818rm -f core conftest.err conftest.$ac_objext \
11819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820LIBS=$ac_check_lib_save_LIBS
11821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11823$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011824if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011825 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11828$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011829if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831else
11832 ac_check_lib_save_LIBS=$LIBS
11833LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837/* Override any GCC internal prototype to avoid an error.
11838 Use char because int might match the return type of a GCC
11839 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840#ifdef __cplusplus
11841extern "C"
11842#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011843char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844int
11845main ()
11846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011848 ;
11849 return 0;
11850}
11851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011853 ac_cv_lib_resolv_inet_aton=yes
11854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011857rm -f core conftest.err conftest.$ac_objext \
11858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011859LIBS=$ac_check_lib_save_LIBS
11860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11862$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011864 cat >>confdefs.h <<_ACEOF
11865#define HAVE_LIBRESOLV 1
11866_ACEOF
11867
11868 LIBS="-lresolv $LIBS"
11869
11870fi
11871
11872
11873fi
11874
11875
Christian Heimesd0764e22007-12-04 15:00:33 +000011876# On Tru64, chflags seems to be present, but calling it will
11877# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11879$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011880if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011884 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011887/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011888
Christian Heimesd0764e22007-12-04 15:00:33 +000011889#include <sys/stat.h>
11890#include <unistd.h>
11891int main(int argc, char*argv[])
11892{
11893 if(chflags(argv[0], 0) != 0)
11894 return 1;
11895 return 0;
11896}
Ned Deily3eb67d52011-06-28 00:00:28 -070011897
Christian Heimesd0764e22007-12-04 15:00:33 +000011898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011899if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011900 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011906fi
11907
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11911$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011912if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011914if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011915 ac_cv_have_chflags="yes"
11916else
11917 ac_cv_have_chflags="no"
11918fi
11919
11920fi
11921if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011924
11925fi
11926
Matthias Kloseb9621712010-04-24 17:59:49 +000011927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11928$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011929if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011931else
Matthias Kloseb9621712010-04-24 17:59:49 +000011932 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011933 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011934else
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011936/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011937
Christian Heimesd0764e22007-12-04 15:00:33 +000011938#include <sys/stat.h>
11939#include <unistd.h>
11940int main(int argc, char*argv[])
11941{
11942 if(lchflags(argv[0], 0) != 0)
11943 return 1;
11944 return 0;
11945}
Ned Deily3eb67d52011-06-28 00:00:28 -070011946
Christian Heimesd0764e22007-12-04 15:00:33 +000011947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011949 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011955fi
11956
11957
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11960$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011961if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011963if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011964 ac_cv_have_lchflags="yes"
11965else
11966 ac_cv_have_lchflags="no"
11967fi
11968
11969fi
11970if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011973
11974fi
11975
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011976case $ac_sys_system/$ac_sys_release in
11977Darwin/*)
11978 _CUR_CFLAGS="${CFLAGS}"
11979 _CUR_LDFLAGS="${LDFLAGS}"
11980 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11981 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11982 ;;
11983esac
11984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11986$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011987if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011989else
11990 ac_check_lib_save_LIBS=$LIBS
11991LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011993/* end confdefs.h. */
11994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011995/* Override any GCC internal prototype to avoid an error.
11996 Use char because int might match the return type of a GCC
11997 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011998#ifdef __cplusplus
11999extern "C"
12000#endif
12001char inflateCopy ();
12002int
12003main ()
12004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012005return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012006 ;
12007 return 0;
12008}
12009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012010if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012011 ac_cv_lib_z_inflateCopy=yes
12012else
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012015rm -f core conftest.err conftest.$ac_objext \
12016 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012017LIBS=$ac_check_lib_save_LIBS
12018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12020$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012021if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012022
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012024
12025fi
12026
12027
12028case $ac_sys_system/$ac_sys_release in
12029Darwin/*)
12030 CFLAGS="${_CUR_CFLAGS}"
12031 LDFLAGS="${_CUR_LDFLAGS}"
12032 ;;
12033esac
12034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12036$as_echo_n "checking for hstrerror... " >&6; }
12037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012038/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012039
Martin v. Löwise9416172003-05-03 10:12:45 +000012040#include <netdb.h>
12041
Martin v. Löwise9416172003-05-03 10:12:45 +000012042int
12043main ()
12044{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012045void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012046 ;
12047 return 0;
12048}
12049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012053
Matthias Kloseb159a552010-04-25 21:00:44 +000012054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012055$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012059
12060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012061rm -f core conftest.err conftest.$ac_objext \
12062 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12065$as_echo_n "checking for inet_aton... " >&6; }
12066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012067/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012068
Martin v. Löwis86d66262006-02-17 08:40:11 +000012069#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012070#include <sys/socket.h>
12071#include <netinet/in.h>
12072#include <arpa/inet.h>
12073
Martin v. Löwise9416172003-05-03 10:12:45 +000012074int
12075main ()
12076{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012078 ;
12079 return 0;
12080}
12081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012085
Matthias Kloseb159a552010-04-25 21:00:44 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012087$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12090$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012091
12092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012093rm -f core conftest.err conftest.$ac_objext \
12094 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12097$as_echo_n "checking for inet_pton... " >&6; }
12098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012099/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012100
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012101#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012102#include <sys/socket.h>
12103#include <netinet/in.h>
12104#include <arpa/inet.h>
12105
Martin v. Löwise9416172003-05-03 10:12:45 +000012106int
12107main ()
12108{
12109void* p = inet_pton
12110 ;
12111 return 0;
12112}
12113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012117
Matthias Kloseb159a552010-04-25 21:00:44 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012119$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12122$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012123
12124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012126
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012127# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12129$as_echo_n "checking for setgroups... " >&6; }
12130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012132
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012133#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012134#ifdef HAVE_GRP_H
12135#include <grp.h>
12136#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012137
Martin v. Löwisd5843682002-11-21 20:41:28 +000012138int
12139main ()
12140{
12141void* p = setgroups
12142 ;
12143 return 0;
12144}
12145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012146if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012149
Matthias Kloseb159a552010-04-25 21:00:44 +000012150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012151$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012152else
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12154$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012155
12156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012158
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012159# check for openpty and forkpty
12160
12161for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012162do :
12163 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012164if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012165 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012166#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012167_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012168
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12171$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012172if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012174else
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012176LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012180/* Override any GCC internal prototype to avoid an error.
12181 Use char because int might match the return type of a GCC
12182 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012183#ifdef __cplusplus
12184extern "C"
12185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012186char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012187int
12188main ()
12189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012190return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 ;
12192 return 0;
12193}
12194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012195if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012197else
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200rm -f core conftest.err conftest.$ac_objext \
12201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012202LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12205$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012206if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012208 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012209else
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12211$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012212if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012214else
12215 ac_check_lib_save_LIBS=$LIBS
12216LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012218/* end confdefs.h. */
12219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220/* Override any GCC internal prototype to avoid an error.
12221 Use char because int might match the return type of a GCC
12222 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012223#ifdef __cplusplus
12224extern "C"
12225#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012226char openpty ();
12227int
12228main ()
12229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012231 ;
12232 return 0;
12233}
12234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012236 ac_cv_lib_bsd_openpty=yes
12237else
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240rm -f core conftest.err conftest.$ac_objext \
12241 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012242LIBS=$ac_check_lib_save_LIBS
12243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12245$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012246if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012248 LIBS="$LIBS -lbsd"
12249fi
12250
12251
12252fi
12253
Fred Drake8cef4cf2000-06-28 16:40:38 +000012254
12255fi
12256done
12257
12258for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012259do :
12260 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012261if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012264_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012265
Fred Drake8cef4cf2000-06-28 16:40:38 +000012266else
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12268$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012271else
Martin v. Löwis11437992002-04-12 09:54:03 +000012272 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012273LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012277/* Override any GCC internal prototype to avoid an error.
12278 Use char because int might match the return type of a GCC
12279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012280#ifdef __cplusplus
12281extern "C"
12282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012283char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012284int
12285main ()
12286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012288 ;
12289 return 0;
12290}
12291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012292if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012293 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012297rm -f core conftest.err conftest.$ac_objext \
12298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012299LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12302$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012303if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012305 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012306else
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12308$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012311else
12312 ac_check_lib_save_LIBS=$LIBS
12313LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012315/* end confdefs.h. */
12316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317/* Override any GCC internal prototype to avoid an error.
12318 Use char because int might match the return type of a GCC
12319 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012320#ifdef __cplusplus
12321extern "C"
12322#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012323char forkpty ();
12324int
12325main ()
12326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012328 ;
12329 return 0;
12330}
12331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012333 ac_cv_lib_bsd_forkpty=yes
12334else
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012337rm -f core conftest.err conftest.$ac_objext \
12338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012339LIBS=$ac_check_lib_save_LIBS
12340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12342$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012343if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012345 LIBS="$LIBS -lbsd"
12346fi
12347
12348
12349fi
12350
Fred Drake8cef4cf2000-06-28 16:40:38 +000012351
12352fi
12353done
12354
Jack Jansendd19cf82001-12-06 22:36:17 +000012355
Christian Heimesb186d002008-03-18 15:15:01 +000012356# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012357for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012358do :
12359 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012360if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012361 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012362#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012363_ACEOF
12364
12365fi
12366done
12367
12368
Michael W. Hudson54241132001-12-07 15:38:26 +000012369# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012370for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012371do :
12372 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12373ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012374if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012375 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012376#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012377_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012378
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012379fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012380done
12381
Michael W. Hudson54241132001-12-07 15:38:26 +000012382
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012383ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012384if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012385 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012386
Martin v. Löwis1142de32002-03-29 16:28:31 +000012387else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012389 *" dup2.$ac_objext "* ) ;;
12390 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012392esac
12393
Martin v. Löwis1142de32002-03-29 16:28:31 +000012394fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012395
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012396ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012397if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012398 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12399
12400else
12401 case " $LIBOBJS " in
12402 *" strdup.$ac_objext "* ) ;;
12403 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12404 ;;
12405esac
12406
12407fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012408
12409
12410for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012411do :
12412 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012413if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012415#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012418/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012420int
12421main ()
12422{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012423getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 ;
12425 return 0;
12426}
12427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012431
Guido van Rossum627b2d71993-12-24 10:39:16 +000012432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012434
Guido van Rossum627b2d71993-12-24 10:39:16 +000012435fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012436done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012437
Jack Jansen150753c2003-03-29 22:07:47 +000012438for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012439do :
12440 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012441if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012442 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012443#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012446/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012447#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012448int
12449main ()
12450{
12451setpgrp(0,0);
12452 ;
12453 return 0;
12454}
12455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012459
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012462
12463fi
12464done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012465
Thomas Wouters3a584202000-08-05 23:28:51 +000012466for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012467do :
12468 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012471#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012474/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012475#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012476int
12477main ()
12478{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 ;
12481 return 0;
12482}
12483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484if ac_fn_c_try_compile "$LINENO"; then :
12485
Guido van Rossum627b2d71993-12-24 10:39:16 +000012486else
Skip Montanaro6dead952003-09-25 14:50:04 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012489
Martin v. Löwis11437992002-04-12 09:54:03 +000012490
Guido van Rossum627b2d71993-12-24 10:39:16 +000012491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012493
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012495done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012496
Michael W. Hudson54241132001-12-07 15:38:26 +000012497
Victor Stinnere0be4232011-10-25 13:06:09 +020012498for ac_func in clock_gettime
12499do :
12500 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12501if test "x$ac_cv_func_clock_gettime" = xyes; then :
12502 cat >>confdefs.h <<_ACEOF
12503#define HAVE_CLOCK_GETTIME 1
12504_ACEOF
12505
12506else
12507
12508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12509$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12510if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12511 $as_echo_n "(cached) " >&6
12512else
12513 ac_check_lib_save_LIBS=$LIBS
12514LIBS="-lrt $LIBS"
12515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12516/* end confdefs.h. */
12517
12518/* Override any GCC internal prototype to avoid an error.
12519 Use char because int might match the return type of a GCC
12520 builtin and then its argument prototype would still apply. */
12521#ifdef __cplusplus
12522extern "C"
12523#endif
12524char clock_gettime ();
12525int
12526main ()
12527{
12528return clock_gettime ();
12529 ;
12530 return 0;
12531}
12532_ACEOF
12533if ac_fn_c_try_link "$LINENO"; then :
12534 ac_cv_lib_rt_clock_gettime=yes
12535else
12536 ac_cv_lib_rt_clock_gettime=no
12537fi
12538rm -f core conftest.err conftest.$ac_objext \
12539 conftest$ac_exeext conftest.$ac_ext
12540LIBS=$ac_check_lib_save_LIBS
12541fi
12542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12543$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12544if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12545
Victor Stinner7efb8332014-08-29 15:41:08 +020012546 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012547 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12548
12549
12550$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12551
12552
12553fi
12554
12555
12556fi
12557done
12558
12559
12560for ac_func in clock_getres
12561do :
12562 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12563if test "x$ac_cv_func_clock_getres" = xyes; then :
12564 cat >>confdefs.h <<_ACEOF
12565#define HAVE_CLOCK_GETRES 1
12566_ACEOF
12567
12568else
12569
12570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12571$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12572if ${ac_cv_lib_rt_clock_getres+:} false; then :
12573 $as_echo_n "(cached) " >&6
12574else
12575 ac_check_lib_save_LIBS=$LIBS
12576LIBS="-lrt $LIBS"
12577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12578/* end confdefs.h. */
12579
12580/* Override any GCC internal prototype to avoid an error.
12581 Use char because int might match the return type of a GCC
12582 builtin and then its argument prototype would still apply. */
12583#ifdef __cplusplus
12584extern "C"
12585#endif
12586char clock_getres ();
12587int
12588main ()
12589{
12590return clock_getres ();
12591 ;
12592 return 0;
12593}
12594_ACEOF
12595if ac_fn_c_try_link "$LINENO"; then :
12596 ac_cv_lib_rt_clock_getres=yes
12597else
12598 ac_cv_lib_rt_clock_getres=no
12599fi
12600rm -f core conftest.err conftest.$ac_objext \
12601 conftest$ac_exeext conftest.$ac_ext
12602LIBS=$ac_check_lib_save_LIBS
12603fi
12604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12605$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12606if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12607
12608 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12609
12610
12611fi
12612
12613
12614fi
12615done
12616
12617
Matthias Kloseb9621712010-04-24 17:59:49 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12619$as_echo_n "checking for major... " >&6; }
12620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012622
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012623#if defined(MAJOR_IN_MKDEV)
12624#include <sys/mkdev.h>
12625#elif defined(MAJOR_IN_SYSMACROS)
12626#include <sys/sysmacros.h>
12627#else
12628#include <sys/types.h>
12629#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012630
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012631int
12632main ()
12633{
12634
12635 makedev(major(0),minor(0));
12636
12637 ;
12638 return 0;
12639}
12640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012641if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012642
12643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012645
Matthias Kloseb9621712010-04-24 17:59:49 +000012646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12647$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012648
12649else
Skip Montanaro6dead952003-09-25 14:50:04 +000012650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012653
12654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012655rm -f core conftest.err conftest.$ac_objext \
12656 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012657
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012658# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012659# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12661$as_echo_n "checking for getaddrinfo... " >&6; }
12662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012663/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012664
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012665#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012666#include <sys/socket.h>
12667#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012668#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012669
Martin v. Löwis11437992002-04-12 09:54:03 +000012670int
12671main ()
12672{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012673getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 ;
12675 return 0;
12676}
12677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012679 have_getaddrinfo=yes
12680else
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012683rm -f core conftest.err conftest.$ac_objext \
12684 conftest$ac_exeext conftest.$ac_ext
12685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12686$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012687if test $have_getaddrinfo = yes
12688then
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12690$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012691 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012693else
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012695
12696if test "${enable_ipv6+set}" = set; then
12697 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12698else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012699 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012700fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701else
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012703/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012704
Stefan Krah19c21392012-11-22 23:47:32 +010012705#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012706#include <sys/types.h>
12707#include <netdb.h>
12708#include <string.h>
12709#include <sys/socket.h>
12710#include <netinet/in.h>
12711
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012712int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012713{
12714 int passive, gaierr, inet4 = 0, inet6 = 0;
12715 struct addrinfo hints, *ai, *aitop;
12716 char straddr[INET6_ADDRSTRLEN], strport[16];
12717
12718 for (passive = 0; passive <= 1; passive++) {
12719 memset(&hints, 0, sizeof(hints));
12720 hints.ai_family = AF_UNSPEC;
12721 hints.ai_flags = passive ? AI_PASSIVE : 0;
12722 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012723 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012724 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12725 (void)gai_strerror(gaierr);
12726 goto bad;
12727 }
12728 for (ai = aitop; ai; ai = ai->ai_next) {
12729 if (ai->ai_addr == NULL ||
12730 ai->ai_addrlen == 0 ||
12731 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12732 straddr, sizeof(straddr), strport, sizeof(strport),
12733 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12734 goto bad;
12735 }
12736 switch (ai->ai_family) {
12737 case AF_INET:
12738 if (strcmp(strport, "54321") != 0) {
12739 goto bad;
12740 }
12741 if (passive) {
12742 if (strcmp(straddr, "0.0.0.0") != 0) {
12743 goto bad;
12744 }
12745 } else {
12746 if (strcmp(straddr, "127.0.0.1") != 0) {
12747 goto bad;
12748 }
12749 }
12750 inet4++;
12751 break;
12752 case AF_INET6:
12753 if (strcmp(strport, "54321") != 0) {
12754 goto bad;
12755 }
12756 if (passive) {
12757 if (strcmp(straddr, "::") != 0) {
12758 goto bad;
12759 }
12760 } else {
12761 if (strcmp(straddr, "::1") != 0) {
12762 goto bad;
12763 }
12764 }
12765 inet6++;
12766 break;
12767 case AF_UNSPEC:
12768 goto bad;
12769 break;
12770 default:
12771 /* another family support? */
12772 break;
12773 }
12774 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012775 freeaddrinfo(aitop);
12776 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012777 }
12778
12779 if (!(inet4 == 0 || inet4 == 2))
12780 goto bad;
12781 if (!(inet6 == 0 || inet6 == 2))
12782 goto bad;
12783
12784 if (aitop)
12785 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012786 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012787
12788 bad:
12789 if (aitop)
12790 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012791 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012792}
12793
Martin v. Löwis11437992002-04-12 09:54:03 +000012794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012796 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012797else
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012804fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012805
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012807
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12809$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12810
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012811if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012812then
12813 if test $ipv6 = yes
12814 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012815 echo 'Fatal: You must get working getaddrinfo() function.'
12816 echo ' or you can specify "--disable-ipv6"'.
12817 exit 1
12818 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012819else
Martin v. Löwis11437992002-04-12 09:54:03 +000012820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012822
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012824
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012825for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012826do :
12827 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012828if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012831_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012832
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012833fi
12834done
12835
Michael W. Hudson54241132001-12-07 15:38:26 +000012836
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012837# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12839$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012840if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012844/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012845#include <sys/types.h>
12846#include <sys/time.h>
12847#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012848
Martin v. Löwis11437992002-04-12 09:54:03 +000012849int
12850main ()
12851{
12852if ((struct tm *) 0)
12853return 0;
12854 ;
12855 return 0;
12856}
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12866$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012867if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012868
Matthias Kloseb9621712010-04-24 17:59:49 +000012869$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870
12871fi
12872
Matthias Kloseb9621712010-04-24 17:59:49 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12874$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012875if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877else
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012879/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012880#include <sys/types.h>
12881#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012882
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
12885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886struct tm tm;
12887 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 ;
12890 return 0;
12891}
12892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012893if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894 ac_cv_struct_tm=time.h
12895else
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12901$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012902if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905
12906fi
12907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908ac_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 +000012909#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911"
Victor Stinnere0be4232011-10-25 13:06:09 +020012912if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012913
12914cat >>confdefs.h <<_ACEOF
12915#define HAVE_STRUCT_TM_TM_ZONE 1
12916_ACEOF
12917
12918
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012919fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012920
Martin v. Löwis11437992002-04-12 09:54:03 +000012921if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012924
12925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12927"
Victor Stinnere0be4232011-10-25 13:06:09 +020012928if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932fi
12933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012935#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936_ACEOF
12937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12939$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012940if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942else
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012944/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012945#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946#if !HAVE_DECL_TZNAME
12947extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
Martin v. Löwis11437992002-04-12 09:54:03 +000012950int
12951main ()
12952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 ;
12955 return 0;
12956}
12957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959 ac_cv_var_tzname=yes
12960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012963rm -f core conftest.err conftest.$ac_objext \
12964 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12967$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012968 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012969
Matthias Kloseb9621712010-04-24 17:59:49 +000012970$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012971
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012972 fi
12973fi
12974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975ac_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 +020012976if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
12978cat >>confdefs.h <<_ACEOF
12979#define HAVE_STRUCT_STAT_ST_RDEV 1
12980_ACEOF
12981
12982
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012983fi
12984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985ac_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 +020012986if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012987
Martin v. Löwis11437992002-04-12 09:54:03 +000012988cat >>confdefs.h <<_ACEOF
12989#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12990_ACEOF
12991
12992
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012993fi
12994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995ac_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 +020012996if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012997
12998cat >>confdefs.h <<_ACEOF
12999#define HAVE_STRUCT_STAT_ST_FLAGS 1
13000_ACEOF
13001
13002
13003fi
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005ac_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 +020013006if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013007
13008cat >>confdefs.h <<_ACEOF
13009#define HAVE_STRUCT_STAT_ST_GEN 1
13010_ACEOF
13011
13012
13013fi
13014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015ac_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 +020013016if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013017
13018cat >>confdefs.h <<_ACEOF
13019#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13020_ACEOF
13021
13022
13023fi
13024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025ac_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 +020013026if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013027
Martin v. Löwis11437992002-04-12 09:54:03 +000013028cat >>confdefs.h <<_ACEOF
13029#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13030_ACEOF
13031
13032
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013033fi
13034
Michael W. Hudson54241132001-12-07 15:38:26 +000013035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13037$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013038if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013040else
Matthias Kloseb159a552010-04-25 21:00:44 +000013041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013043/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013044#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013045int
13046main ()
13047{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 ;
13050 return 0;
13051}
13052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013053if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013054 ac_cv_header_time_altzone=yes
13055else
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060fi
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13063$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013067
13068fi
13069
Guido van Rossumda88dad1995-01-26 00:46:29 +000013070was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13072$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013074/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013075
13076#include <sys/types.h>
13077#include <sys/select.h>
13078#include <sys/time.h>
13079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080int
13081main ()
13082{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083;
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 ;
13085 return 0;
13086}
13087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013093 was_it_defined=yes
13094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13098$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13101$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013102if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013106/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013107#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013108int
13109main ()
13110{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 ;
13113 return 0;
13114}
13115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013117 ac_cv_struct_addrinfo=yes
13118else
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13122fi
13123
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13125$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013129
13130fi
13131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13133$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013134if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013136else
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013138/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013139
13140# include <sys/types.h>
13141# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013142int
13143main ()
13144{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013145struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 ;
13147 return 0;
13148}
13149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013150if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013151 ac_cv_struct_sockaddr_storage=yes
13152else
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13156fi
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13159$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013160if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013161
Matthias Kloseb9621712010-04-24 17:59:49 +000013162$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013163
13164fi
13165
Guido van Rossum627b2d71993-12-24 10:39:16 +000013166# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13169$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013170if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013175$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013176int
13177main ()
13178{
13179static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013180test_array [0] = 0;
13181return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
13183 ;
13184 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013185}
Martin v. Löwis11437992002-04-12 09:54:03 +000013186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013187if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013188 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13195$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013198
13199fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13202$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013203if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013207/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013208
Martin v. Löwis11437992002-04-12 09:54:03 +000013209int
13210main ()
13211{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013212
Martin v. Löwis11437992002-04-12 09:54:03 +000013213#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013214 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013216 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218 char const *const *pcpcc;
13219 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 /* NEC SVR4.0.2 mips cc rejects this. */
13221 struct point {int x, y;};
13222 static struct point const zero = {0,0};
13223 /* AIX XL C 1.02.0.0 rejects this.
13224 It does not let you subtract one const X* pointer from another in
13225 an arm of an if-expression whose if-part is not a constant
13226 expression */
13227 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230 ++pcpcc;
13231 ppc = (char**) pcpcc;
13232 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013233 { /* SCO 3.2v4 cc rejects this sort of thing. */
13234 char tx;
13235 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013237
Martin v. Löwis11437992002-04-12 09:54:03 +000013238 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 }
13241 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13242 int x[] = {25, 17};
13243 const int *foo = &x[0];
13244 ++foo;
13245 }
13246 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13247 typedef const int *iptr;
13248 iptr p = 0;
13249 ++p;
13250 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013251 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013253 struct s { int j; const int *ap[3]; } bx;
13254 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 }
13256 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13257 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013261#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013262
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ;
13264 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013265}
Martin v. Löwis11437992002-04-12 09:54:03 +000013266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268 ac_cv_c_const=yes
13269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13275$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279
13280fi
13281
Michael W. Hudson54241132001-12-07 15:38:26 +000013282
Guido van Rossumda88dad1995-01-26 00:46:29 +000013283works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13285$as_echo_n "checking for working volatile... " >&6; }
13286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013287/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289int
13290main ()
13291{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013292volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 ;
13294 return 0;
13295}
13296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013297if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013298 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013299else
Skip Montanaro6dead952003-09-25 14:50:04 +000013300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013302
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013303
Guido van Rossum627b2d71993-12-24 10:39:16 +000013304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13307$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013308
Guido van Rossumda88dad1995-01-26 00:46:29 +000013309works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13311$as_echo_n "checking for working signed char... " >&6; }
13312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013314
Martin v. Löwis11437992002-04-12 09:54:03 +000013315int
13316main ()
13317{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 ;
13320 return 0;
13321}
13322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013323if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013324 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013325else
Skip Montanaro6dead952003-09-25 14:50:04 +000013326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013328
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013329
Guido van Rossum7f43da71994-08-01 12:15:30 +000013330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13333$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013334
Guido van Rossumda88dad1995-01-26 00:46:29 +000013335have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13337$as_echo_n "checking for prototypes... " >&6; }
13338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013339/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013340int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013341int
13342main ()
13343{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 ;
13346 return 0;
13347}
13348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013352
Matthias Kloseb159a552010-04-25 21:00:44 +000013353 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13357$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358
Guido van Rossumda88dad1995-01-26 00:46:29 +000013359works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13361$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013363/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013364
13365#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013366int foo(int x, ...) {
13367 va_list va;
13368 va_start(va, x);
13369 va_arg(va, int);
13370 va_arg(va, char *);
13371 va_arg(va, double);
13372 return 0;
13373}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013374
Martin v. Löwis11437992002-04-12 09:54:03 +000013375int
13376main ()
13377{
Guido van Rossum90eea071996-08-30 20:58:57 +000013378return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013379 ;
13380 return 0;
13381}
13382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013388 works=yes
13389
Guido van Rossum627b2d71993-12-24 10:39:16 +000013390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13393$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394
Martin v. Löwisd6320502004-08-12 13:45:08 +000013395# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13397$as_echo_n "checking for socketpair... " >&6; }
13398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013399/* end confdefs.h. */
13400
13401#include <sys/types.h>
13402#include <sys/socket.h>
13403
13404int
13405main ()
13406{
13407void *x=socketpair
13408 ;
13409 return 0;
13410}
13411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013415
Matthias Kloseb159a552010-04-25 21:00:44 +000013416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013417$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013418else
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13420$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013421
13422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013424
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013425# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13427$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013430#include <sys/types.h>
13431#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013432int
13433main ()
13434{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013435struct sockaddr x;
13436x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 ;
13438 return 0;
13439}
13440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_compile "$LINENO"; then :
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13443$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013446
13447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13449$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013450
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013453
Guido van Rossumda88dad1995-01-26 00:46:29 +000013454va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13456$as_echo_n "checking whether va_list is an array... " >&6; }
13457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013458/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459
13460#ifdef HAVE_STDARG_PROTOTYPES
13461#include <stdarg.h>
13462#else
13463#include <varargs.h>
13464#endif
13465
Martin v. Löwis11437992002-04-12 09:54:03 +000013466int
13467main ()
13468{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013469va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ;
13471 return 0;
13472}
13473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if ac_fn_c_try_compile "$LINENO"; then :
13475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476else
Skip Montanaro6dead952003-09-25 14:50:04 +000013477
Martin v. Löwis11437992002-04-12 09:54:03 +000013478
Matthias Kloseb9621712010-04-24 17:59:49 +000013479$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
Guido van Rossumda88dad1995-01-26 00:46:29 +000013481 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013482
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13486$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013487
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013488# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013492if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13497$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013498 OLD_CFLAGS=$CFLAGS
13499 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013501/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013502
13503# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013504
Martin v. Löwis11437992002-04-12 09:54:03 +000013505int
13506main ()
13507{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013508
13509 char *name;
13510 struct hostent *he, *res;
13511 char buffer[2048];
13512 int buflen = 2048;
13513 int h_errnop;
13514
13515 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
13517 ;
13518 return 0;
13519}
13520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013521if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013524
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13529$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013531else
Skip Montanaro6dead952003-09-25 14:50:04 +000013532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13534$as_echo "no" >&6; }
13535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13536$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013538/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013540# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013541
Martin v. Löwis11437992002-04-12 09:54:03 +000013542int
13543main ()
13544{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013545
13546 char *name;
13547 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013548 char buffer[2048];
13549 int buflen = 2048;
13550 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013551
Matthias Kloseb159a552010-04-25 21:00:44 +000013552 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
13554 ;
13555 return 0;
13556}
13557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
Matthias Kloseb159a552010-04-25 21:00:44 +000013563$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13566$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013568else
Skip Montanaro6dead952003-09-25 14:50:04 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13571$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13573$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13575/* end confdefs.h. */
13576
13577# include <netdb.h>
13578
13579int
13580main ()
13581{
13582
13583 char *name;
13584 struct hostent *he;
13585 struct hostent_data data;
13586
13587 (void) gethostbyname_r(name, he, &data);
13588
13589 ;
13590 return 0;
13591}
13592_ACEOF
13593if ac_fn_c_try_compile "$LINENO"; then :
13594
13595 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13596
13597
13598$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13599
13600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13601$as_echo "yes" >&6; }
13602
13603else
13604
13605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13606$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013616 CFLAGS=$OLD_CFLAGS
13617
13618else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 for ac_func in gethostbyname
13621do :
13622 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013623if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013626_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013627
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013628fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013629done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013630
Michael W. Hudson54241132001-12-07 15:38:26 +000013631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632fi
13633
Michael W. Hudson54241132001-12-07 15:38:26 +000013634
13635
13636
13637
13638
13639
Guido van Rossum627b2d71993-12-24 10:39:16 +000013640# checks for system services
13641# (none yet)
13642
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013644ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013645if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013646
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13649$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013650if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013652else
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013654LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658/* Override any GCC internal prototype to avoid an error.
13659 Use char because int might match the return type of a GCC
13660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013661#ifdef __cplusplus
13662extern "C"
13663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013664char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013665int
13666main ()
13667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 ;
13670 return 0;
13671}
13672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013673if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013675else
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013678rm -f core conftest.err conftest.$ac_objext \
13679 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013680LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13683$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013684if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 cat >>confdefs.h <<_ACEOF
13686#define HAVE_LIBIEEE 1
13687_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013688
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013689 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013690
Guido van Rossum627b2d71993-12-24 10:39:16 +000013691fi
13692
Michael W. Hudson54241132001-12-07 15:38:26 +000013693
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013694fi
13695
Michael W. Hudson54241132001-12-07 15:38:26 +000013696
Guido van Rossum7f253911997-05-09 02:42:48 +000013697# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13699$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013703 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013704if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013705then
13706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13710$as_echo "yes" >&6; }
13711else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13712$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013713fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13716$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717fi
13718
Guido van Rossum7f253911997-05-09 02:42:48 +000013719
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720# check for --with-libm=...
13721
Guido van Rossum563e7081996-09-10 18:20:48 +000013722case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013723Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013724*) LIBM=-lm
13725esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13727$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013729# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013730if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013731 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013732if test "$withval" = no
13733then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13735$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013736elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013737then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13739$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013740else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013741fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013742else
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13744$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745fi
13746
Guido van Rossum7f43da71994-08-01 12:15:30 +000013747
13748# check for --with-libc=...
13749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13751$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013754if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013756if test "$withval" = no
13757then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13759$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013760elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013761then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13763$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013764else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013765fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13768$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769fi
13770
Guido van Rossum7f43da71994-08-01 12:15:30 +000013771
Stefan Krah1919b7e2012-03-21 18:25:23 +010013772# **************************************
13773# * Check for gcc x64 inline assembler *
13774# **************************************
13775
13776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13777$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13779/* end confdefs.h. */
13780
13781int
13782main ()
13783{
13784
13785 __asm__ __volatile__ ("movq %rcx, %rax");
13786
13787 ;
13788 return 0;
13789}
13790_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013791if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013792 have_gcc_asm_for_x64=yes
13793else
13794 have_gcc_asm_for_x64=no
13795fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013796rm -f core conftest.err conftest.$ac_objext \
13797 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13799$as_echo "$have_gcc_asm_for_x64" >&6; }
13800if test "$have_gcc_asm_for_x64" = yes
13801then
13802
13803$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13804
13805fi
13806
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013807# **************************************************
13808# * Check for various properties of floating point *
13809# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013810
Matthias Kloseb9621712010-04-24 17:59:49 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13812$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013813if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815else
13816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013818 ac_cv_little_endian_double=no
13819else
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821/* end confdefs.h. */
13822
13823#include <string.h>
13824int main() {
13825 double x = 9006104071832581.0;
13826 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13827 return 0;
13828 else
13829 return 1;
13830}
13831
13832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013833if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013834 ac_cv_little_endian_double=yes
13835else
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013840fi
13841
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013842fi
13843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13845$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013846if test "$ac_cv_little_endian_double" = yes
13847then
13848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013850
13851fi
13852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13854$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013855if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857else
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860 ac_cv_big_endian_double=no
13861else
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863/* end confdefs.h. */
13864
13865#include <string.h>
13866int main() {
13867 double x = 9006104071832581.0;
13868 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13869 return 0;
13870 else
13871 return 1;
13872}
13873
13874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013875if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876 ac_cv_big_endian_double=yes
13877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882fi
13883
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013884fi
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13887$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013888if test "$ac_cv_big_endian_double" = yes
13889then
13890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892
13893fi
13894
13895# Some ARM platforms use a mixed-endian representation for doubles.
13896# While Python doesn't currently have full support for these platforms
13897# (see e.g., issue 1762561), we can at least make sure that float <-> string
13898# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13900$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013901if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013902 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903else
13904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906 ac_cv_mixed_endian_double=no
13907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909/* end confdefs.h. */
13910
13911#include <string.h>
13912int main() {
13913 double x = 9006104071832581.0;
13914 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13915 return 0;
13916 else
13917 return 1;
13918}
13919
13920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013921if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013922 ac_cv_mixed_endian_double=yes
13923else
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013928fi
13929
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930fi
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13933$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013934if test "$ac_cv_mixed_endian_double" = yes
13935then
13936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013938
13939fi
13940
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013941# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013942# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013943# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013944# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013945# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013946# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013947
13948# This inline assembler syntax may also work for suncc and icc,
13949# so we try it on all platforms.
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13952$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954/* end confdefs.h. */
13955
13956int
13957main ()
13958{
13959
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013960 unsigned short cw;
13961 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13962 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013963
13964 ;
13965 return 0;
13966}
13967_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013968if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013969 have_gcc_asm_for_x87=yes
13970else
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013972fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013973rm -f core conftest.err conftest.$ac_objext \
13974 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13976$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013977if test "$have_gcc_asm_for_x87" = yes
13978then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013981
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13985$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13987/* end confdefs.h. */
13988
13989int
13990main ()
13991{
13992
13993 unsigned int fpcr;
13994 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13995 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13996
13997 ;
13998 return 0;
13999}
14000_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014001if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014002 have_gcc_asm_for_mc68881=yes
14003else
14004 have_gcc_asm_for_mc68881=no
14005fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014006rm -f core conftest.err conftest.$ac_objext \
14007 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14009$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14010if test "$have_gcc_asm_for_mc68881" = yes
14011then
14012
14013$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14014
14015fi
14016
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014017# Detect whether system arithmetic is subject to x87-style double
14018# rounding issues. The result of this test has little meaning on non
14019# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14020# mode is round-to-nearest and double rounding issues are present, and
14021# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14023$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014024# $BASECFLAGS may affect the result
14025ac_save_cc="$CC"
14026CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014027if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014028 ac_cv_x87_double_rounding=no
14029else
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014031/* end confdefs.h. */
14032
14033#include <stdlib.h>
14034#include <math.h>
14035int main() {
14036 volatile double x, y, z;
14037 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14038 x = 0.99999999999999989; /* 1-2**-53 */
14039 y = 1./x;
14040 if (y != 1.)
14041 exit(0);
14042 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14043 x = 1e16;
14044 y = 2.99999;
14045 z = x + y;
14046 if (z != 1e16+4.)
14047 exit(0);
14048 /* both tests show evidence of double rounding */
14049 exit(1);
14050}
14051
14052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014053if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014054 ac_cv_x87_double_rounding=no
14055else
Matthias Kloseb9621712010-04-24 17:59:49 +000014056 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14059 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014060fi
14061
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014062CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14064$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014065if test "$ac_cv_x87_double_rounding" = yes
14066then
14067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014069
14070fi
14071
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014072# ************************************
14073# * Check for mathematical functions *
14074# ************************************
14075
14076LIBS_SAVE=$LIBS
14077LIBS="$LIBS $LIBM"
14078
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014079for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14080do :
14081 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14082ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014083if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014084 cat >>confdefs.h <<_ACEOF
14085#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14086_ACEOF
14087
14088fi
14089done
14090
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014091for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014092do :
14093 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14094ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014095if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014096 cat >>confdefs.h <<_ACEOF
14097#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14098_ACEOF
14099
14100fi
14101done
14102
14103ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14104"
Victor Stinnere0be4232011-10-25 13:06:09 +020014105if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014106 ac_have_decl=1
14107else
14108 ac_have_decl=0
14109fi
14110
14111cat >>confdefs.h <<_ACEOF
14112#define HAVE_DECL_ISINF $ac_have_decl
14113_ACEOF
14114ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14115"
Victor Stinnere0be4232011-10-25 13:06:09 +020014116if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014117 ac_have_decl=1
14118else
14119 ac_have_decl=0
14120fi
14121
14122cat >>confdefs.h <<_ACEOF
14123#define HAVE_DECL_ISNAN $ac_have_decl
14124_ACEOF
14125ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14126"
Victor Stinnere0be4232011-10-25 13:06:09 +020014127if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014128 ac_have_decl=1
14129else
14130 ac_have_decl=0
14131fi
14132
14133cat >>confdefs.h <<_ACEOF
14134#define HAVE_DECL_ISFINITE $ac_have_decl
14135_ACEOF
14136
14137
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014138# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14139# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14141$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014142if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014144else
14145
Matthias Kloseb9621712010-04-24 17:59:49 +000014146if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014147 ac_cv_tanh_preserves_zero_sign=no
14148else
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014150/* end confdefs.h. */
14151
14152#include <math.h>
14153#include <stdlib.h>
14154int main() {
14155 /* return 0 if either negative zeros don't exist
14156 on this platform or if negative zeros exist
14157 and tanh(-0.) == -0. */
14158 if (atan2(0., -1.) == atan2(-0., -1.) ||
14159 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14160 else exit(1);
14161}
14162
14163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014164if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014165 ac_cv_tanh_preserves_zero_sign=yes
14166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014171fi
14172
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014173fi
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14176$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014177if test "$ac_cv_tanh_preserves_zero_sign" = yes
14178then
14179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014181
14182fi
14183
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014184if test "$ac_cv_func_log1p" = yes
14185then
14186 # On some versions of AIX, log1p(-0.) returns 0. instead of
14187 # -0. See issue #9920.
14188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14189$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014190 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014191 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014192else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014194 if test "$cross_compiling" = yes; then :
14195 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014196else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14198/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014199
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014200 #include <math.h>
14201 #include <stdlib.h>
14202 int main() {
14203 /* Fail if the signs of log1p(-0.) and -0. can be
14204 distinguished. */
14205 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14206 return 0;
14207 else
14208 return 1;
14209 }
14210
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014211_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014212if ac_fn_c_try_run "$LINENO"; then :
14213 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014214else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014215 ac_cv_log1p_drops_zero_sign=yes
14216fi
14217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014219fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014220
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014221fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014222
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14224$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14225fi
14226if test "$ac_cv_log1p_drops_zero_sign" = yes
14227then
14228
14229$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14230
14231fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014232
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014233LIBS=$LIBS_SAVE
14234
Mark Dickinsona614f042009-11-28 12:48:43 +000014235# For multiprocessing module, check that sem_open
14236# actually works. For FreeBSD versions <= 7.2,
14237# the kernel module that provides POSIX semaphores
14238# isn't loaded by default, so an attempt to call
14239# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14241$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014242if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014246 ac_cv_posix_semaphores_enabled=yes
14247else
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014249/* end confdefs.h. */
14250
14251#include <unistd.h>
14252#include <fcntl.h>
14253#include <stdio.h>
14254#include <semaphore.h>
14255#include <sys/stat.h>
14256
14257int main(void) {
14258 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14259 if (a == SEM_FAILED) {
14260 perror("sem_open");
14261 return 1;
14262 }
14263 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014264 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014265 return 0;
14266}
14267
14268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014269if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014270 ac_cv_posix_semaphores_enabled=yes
14271else
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14275 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014276fi
14277
14278
Mark Dickinsona614f042009-11-28 12:48:43 +000014279fi
14280
Matthias Kloseb9621712010-04-24 17:59:49 +000014281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14282$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014283if test $ac_cv_posix_semaphores_enabled = no
14284then
14285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014287
14288fi
14289
Mark Dickinson10683072009-04-18 21:18:19 +000014290# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14292$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014293if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014294 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014295else
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014297 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014298else
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014300/* end confdefs.h. */
14301
14302#include <unistd.h>
14303#include <fcntl.h>
14304#include <stdio.h>
14305#include <semaphore.h>
14306#include <sys/stat.h>
14307
14308int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014309 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014310 int count;
14311 int res;
14312 if(a==SEM_FAILED){
14313 perror("sem_open");
14314 return 1;
14315
14316 }
14317 res = sem_getvalue(a, &count);
14318 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014319 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014320 return res==-1 ? 1 : 0;
14321}
14322
Mark Dickinson10683072009-04-18 21:18:19 +000014323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014324if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014325 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014326else
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14330 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014331fi
14332
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014333
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014334fi
14335
Matthias Kloseb9621712010-04-24 17:59:49 +000014336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14337$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338if test $ac_cv_broken_sem_getvalue = yes
14339then
14340
Matthias Kloseb9621712010-04-24 17:59:49 +000014341$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014342
14343fi
14344
Mark Dickinsonbd792642009-03-18 20:06:12 +000014345# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14347$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014348# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014350 enableval=$enable_big_digits; case $enable_big_digits in
14351yes)
14352 enable_big_digits=30 ;;
14353no)
14354 enable_big_digits=15 ;;
1435515|30)
14356 ;;
14357*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014358 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 +000014359esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14361$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014362
14363cat >>confdefs.h <<_ACEOF
14364#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14365_ACEOF
14366
14367
14368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14370$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014371fi
14372
14373
Guido van Rossumef2255b2000-03-10 22:30:29 +000014374# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014375ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014376if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
14378
Matthias Kloseb9621712010-04-24 17:59:49 +000014379$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014381 wchar_h="yes"
14382
Guido van Rossumef2255b2000-03-10 22:30:29 +000014383else
Martin v. Löwis11437992002-04-12 09:54:03 +000014384 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014385
14386fi
14387
Michael W. Hudson54241132001-12-07 15:38:26 +000014388
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014390# determine wchar_t size
14391if test "$wchar_h" = yes
14392then
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14396# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14398$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014399if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014401else
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14403"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405else
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 if test "$ac_cv_type_wchar_t" = yes; then
14407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014409as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014410See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014411 else
14412 ac_cv_sizeof_wchar_t=0
14413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014415
Martin v. Löwis11437992002-04-12 09:54:03 +000014416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14418$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419
14420
14421
Martin v. Löwis11437992002-04-12 09:54:03 +000014422cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014423#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014424_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014425
Michael W. Hudson54241132001-12-07 15:38:26 +000014426
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014427fi
14428
Matthias Kloseb9621712010-04-24 17:59:49 +000014429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14430$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014431have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014433/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014434
14435#include <tcl.h>
14436#if TCL_UTF_MAX != 6
14437# error "NOT UCS4_TCL"
14438#endif
14439int
14440main ()
14441{
14442
14443 ;
14444 return 0;
14445}
14446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014448
14449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014451
14452 have_ucs4_tcl=yes
14453
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14457$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014458
Skip Montanaro6dead952003-09-25 14:50:04 +000014459# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014460if test "$wchar_h" = yes
14461then
14462 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14464$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014465 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014467else
14468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014470 ac_cv_wchar_t_signed=yes
14471else
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014473/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014474
14475 #include <wchar.h>
14476 int main()
14477 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014478 /* Success: exit code 0 */
14479 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014480 }
14481
14482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014483if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014484 ac_cv_wchar_t_signed=yes
14485else
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014490fi
14491
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014492fi
14493
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14495$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496fi
14497
Georg Brandl52d168a2008-01-07 18:10:24 +000014498# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014499if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014500 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014501then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014502 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014505
Georg Brandl52d168a2008-01-07 18:10:24 +000014506else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014507 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014508fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14510$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014511
14512# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14514$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014515if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 ac_cv_c_bigendian=unknown
14519 # See if we're dealing with a universal compiler.
14520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14521/* end confdefs.h. */
14522#ifndef __APPLE_CC__
14523 not a universal capable compiler
14524 #endif
14525 typedef int dummy;
14526
Skip Montanaro6dead952003-09-25 14:50:04 +000014527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014528if ac_fn_c_try_compile "$LINENO"; then :
14529
14530 # Check for potential -arch flags. It is not universal unless
14531 # there are at least two -arch flags with different values.
14532 ac_arch=
14533 ac_prev=
14534 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14535 if test -n "$ac_prev"; then
14536 case $ac_word in
14537 i?86 | x86_64 | ppc | ppc64)
14538 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14539 ac_arch=$ac_word
14540 else
14541 ac_cv_c_bigendian=universal
14542 break
14543 fi
14544 ;;
14545 esac
14546 ac_prev=
14547 elif test "x$ac_word" = "x-arch"; then
14548 ac_prev=arch
14549 fi
14550 done
14551fi
14552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14553 if test $ac_cv_c_bigendian = unknown; then
14554 # See if sys/param.h defines the BYTE_ORDER macro.
14555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014556/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014557#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560int
14561main ()
14562{
Matthias Kloseb9621712010-04-24 17:59:49 +000014563#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14564 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14565 && LITTLE_ENDIAN)
14566 bogus endian macros
14567 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014568
14569 ;
14570 return 0;
14571}
14572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014573if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014574 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014576/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014577#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014579
Martin v. Löwis11437992002-04-12 09:54:03 +000014580int
14581main ()
14582{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014583#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014584 not big endian
14585 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587 ;
14588 return 0;
14589}
14590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014591if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014592 ac_cv_c_bigendian=yes
14593else
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014597fi
14598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14599 fi
14600 if test $ac_cv_c_bigendian = unknown; then
14601 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014603/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014604#include <limits.h>
14605
Martin v. Löwis11437992002-04-12 09:54:03 +000014606int
14607main ()
14608{
Matthias Kloseb9621712010-04-24 17:59:49 +000014609#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14610 bogus endian macros
14611 #endif
14612
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 ;
14614 return 0;
14615}
14616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014617if ac_fn_c_try_compile "$LINENO"; then :
14618 # It does; now see whether it defined to _BIG_ENDIAN or not.
14619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14620/* end confdefs.h. */
14621#include <limits.h>
14622
14623int
14624main ()
14625{
14626#ifndef _BIG_ENDIAN
14627 not big endian
14628 #endif
14629
14630 ;
14631 return 0;
14632}
14633_ACEOF
14634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014635 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14640fi
14641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14642 fi
14643 if test $ac_cv_c_bigendian = unknown; then
14644 # Compile a test program.
14645 if test "$cross_compiling" = yes; then :
14646 # Try to guess by grepping values from an object file.
14647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14648/* end confdefs.h. */
14649short int ascii_mm[] =
14650 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14651 short int ascii_ii[] =
14652 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14653 int use_ascii (int i) {
14654 return ascii_mm[i] + ascii_ii[i];
14655 }
14656 short int ebcdic_ii[] =
14657 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14658 short int ebcdic_mm[] =
14659 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14660 int use_ebcdic (int i) {
14661 return ebcdic_mm[i] + ebcdic_ii[i];
14662 }
14663 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665int
14666main ()
14667{
14668return use_ascii (foo) == use_ebcdic (foo);
14669 ;
14670 return 0;
14671}
14672_ACEOF
14673if ac_fn_c_try_compile "$LINENO"; then :
14674 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14675 ac_cv_c_bigendian=yes
14676 fi
14677 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14678 if test "$ac_cv_c_bigendian" = unknown; then
14679 ac_cv_c_bigendian=no
14680 else
14681 # finding both strings is unlikely to happen, but who knows?
14682 ac_cv_c_bigendian=unknown
14683 fi
14684 fi
14685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014687else
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014689/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014691int
14692main ()
14693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 /* Are we little or big endian? From Harbison&Steele. */
14696 union
14697 {
14698 long int l;
14699 char c[sizeof (long int)];
14700 } u;
14701 u.l = 1;
14702 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703
14704 ;
14705 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014706}
Martin v. Löwis11437992002-04-12 09:54:03 +000014707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014708if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014709 ac_cv_c_bigendian=no
14710else
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14714 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014716
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14720$as_echo "$ac_cv_c_bigendian" >&6; }
14721 case $ac_cv_c_bigendian in #(
14722 yes)
14723 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14724;; #(
14725 no)
14726 ;; #(
14727 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014728
Matthias Kloseb9621712010-04-24 17:59:49 +000014729$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 ;; #(
14732 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014733 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014734 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014736
Michael W. Hudson54241132001-12-07 15:38:26 +000014737
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014738# ABI version string for Python extension modules. This appears between the
14739# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14740# from the following attributes which affect the ABI of this Python build (in
14741# this order):
14742#
14743# * The Python implementation (always 'cpython-' for us)
14744# * The major and minor version numbers
14745# * --with-pydebug (adds a 'd')
14746# * --with-pymalloc (adds a 'm')
14747# * --with-wide-unicode (adds a 'u')
14748#
14749# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014750# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14751# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014752
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14754$as_echo_n "checking ABIFLAGS... " >&6; }
14755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14756$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14758$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014759SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14761$as_echo "$SOABI" >&6; }
14762
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014763
14764case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014765 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014766 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14767 *)
14768 EXT_SUFFIX=${SHLIB_SUFFIX};;
14769esac
14770
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14772$as_echo_n "checking LDVERSION... " >&6; }
14773LDVERSION='$(VERSION)$(ABIFLAGS)'
14774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14775$as_echo "$LDVERSION" >&6; }
14776
doko@python.org87421192013-01-26 11:39:31 +010014777
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014778LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014779
14780
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014781# Check whether right shifting a negative integer extends the sign bit
14782# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14784$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014785if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014787else
Martin v. Löwis11437992002-04-12 09:54:03 +000014788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014790 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014791else
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014793/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014794
14795int main()
14796{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014797 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014798}
14799
Martin v. Löwis11437992002-04-12 09:54:03 +000014800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014801if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014802 ac_cv_rshift_extends_sign=yes
14803else
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014808fi
14809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810fi
14811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14813$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014814if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014815then
Martin v. Löwis11437992002-04-12 09:54:03 +000014816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014818
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014819fi
14820
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014821# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14823$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014824if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014826else
Martin v. Löwis11437992002-04-12 09:54:03 +000014827
Matthias Kloseb9621712010-04-24 17:59:49 +000014828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014829/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014830#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014831int
14832main ()
14833{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014834
14835 FILE *f = fopen("/dev/null", "r");
14836 flockfile(f);
14837 getc_unlocked(f);
14838 funlockfile(f);
14839
Martin v. Löwis11437992002-04-12 09:54:03 +000014840 ;
14841 return 0;
14842}
14843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014844if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014845 ac_cv_have_getc_unlocked=yes
14846else
Matthias Kloseb9621712010-04-24 17:59:49 +000014847 ac_cv_have_getc_unlocked=no
14848fi
14849rm -f core conftest.err conftest.$ac_objext \
14850 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14854$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014855if test "$ac_cv_have_getc_unlocked" = yes
14856then
Martin v. Löwis11437992002-04-12 09:54:03 +000014857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014859
14860fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014861
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014862# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014863# save the value of LIBS so we don't actually link Python with readline
14864LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014865
Gregory P. Smith18820942008-09-07 06:24:49 +000014866# On some systems we need to link readline to a termcap compatible
14867# library. NOTE: Keep the precedence of listed libraries synchronised
14868# with setup.py.
14869py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14871$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014872for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014873 if test -z "$py_libtermcap"; then
14874 READLINE_LIBS="-lreadline"
14875 else
14876 READLINE_LIBS="-lreadline -l$py_libtermcap"
14877 fi
14878 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014880/* end confdefs.h. */
14881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882/* Override any GCC internal prototype to avoid an error.
14883 Use char because int might match the return type of a GCC
14884 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014885#ifdef __cplusplus
14886extern "C"
14887#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014888char readline ();
14889int
14890main ()
14891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014893 ;
14894 return 0;
14895}
14896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014897if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014898 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014900rm -f core conftest.err conftest.$ac_objext \
14901 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014902 if test $py_cv_lib_readline = yes; then
14903 break
14904 fi
14905done
14906# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14907#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014908if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14910$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014911else
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14913$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014916
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014917fi
14918
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014919# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14921$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014922if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014924else
14925 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014926LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014928/* end confdefs.h. */
14929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930/* Override any GCC internal prototype to avoid an error.
14931 Use char because int might match the return type of a GCC
14932 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014933#ifdef __cplusplus
14934extern "C"
14935#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014936char rl_callback_handler_install ();
14937int
14938main ()
14939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941 ;
14942 return 0;
14943}
14944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014945if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014946 ac_cv_lib_readline_rl_callback_handler_install=yes
14947else
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014950rm -f core conftest.err conftest.$ac_objext \
14951 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014952LIBS=$ac_check_lib_save_LIBS
14953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14955$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014956if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014957
Matthias Kloseb9621712010-04-24 17:59:49 +000014958$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014959
14960fi
14961
14962
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014963# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014965/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014966#include <readline/readline.h>
14967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014968if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014969 have_readline=yes
14970else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014972
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014973fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014974rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014975if test $have_readline = yes
14976then
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014978/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014979#include <readline/readline.h>
14980
14981_ACEOF
14982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014984
Matthias Kloseb9621712010-04-24 17:59:49 +000014985$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014986
14987fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014988rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014991/* end confdefs.h. */
14992#include <readline/readline.h>
14993
14994_ACEOF
14995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014997
Matthias Kloseb9621712010-04-24 17:59:49 +000014998$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014999
15000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015001rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015002
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015003fi
15004
Martin v. Löwis0daad592001-09-30 21:09:59 +000015005# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15007$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015008if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015010else
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015012LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016/* Override any GCC internal prototype to avoid an error.
15017 Use char because int might match the return type of a GCC
15018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015019#ifdef __cplusplus
15020extern "C"
15021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015022char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015023int
15024main ()
15025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 ;
15028 return 0;
15029}
15030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015033else
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015036rm -f core conftest.err conftest.$ac_objext \
15037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015038LIBS=$ac_check_lib_save_LIBS
15039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15041$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015042if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015043
Matthias Kloseb9621712010-04-24 17:59:49 +000015044$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015045
Martin v. Löwis0daad592001-09-30 21:09:59 +000015046fi
15047
Michael W. Hudson54241132001-12-07 15:38:26 +000015048
Thomas Wouters89d996e2007-09-08 17:39:28 +000015049# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15051$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015052if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015054else
15055 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015056LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015058/* end confdefs.h. */
15059
15060/* Override any GCC internal prototype to avoid an error.
15061 Use char because int might match the return type of a GCC
15062 builtin and then its argument prototype would still apply. */
15063#ifdef __cplusplus
15064extern "C"
15065#endif
15066char rl_completion_display_matches_hook ();
15067int
15068main ()
15069{
15070return rl_completion_display_matches_hook ();
15071 ;
15072 return 0;
15073}
15074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015075if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015076 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15077else
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015080rm -f core conftest.err conftest.$ac_objext \
15081 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015082LIBS=$ac_check_lib_save_LIBS
15083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15085$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015086if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015087
Matthias Kloseb9621712010-04-24 17:59:49 +000015088$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015089
15090fi
15091
15092
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015093# also in 4.0, but not in editline
15094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15095$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15096if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15097 $as_echo_n "(cached) " >&6
15098else
15099 ac_check_lib_save_LIBS=$LIBS
15100LIBS="-lreadline $READLINE_LIBS $LIBS"
15101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15102/* end confdefs.h. */
15103
15104/* Override any GCC internal prototype to avoid an error.
15105 Use char because int might match the return type of a GCC
15106 builtin and then its argument prototype would still apply. */
15107#ifdef __cplusplus
15108extern "C"
15109#endif
15110char rl_resize_terminal ();
15111int
15112main ()
15113{
15114return rl_resize_terminal ();
15115 ;
15116 return 0;
15117}
15118_ACEOF
15119if ac_fn_c_try_link "$LINENO"; then :
15120 ac_cv_lib_readline_rl_resize_terminal=yes
15121else
15122 ac_cv_lib_readline_rl_resize_terminal=no
15123fi
15124rm -f core conftest.err conftest.$ac_objext \
15125 conftest$ac_exeext conftest.$ac_ext
15126LIBS=$ac_check_lib_save_LIBS
15127fi
15128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15129$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15130if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15131
15132$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15133
15134fi
15135
15136
Martin v. Löwis0daad592001-09-30 21:09:59 +000015137# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15139$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015140if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015141 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015142else
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015144LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148/* Override any GCC internal prototype to avoid an error.
15149 Use char because int might match the return type of a GCC
15150 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015151#ifdef __cplusplus
15152extern "C"
15153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015154char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015155int
15156main ()
15157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 ;
15160 return 0;
15161}
15162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015165else
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015168rm -f core conftest.err conftest.$ac_objext \
15169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015170LIBS=$ac_check_lib_save_LIBS
15171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15173$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015174if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015177
Guido van Rossum353ae582001-07-10 16:45:32 +000015178fi
15179
Jack Jansendd19cf82001-12-06 22:36:17 +000015180
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015183/* end confdefs.h. */
15184#include <readline/readline.h>
15185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015186if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187 have_readline=yes
15188else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015190
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015191fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015192rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015193if test $have_readline = yes
15194then
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015196/* end confdefs.h. */
15197#include <readline/readline.h>
15198
15199_ACEOF
15200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015204
15205fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015206rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207
15208fi
15209
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15211$as_echo_n "checking for append_history in -lreadline... " >&6; }
15212if ${ac_cv_lib_readline_append_history+:} false; then :
15213 $as_echo_n "(cached) " >&6
15214else
15215 ac_check_lib_save_LIBS=$LIBS
15216LIBS="-lreadline $READLINE_LIBS $LIBS"
15217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15218/* end confdefs.h. */
15219
15220/* Override any GCC internal prototype to avoid an error.
15221 Use char because int might match the return type of a GCC
15222 builtin and then its argument prototype would still apply. */
15223#ifdef __cplusplus
15224extern "C"
15225#endif
15226char append_history ();
15227int
15228main ()
15229{
15230return append_history ();
15231 ;
15232 return 0;
15233}
15234_ACEOF
15235if ac_fn_c_try_link "$LINENO"; then :
15236 ac_cv_lib_readline_append_history=yes
15237else
15238 ac_cv_lib_readline_append_history=no
15239fi
15240rm -f core conftest.err conftest.$ac_objext \
15241 conftest$ac_exeext conftest.$ac_ext
15242LIBS=$ac_check_lib_save_LIBS
15243fi
15244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15245$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15246if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15247
15248$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15249
15250fi
15251
15252
Martin v. Löwis82bca632006-02-10 20:49:30 +000015253# End of readline checks: restore LIBS
15254LIBS=$LIBS_no_readline
15255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15257$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015258if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015260else
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Matthias Kloseb9621712010-04-24 17:59:49 +000015262if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015263 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015264else
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015266/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015267
15268int main()
15269{
15270 int val1 = nice(1);
15271 if (val1 != -1 && val1 == nice(2))
15272 exit(0);
15273 exit(1);
15274}
15275
Martin v. Löwis11437992002-04-12 09:54:03 +000015276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015277if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015278 ac_cv_broken_nice=yes
15279else
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15283 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015284fi
15285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286fi
15287
Matthias Kloseb9621712010-04-24 17:59:49 +000015288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15289$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015290if test "$ac_cv_broken_nice" = yes
15291then
Martin v. Löwis11437992002-04-12 09:54:03 +000015292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015294
15295fi
15296
Matthias Kloseb9621712010-04-24 17:59:49 +000015297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15298$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015299if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015301else
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015303 ac_cv_broken_poll=no
15304else
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015306/* end confdefs.h. */
15307
15308#include <poll.h>
15309
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015310int main()
15311{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015312 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015313 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314
15315 close (42);
15316
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015317 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015318 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015319 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015320 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015321 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015322 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015323 return 1;
15324}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015325
15326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015327if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328 ac_cv_broken_poll=yes
15329else
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15333 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015335
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015336fi
15337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15339$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340if test "$ac_cv_broken_poll" = yes
15341then
15342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015344
15345fi
15346
Brett Cannon43802422005-02-10 20:48:03 +000015347# 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 +000015348# (which is not required by ISO C or UNIX spec) and/or if we support
15349# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015350ac_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 +000015351#include <$ac_cv_struct_tm>
15352
Matthias Kloseb9621712010-04-24 17:59:49 +000015353"
Victor Stinnere0be4232011-10-25 13:06:09 +020015354if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015355
15356cat >>confdefs.h <<_ACEOF
15357#define HAVE_STRUCT_TM_TM_ZONE 1
15358_ACEOF
15359
15360
15361fi
15362
15363if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015366
15367else
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15369"
Victor Stinnere0be4232011-10-25 13:06:09 +020015370if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374fi
15375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015377#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378_ACEOF
15379
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15381$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015382if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384else
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015386/* end confdefs.h. */
15387#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388#if !HAVE_DECL_TZNAME
15389extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015390#endif
15391
15392int
15393main ()
15394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015396 ;
15397 return 0;
15398}
15399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015400if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015401 ac_cv_var_tzname=yes
15402else
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015405rm -f core conftest.err conftest.$ac_objext \
15406 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15409$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015410 if test $ac_cv_var_tzname = yes; then
15411
Matthias Kloseb9621712010-04-24 17:59:49 +000015412$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015413
15414 fi
15415fi
15416
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015417
Martin v. Löwis1d459062005-03-14 21:23:33 +000015418# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15420$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015421if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015423else
15424
Matthias Kloseb9621712010-04-24 17:59:49 +000015425if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015426 ac_cv_working_tzset=no
15427else
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015429/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015430
15431#include <stdlib.h>
15432#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015433#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015434
15435#if HAVE_TZNAME
15436extern char *tzname[];
15437#endif
15438
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015439int main()
15440{
Brett Cannon18367812003-09-19 00:59:16 +000015441 /* Note that we need to ensure that not only does tzset(3)
15442 do 'something' with localtime, but it works as documented
15443 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015444 This includes making sure that tzname is set properly if
15445 tm->tm_zone does not exist since it is the alternative way
15446 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015447
15448 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015449 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015450 */
15451
Martin v. Löwis1d459062005-03-14 21:23:33 +000015452 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015453 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15454
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015455 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015456 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015457 if (localtime(&groundhogday)->tm_hour != 0)
15458 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015459#if HAVE_TZNAME
15460 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15461 if (strcmp(tzname[0], "UTC") ||
15462 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15463 exit(1);
15464#endif
Brett Cannon18367812003-09-19 00:59:16 +000015465
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015466 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015467 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015468 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015469 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015470#if HAVE_TZNAME
15471 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15472 exit(1);
15473#endif
Brett Cannon18367812003-09-19 00:59:16 +000015474
15475 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15476 tzset();
15477 if (localtime(&groundhogday)->tm_hour != 11)
15478 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015479#if HAVE_TZNAME
15480 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15481 exit(1);
15482#endif
15483
15484#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015485 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15486 exit(1);
15487 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15488 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015489#endif
Brett Cannon18367812003-09-19 00:59:16 +000015490
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015491 exit(0);
15492}
15493
15494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015495if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015496 ac_cv_working_tzset=yes
15497else
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15501 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015502fi
15503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504fi
15505
Matthias Kloseb9621712010-04-24 17:59:49 +000015506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15507$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015508if test "$ac_cv_working_tzset" = yes
15509then
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015512
15513fi
15514
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015515# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15517$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015518if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015522/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015523#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015524int
15525main ()
15526{
15527
15528struct stat st;
15529st.st_mtim.tv_nsec = 1;
15530
15531 ;
15532 return 0;
15533}
15534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015536 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15541fi
15542
Matthias Kloseb9621712010-04-24 17:59:49 +000015543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15544$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015545if test "$ac_cv_stat_tv_nsec" = yes
15546then
15547
Matthias Kloseb9621712010-04-24 17:59:49 +000015548$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015549
15550fi
15551
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015552# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15554$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015555if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015557else
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015559/* end confdefs.h. */
15560#include <sys/stat.h>
15561int
15562main ()
15563{
15564
15565struct stat st;
15566st.st_mtimespec.tv_nsec = 1;
15567
15568 ;
15569 return 0;
15570}
15571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015573 ac_cv_stat_tv_nsec2=yes
15574else
Matthias Kloseb9621712010-04-24 17:59:49 +000015575 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15578fi
15579
Matthias Kloseb9621712010-04-24 17:59:49 +000015580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15581$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015582if test "$ac_cv_stat_tv_nsec2" = yes
15583then
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015586
15587fi
15588
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015589# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015590ac_save_cppflags="$CPPFLAGS"
15591CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015592
15593for ac_header in curses.h ncurses.h
15594do :
15595 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15596ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15597if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15598 cat >>confdefs.h <<_ACEOF
15599#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15600_ACEOF
15601
15602fi
15603
15604done
15605
15606
15607# On Solaris, term.h requires curses.h
15608for ac_header in term.h
15609do :
15610 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15611#ifdef HAVE_CURSES_H
15612#include <curses.h>
15613#endif
15614
15615"
15616if test "x$ac_cv_header_term_h" = xyes; then :
15617 cat >>confdefs.h <<_ACEOF
15618#define HAVE_TERM_H 1
15619_ACEOF
15620
15621fi
15622
15623done
15624
15625
Jack Jansen666b1e72001-10-31 12:11:48 +000015626# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15628$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015629if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015631else
Matthias Kloseb9621712010-04-24 17:59:49 +000015632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015633/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015634#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015635int
15636main ()
15637{
Jack Jansen666b1e72001-10-31 12:11:48 +000015638
15639 int rtn;
15640 rtn = mvwdelch(0,0,0);
15641
Martin v. Löwis11437992002-04-12 09:54:03 +000015642 ;
15643 return 0;
15644}
15645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015646if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015647 ac_cv_mvwdelch_is_expression=yes
15648else
Matthias Kloseb9621712010-04-24 17:59:49 +000015649 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15652fi
15653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15655$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015656
15657if test "$ac_cv_mvwdelch_is_expression" = yes
15658then
Martin v. Löwis11437992002-04-12 09:54:03 +000015659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015661
15662fi
15663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15665$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015666if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015668else
Matthias Kloseb9621712010-04-24 17:59:49 +000015669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015670/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015671#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015672int
15673main ()
15674{
Jack Jansen666b1e72001-10-31 12:11:48 +000015675
15676 WINDOW *w;
15677 w->_flags = 0;
15678
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 ;
15680 return 0;
15681}
15682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015683if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015684 ac_cv_window_has_flags=yes
15685else
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15689fi
15690
Matthias Kloseb9621712010-04-24 17:59:49 +000015691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15692$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015693
Jack Jansen666b1e72001-10-31 12:11:48 +000015694
15695if test "$ac_cv_window_has_flags" = yes
15696then
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
Matthias Kloseb9621712010-04-24 17:59:49 +000015698$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015699
15700fi
15701
Matthias Kloseb9621712010-04-24 17:59:49 +000015702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15703$as_echo_n "checking for is_term_resized... " >&6; }
15704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015705/* end confdefs.h. */
15706#include <curses.h>
15707int
15708main ()
15709{
15710void *x=is_term_resized
15711 ;
15712 return 0;
15713}
15714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015716
Matthias Kloseb9621712010-04-24 17:59:49 +000015717$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015718
Matthias Kloseb159a552010-04-25 21:00:44 +000015719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015720$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015721else
Matthias Kloseb9621712010-04-24 17:59:49 +000015722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15723$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015724
15725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15729$as_echo_n "checking for resize_term... " >&6; }
15730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015731/* end confdefs.h. */
15732#include <curses.h>
15733int
15734main ()
15735{
15736void *x=resize_term
15737 ;
15738 return 0;
15739}
15740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015741if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015742
Matthias Kloseb9621712010-04-24 17:59:49 +000015743$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015744
Matthias Kloseb159a552010-04-25 21:00:44 +000015745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015746$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015747else
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15749$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015750
15751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15755$as_echo_n "checking for resizeterm... " >&6; }
15756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015757/* end confdefs.h. */
15758#include <curses.h>
15759int
15760main ()
15761{
15762void *x=resizeterm
15763 ;
15764 return 0;
15765}
15766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015767if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015768
Matthias Kloseb9621712010-04-24 17:59:49 +000015769$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015770
Matthias Kloseb159a552010-04-25 21:00:44 +000015771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015772$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015773else
Matthias Kloseb9621712010-04-24 17:59:49 +000015774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15775$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015776
15777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015779# last curses configure check
15780CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15783$as_echo "$as_me: checking for device files" >&6;}
15784
15785if test "x$cross_compiling" = xyes; then
15786 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15788$as_echo_n "checking for /dev/ptmx... " >&6; }
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15790$as_echo "not set" >&6; }
15791 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15792 fi
15793 if test "${ac_cv_file__dev_ptc+set}" != set; then
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15795$as_echo_n "checking for /dev/ptc... " >&6; }
15796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15797$as_echo "not set" >&6; }
15798 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15799 fi
15800fi
15801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15803$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015804if ${ac_cv_file__dev_ptmx+:} false; then :
15805 $as_echo_n "(cached) " >&6
15806else
15807 test "$cross_compiling" = yes &&
15808 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15809if test -r "/dev/ptmx"; then
15810 ac_cv_file__dev_ptmx=yes
15811else
15812 ac_cv_file__dev_ptmx=no
15813fi
15814fi
15815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15816$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15817if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015818
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015819fi
15820
15821if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015824
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15827$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015828if ${ac_cv_file__dev_ptc+:} false; then :
15829 $as_echo_n "(cached) " >&6
15830else
15831 test "$cross_compiling" = yes &&
15832 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15833if test -r "/dev/ptc"; then
15834 ac_cv_file__dev_ptc=yes
15835else
15836 ac_cv_file__dev_ptc=no
15837fi
15838fi
15839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15840$as_echo "$ac_cv_file__dev_ptc" >&6; }
15841if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015842
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015843fi
15844
15845if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015846
Matthias Kloseb9621712010-04-24 17:59:49 +000015847$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015848
Neal Norwitz865400f2003-03-21 01:42:58 +000015849fi
15850
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015851if test "$have_long_long" = yes
15852then
Matthias Kloseb9621712010-04-24 17:59:49 +000015853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15854$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015855 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015856 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015857else
Matthias Kloseb9621712010-04-24 17:59:49 +000015858 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015859 ac_cv_have_long_long_format="cross -- assuming no"
15860 if test x$GCC = xyes; then
15861 save_CFLAGS=$CFLAGS
15862 CFLAGS="$CFLAGS -Werror -Wformat"
15863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15864/* end confdefs.h. */
15865
15866 #include <stdio.h>
15867 #include <stddef.h>
15868
15869int
15870main ()
15871{
15872
15873 char *buffer;
15874 sprintf(buffer, "%lld", (long long)123);
15875 sprintf(buffer, "%lld", (long long)-123);
15876 sprintf(buffer, "%llu", (unsigned long long)123);
15877
15878 ;
15879 return 0;
15880}
15881_ACEOF
15882if ac_fn_c_try_compile "$LINENO"; then :
15883 ac_cv_have_long_long_format=yes
15884
15885fi
15886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15887 CFLAGS=$save_CFLAGS
15888 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015889else
Matthias Kloseb9621712010-04-24 17:59:49 +000015890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015891/* end confdefs.h. */
15892
15893 #include <stdio.h>
15894 #include <stddef.h>
15895 #include <string.h>
15896
15897 #ifdef HAVE_SYS_TYPES_H
15898 #include <sys/types.h>
15899 #endif
15900
15901 int main()
15902 {
15903 char buffer[256];
15904
15905 if (sprintf(buffer, "%lld", (long long)123) < 0)
15906 return 1;
15907 if (strcmp(buffer, "123"))
15908 return 1;
15909
15910 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15911 return 1;
15912 if (strcmp(buffer, "-123"))
15913 return 1;
15914
15915 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15916 return 1;
15917 if (strcmp(buffer, "123"))
15918 return 1;
15919
15920 return 0;
15921 }
15922
15923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015924if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015925 ac_cv_have_long_long_format=yes
15926else
Matthias Kloseb9621712010-04-24 17:59:49 +000015927 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15930 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015931fi
15932
15933
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015934fi
15935
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15937$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015938fi
15939
Mark Dickinson89d7d412009-12-31 20:50:59 +000015940if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015941then
15942
Matthias Kloseb9621712010-04-24 17:59:49 +000015943$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015944
15945fi
15946
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015947if test $ac_sys_system = Darwin
15948then
15949 LIBS="$LIBS -framework CoreFoundation"
15950fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15953$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015954if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015955 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015956else
Matthias Kloseb9621712010-04-24 17:59:49 +000015957 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015958 ac_cv_have_size_t_format="cross -- assuming yes"
15959
Thomas Wouters477c8d52006-05-27 19:21:47 +000015960else
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015962/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015963
Thomas Wouters477c8d52006-05-27 19:21:47 +000015964#include <stdio.h>
15965#include <stddef.h>
15966#include <string.h>
15967
Christian Heimes2c181612007-12-17 20:04:13 +000015968#ifdef HAVE_SYS_TYPES_H
15969#include <sys/types.h>
15970#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015971
15972#ifdef HAVE_SSIZE_T
15973typedef ssize_t Py_ssize_t;
15974#elif SIZEOF_VOID_P == SIZEOF_LONG
15975typedef long Py_ssize_t;
15976#else
15977typedef int Py_ssize_t;
15978#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015979
Christian Heimes2c181612007-12-17 20:04:13 +000015980int main()
15981{
15982 char buffer[256];
15983
Thomas Wouters477c8d52006-05-27 19:21:47 +000015984 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15985 return 1;
15986
Thomas Wouters89f507f2006-12-13 04:49:30 +000015987 if (strcmp(buffer, "123"))
15988 return 1;
15989
15990 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15991 return 1;
15992
15993 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015994 return 1;
15995
15996 return 0;
15997}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015998
Thomas Wouters477c8d52006-05-27 19:21:47 +000015999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016000if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016001 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016002else
Matthias Kloseb9621712010-04-24 17:59:49 +000016003 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16006 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016007fi
16008
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16011$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016012if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016013
Matthias Kloseb9621712010-04-24 17:59:49 +000016014$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016015
16016fi
16017
Matthias Kloseb9621712010-04-24 17:59:49 +000016018ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016019#ifdef HAVE_SYS_TYPES_H
16020#include <sys/types.h>
16021#endif
16022#ifdef HAVE_SYS_SOCKET_H
16023#include <sys/socket.h>
16024#endif
16025
Matthias Kloseb9621712010-04-24 17:59:49 +000016026"
Victor Stinnere0be4232011-10-25 13:06:09 +020016027if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016032
16033fi
16034
Michael W. Hudson54241132001-12-07 15:38:26 +000016035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16037$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016038if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016039 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016040else
Matthias Kloseb9621712010-04-24 17:59:49 +000016041 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016042 ac_cv_broken_mbstowcs=no
16043else
Matthias Kloseb9621712010-04-24 17:59:49 +000016044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016045/* end confdefs.h. */
16046
Stefan Krah19c21392012-11-22 23:47:32 +010016047#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016048#include<stdlib.h>
16049int main() {
16050 size_t len = -1;
16051 const char *str = "text";
16052 len = mbstowcs(NULL, str, 0);
16053 return (len != 4);
16054}
16055
16056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016057if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016058 ac_cv_broken_mbstowcs=no
16059else
Matthias Kloseb9621712010-04-24 17:59:49 +000016060 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016064fi
16065
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016066fi
16067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16069$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016070if test "$ac_cv_broken_mbstowcs" = yes
16071then
16072
Matthias Kloseb9621712010-04-24 17:59:49 +000016073$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016074
16075fi
16076
Antoine Pitroub52ec782009-01-25 16:34:23 +000016077# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16079$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016080
16081# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016082if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016083 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016084if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016085then
16086
Matthias Kloseb9621712010-04-24 17:59:49 +000016087$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016088
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16090$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016091fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016092if test "$withval" = no
16093then
16094
16095$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16096
Matthias Kloseb9621712010-04-24 17:59:49 +000016097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16098$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016099fi
16100
Antoine Pitrou042b1282010-08-13 21:15:58 +000016101else
16102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16103$as_echo "no value specified" >&6; }
16104fi
16105
Antoine Pitroub52ec782009-01-25 16:34:23 +000016106
Matthias Kloseb17289e2012-03-15 19:51:34 +010016107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16108$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16109if ${ac_cv_computed_gotos+:} false; then :
16110 $as_echo_n "(cached) " >&6
16111else
16112 if test "$cross_compiling" = yes; then :
16113 if test "${with_computed_gotos+set}" = set; then
16114 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16115 else
16116 ac_cv_computed_gotos=no
16117 fi
16118else
16119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16120/* end confdefs.h. */
16121
16122int main(int argc, char **argv)
16123{
16124 static void *targets[1] = { &&LABEL1 };
16125 goto LABEL2;
16126LABEL1:
16127 return 0;
16128LABEL2:
16129 goto *targets[0];
16130 return 1;
16131}
16132
16133_ACEOF
16134if ac_fn_c_try_run "$LINENO"; then :
16135 ac_cv_computed_gotos=yes
16136else
16137 ac_cv_computed_gotos=no
16138fi
16139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16140 conftest.$ac_objext conftest.beam conftest.$ac_ext
16141fi
16142
16143fi
16144
16145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16146$as_echo "$ac_cv_computed_gotos" >&6; }
16147case "$ac_cv_computed_gotos" in yes*)
16148
16149$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16150
16151esac
16152
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016153case $ac_sys_system in
16154AIX*)
16155
16156$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16157 ;;
16158esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016159
Michael W. Hudson54241132001-12-07 15:38:26 +000016160
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016161
16162
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016163for h in `(cd $srcdir;echo Python/thread_*.h)`
16164do
16165 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16166done
16167
Michael W. Hudson54241132001-12-07 15:38:26 +000016168
Ned Deily0db50cf2014-07-25 12:41:31 -070016169SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16171$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016172for dir in $SRCDIRS; do
16173 if test ! -d $dir; then
16174 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016175 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016176done
Matthias Kloseb9621712010-04-24 17:59:49 +000016177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16178$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016179
Stefan Krah1919b7e2012-03-21 18:25:23 +010016180# Availability of -O2:
16181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16182$as_echo_n "checking for -O2... " >&6; }
16183saved_cflags="$CFLAGS"
16184CFLAGS="-O2"
16185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16186/* end confdefs.h. */
16187
16188int
16189main ()
16190{
16191
16192
16193 ;
16194 return 0;
16195}
16196_ACEOF
16197if ac_fn_c_try_compile "$LINENO"; then :
16198 have_O2=yes
16199else
16200 have_O2=no
16201fi
16202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16204$as_echo "$have_O2" >&6; }
16205CFLAGS="$saved_cflags"
16206
16207# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16208# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16210$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16211saved_cflags="$CFLAGS"
16212CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16213if test "$have_O2" = no; then
16214 CFLAGS=""
16215fi
16216if test "$cross_compiling" = yes; then :
16217 have_glibc_memmove_bug=undefined
16218else
16219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16220/* end confdefs.h. */
16221
16222#include <stdio.h>
16223#include <stdlib.h>
16224#include <string.h>
16225void foo(void *p, void *q) { memmove(p, q, 19); }
16226int main() {
16227 char a[32] = "123456789000000000";
16228 foo(&a[9], a);
16229 if (strcmp(a, "123456789123456789000000000") != 0)
16230 return 1;
16231 foo(a, &a[9]);
16232 if (strcmp(a, "123456789000000000") != 0)
16233 return 1;
16234 return 0;
16235}
16236
16237_ACEOF
16238if ac_fn_c_try_run "$LINENO"; then :
16239 have_glibc_memmove_bug=no
16240else
16241 have_glibc_memmove_bug=yes
16242fi
16243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16244 conftest.$ac_objext conftest.beam conftest.$ac_ext
16245fi
16246
16247CFLAGS="$saved_cflags"
16248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16249$as_echo "$have_glibc_memmove_bug" >&6; }
16250if test "$have_glibc_memmove_bug" = yes; then
16251
16252$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16253
16254fi
16255
16256if test "$have_gcc_asm_for_x87" = yes; then
16257 # Some versions of gcc miscompile inline asm:
16258 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16259 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16260 case $CC in
16261 *gcc*)
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16263$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16264 saved_cflags="$CFLAGS"
16265 CFLAGS="-O2"
16266 if test "$cross_compiling" = yes; then :
16267 have_ipa_pure_const_bug=undefined
16268else
16269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16270/* end confdefs.h. */
16271
16272 __attribute__((noinline)) int
16273 foo(int *p) {
16274 int r;
16275 asm ( "movl \$6, (%1)\n\t"
16276 "xorl %0, %0\n\t"
16277 : "=r" (r) : "r" (p) : "memory"
16278 );
16279 return r;
16280 }
16281 int main() {
16282 int p = 8;
16283 if ((foo(&p) ? : p) != 6)
16284 return 1;
16285 return 0;
16286 }
16287
16288_ACEOF
16289if ac_fn_c_try_run "$LINENO"; then :
16290 have_ipa_pure_const_bug=no
16291else
16292 have_ipa_pure_const_bug=yes
16293fi
16294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16295 conftest.$ac_objext conftest.beam conftest.$ac_ext
16296fi
16297
16298 CFLAGS="$saved_cflags"
16299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16300$as_echo "$have_ipa_pure_const_bug" >&6; }
16301 if test "$have_ipa_pure_const_bug" = yes; then
16302
16303$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16304
16305 fi
16306 ;;
16307 esac
16308fi
16309
Victor Stinner4f5366e2015-01-09 02:13:19 +010016310# Check for stdatomic.h
16311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16312$as_echo_n "checking for stdatomic.h... " >&6; }
16313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314/* end confdefs.h. */
16315
16316
16317 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016318 atomic_int value = ATOMIC_VAR_INIT(1);
16319 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016320 int main() {
16321 int loaded_value = atomic_load(&value);
16322 return 0;
16323 }
16324
16325
16326_ACEOF
16327if ac_fn_c_try_link "$LINENO"; then :
16328 have_stdatomic_h=yes
16329else
16330 have_stdatomic_h=no
16331fi
16332rm -f core conftest.err conftest.$ac_objext \
16333 conftest$ac_exeext conftest.$ac_ext
16334
16335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16336$as_echo "$have_stdatomic_h" >&6; }
16337
16338if test "$have_stdatomic_h" = yes; then
16339
16340$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16341
16342fi
16343
16344# Check for GCC >= 4.7 __atomic builtins
16345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16346$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16348/* end confdefs.h. */
16349
16350
16351 volatile int val = 1;
16352 int main() {
16353 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16354 return 0;
16355 }
16356
16357
16358_ACEOF
16359if ac_fn_c_try_link "$LINENO"; then :
16360 have_builtin_atomic=yes
16361else
16362 have_builtin_atomic=no
16363fi
16364rm -f core conftest.err conftest.$ac_objext \
16365 conftest$ac_exeext conftest.$ac_ext
16366
16367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16368$as_echo "$have_builtin_atomic" >&6; }
16369
16370if test "$have_builtin_atomic" = yes; then
16371
16372$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16373
16374fi
16375
Ned Deily322f5ba2013-11-21 23:01:59 -080016376# ensurepip option
16377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16378$as_echo_n "checking for ensurepip... " >&6; }
16379
16380# Check whether --with-ensurepip was given.
16381if test "${with_ensurepip+set}" = set; then :
16382 withval=$with_ensurepip;
16383else
16384 with_ensurepip=upgrade
16385fi
16386
16387case $with_ensurepip in #(
16388 yes|upgrade) :
16389 ENSUREPIP=upgrade ;; #(
16390 install) :
16391 ENSUREPIP=install ;; #(
16392 no) :
16393 ENSUREPIP=no ;; #(
16394 *) :
16395 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16396esac
16397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16398$as_echo "$ENSUREPIP" >&6; }
16399
16400
Victor Stinner35a97c02015-03-08 02:59:09 +010016401# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16403$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16405/* end confdefs.h. */
16406
16407
16408 #include <dirent.h>
16409
16410 int main() {
16411 struct dirent entry;
16412 return entry.d_type == DT_UNKNOWN;
16413 }
16414
16415
16416_ACEOF
16417if ac_fn_c_try_link "$LINENO"; then :
16418 have_dirent_d_type=yes
16419else
16420 have_dirent_d_type=no
16421fi
16422rm -f core conftest.err conftest.$ac_objext \
16423 conftest$ac_exeext conftest.$ac_ext
16424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16425$as_echo "$have_dirent_d_type" >&6; }
16426
16427if test "$have_dirent_d_type" = yes; then
16428
16429$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16430
16431fi
16432
Victor Stinner9eb57c52015-03-19 22:21:49 +010016433# check if the Linux getrandom() syscall is available
16434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16435$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16437/* end confdefs.h. */
16438
16439
Victor Stinner1b80b242016-04-12 22:34:58 +020016440 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016441 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016442 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016443
16444 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016445 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016446 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016447 const int flags = GRND_NONBLOCK;
16448 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016449 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016450 return 0;
16451 }
16452
16453
16454_ACEOF
16455if ac_fn_c_try_link "$LINENO"; then :
16456 have_getrandom_syscall=yes
16457else
16458 have_getrandom_syscall=no
16459fi
16460rm -f core conftest.err conftest.$ac_objext \
16461 conftest$ac_exeext conftest.$ac_ext
16462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16463$as_echo "$have_getrandom_syscall" >&6; }
16464
16465if test "$have_getrandom_syscall" = yes; then
16466
16467$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16468
16469fi
16470
Victor Stinnerbae2d622015-10-01 09:47:30 +020016471# check if the getrandom() function is available
16472# the test was written for the Solaris function of <sys/random.h>
16473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16474$as_echo_n "checking for the getrandom() function... " >&6; }
16475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16476/* end confdefs.h. */
16477
16478
16479 #include <sys/random.h>
16480
16481 int main() {
16482 char buffer[1];
16483 const size_t buflen = sizeof(buffer);
16484 const int flags = 0;
16485 /* ignore the result, Python checks for ENOSYS at runtime */
16486 (void)getrandom(buffer, buflen, flags);
16487 return 0;
16488 }
16489
16490
16491_ACEOF
16492if ac_fn_c_try_link "$LINENO"; then :
16493 have_getrandom=yes
16494else
16495 have_getrandom=no
16496fi
16497rm -f core conftest.err conftest.$ac_objext \
16498 conftest$ac_exeext conftest.$ac_ext
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16500$as_echo "$have_getrandom" >&6; }
16501
16502if test "$have_getrandom" = yes; then
16503
16504$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16505
16506fi
16507
Guido van Rossum627b2d71993-12-24 10:39:16 +000016508# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016509ac_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 +000016510
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016511ac_config_files="$ac_config_files Modules/ld_so_aix"
16512
Martin v. Löwis11437992002-04-12 09:54:03 +000016513cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016514# This file is a shell script that caches the results of configure
16515# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016516# scripts and configure runs, see configure's option --config-cache.
16517# It is not useful on other systems. If it contains results you don't
16518# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016519#
Martin v. Löwis11437992002-04-12 09:54:03 +000016520# config.status only pays attention to the cache file if you give it
16521# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016522#
Skip Montanaro6dead952003-09-25 14:50:04 +000016523# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016524# loading this file, other *unset* `ac_cv_foo' will be assigned the
16525# following values.
16526
16527_ACEOF
16528
Guido van Rossumf78abae1997-01-21 22:02:36 +000016529# The following way of writing the cache mishandles newlines in values,
16530# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016532# Ultrix sh set writes to stderr and can't be redirected directly,
16533# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534(
16535 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16536 eval ac_val=\$$ac_var
16537 case $ac_val in #(
16538 *${as_nl}*)
16539 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016540 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16541$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542 esac
16543 case $ac_var in #(
16544 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16546 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016547 esac ;;
16548 esac
16549 done
16550
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16553 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016554 # `set' does not quote correctly, so add quotes: double-quote
16555 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016557 "s/'/'\\\\''/g;
16558 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016559 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 *)
16561 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016563 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 esac |
16565 sort
16566) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016567 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016569 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016571 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16572 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16574 :end' >>confcache
16575if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16576 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016577 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016578 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16579$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016580 if test ! -f "$cache_file" || test -h "$cache_file"; then
16581 cat confcache >"$cache_file"
16582 else
16583 case $cache_file in #(
16584 */* | ?:*)
16585 mv -f confcache "$cache_file"$$ &&
16586 mv -f "$cache_file"$$ "$cache_file" ;; #(
16587 *)
16588 mv -f confcache "$cache_file" ;;
16589 esac
16590 fi
16591 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016592 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016593 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16594$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016595 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016596fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016597rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016599test "x$prefix" = xNONE && prefix=$ac_default_prefix
16600# Let make expand exec_prefix.
16601test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016602
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016603DEFS=-DHAVE_CONFIG_H
16604
Skip Montanaro6dead952003-09-25 14:50:04 +000016605ac_libobjs=
16606ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016607U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016608for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16609 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016612 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16613 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016614 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16615 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016616done
16617LIBOBJS=$ac_libobjs
16618
16619LTLIBOBJS=$ac_ltlibobjs
16620
16621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622
Matthias Kloseb9621712010-04-24 17:59:49 +000016623
Victor Stinnere0be4232011-10-25 13:06:09 +020016624: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016625ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016626ac_clean_files_save=$ac_clean_files
16627ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016628{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16629$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16630as_write_fail=0
16631cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016632#! $SHELL
16633# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016634# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016635# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016636# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016637
Martin v. Löwis11437992002-04-12 09:54:03 +000016638debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016639ac_cs_recheck=false
16640ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016641
Matthias Kloseb9621712010-04-24 17:59:49 +000016642SHELL=\${CONFIG_SHELL-$SHELL}
16643export SHELL
16644_ASEOF
16645cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16646## -------------------- ##
16647## M4sh Initialization. ##
16648## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016650# Be more Bourne compatible
16651DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016652if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016653 emulate sh
16654 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016655 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016656 # is contrary to our usage. Disable this feature.
16657 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016658 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016659else
Matthias Kloseb9621712010-04-24 17:59:49 +000016660 case `(set -o) 2>/dev/null` in #(
16661 *posix*) :
16662 set -o posix ;; #(
16663 *) :
16664 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016666fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016667
16668
Matthias Kloseb9621712010-04-24 17:59:49 +000016669as_nl='
16670'
16671export as_nl
16672# Printing a long string crashes Solaris 7 /usr/bin/printf.
16673as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16674as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16675as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16676# Prefer a ksh shell builtin over an external printf program on Solaris,
16677# but without wasting forks for bash or zsh.
16678if test -z "$BASH_VERSION$ZSH_VERSION" \
16679 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16680 as_echo='print -r --'
16681 as_echo_n='print -rn --'
16682elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16683 as_echo='printf %s\n'
16684 as_echo_n='printf %s'
16685else
16686 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16687 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16688 as_echo_n='/usr/ucb/echo -n'
16689 else
16690 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16691 as_echo_n_body='eval
16692 arg=$1;
16693 case $arg in #(
16694 *"$as_nl"*)
16695 expr "X$arg" : "X\\(.*\\)$as_nl";
16696 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16697 esac;
16698 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16699 '
16700 export as_echo_n_body
16701 as_echo_n='sh -c $as_echo_n_body as_echo'
16702 fi
16703 export as_echo_body
16704 as_echo='sh -c $as_echo_body as_echo'
16705fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016706
16707# The user is always right.
16708if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016709 PATH_SEPARATOR=:
16710 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16711 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16712 PATH_SEPARATOR=';'
16713 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716
16717# IFS
16718# We need space, tab and new line, in precisely that order. Quoting is
16719# there to prevent editors from complaining about space-tab.
16720# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16721# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722IFS=" "" $as_nl"
16723
16724# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016725as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016726case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727 *[\\/]* ) as_myself=$0 ;;
16728 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016729for as_dir in $PATH
16730do
16731 IFS=$as_save_IFS
16732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016733 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16734 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016735IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737 ;;
16738esac
16739# We did not find ourselves, most probably we were run as `sh COMMAND'
16740# in which case we are not to be found in the path.
16741if test "x$as_myself" = x; then
16742 as_myself=$0
16743fi
16744if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016745 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16746 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747fi
16748
Matthias Kloseb9621712010-04-24 17:59:49 +000016749# Unset variables that we do not need and which cause bugs (e.g. in
16750# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16751# suppresses any "Segmentation fault" message there. '((' could
16752# trigger a bug in pdksh 5.2.14.
16753for as_var in BASH_ENV ENV MAIL MAILPATH
16754do eval test x\${$as_var+set} = xset \
16755 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756done
16757PS1='$ '
16758PS2='> '
16759PS4='+ '
16760
16761# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016762LC_ALL=C
16763export LC_ALL
16764LANGUAGE=C
16765export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766
Matthias Kloseb9621712010-04-24 17:59:49 +000016767# CDPATH.
16768(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16769
16770
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016771# as_fn_error STATUS ERROR [LINENO LOG_FD]
16772# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016773# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16774# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016775# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016776as_fn_error ()
16777{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016778 as_status=$1; test $as_status -eq 0 && as_status=1
16779 if test "$4"; then
16780 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16781 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016782 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016783 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016784 as_fn_exit $as_status
16785} # as_fn_error
16786
16787
16788# as_fn_set_status STATUS
16789# -----------------------
16790# Set $? to STATUS, without forking.
16791as_fn_set_status ()
16792{
16793 return $1
16794} # as_fn_set_status
16795
16796# as_fn_exit STATUS
16797# -----------------
16798# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16799as_fn_exit ()
16800{
16801 set +e
16802 as_fn_set_status $1
16803 exit $1
16804} # as_fn_exit
16805
16806# as_fn_unset VAR
16807# ---------------
16808# Portably unset VAR.
16809as_fn_unset ()
16810{
16811 { eval $1=; unset $1;}
16812}
16813as_unset=as_fn_unset
16814# as_fn_append VAR VALUE
16815# ----------------------
16816# Append the text in VALUE to the end of the definition contained in VAR. Take
16817# advantage of any shell optimizations that allow amortized linear growth over
16818# repeated appends, instead of the typical quadratic growth present in naive
16819# implementations.
16820if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16821 eval 'as_fn_append ()
16822 {
16823 eval $1+=\$2
16824 }'
16825else
16826 as_fn_append ()
16827 {
16828 eval $1=\$$1\$2
16829 }
16830fi # as_fn_append
16831
16832# as_fn_arith ARG...
16833# ------------------
16834# Perform arithmetic evaluation on the ARGs, and store the result in the
16835# global $as_val. Take advantage of shells that can avoid forks. The arguments
16836# must be portable across $(()) and expr.
16837if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16838 eval 'as_fn_arith ()
16839 {
16840 as_val=$(( $* ))
16841 }'
16842else
16843 as_fn_arith ()
16844 {
16845 as_val=`expr "$@" || test $? -eq 1`
16846 }
16847fi # as_fn_arith
16848
16849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850if expr a : '\(a\)' >/dev/null 2>&1 &&
16851 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16852 as_expr=expr
16853else
16854 as_expr=false
16855fi
16856
16857if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16858 as_basename=basename
16859else
16860 as_basename=false
16861fi
16862
Matthias Kloseb9621712010-04-24 17:59:49 +000016863if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16864 as_dirname=dirname
16865else
16866 as_dirname=false
16867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869as_me=`$as_basename -- "$0" ||
16870$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16871 X"$0" : 'X\(//\)$' \| \
16872 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016873$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874 sed '/^.*\/\([^/][^/]*\)\/*$/{
16875 s//\1/
16876 q
16877 }
16878 /^X\/\(\/\/\)$/{
16879 s//\1/
16880 q
16881 }
16882 /^X\/\(\/\).*/{
16883 s//\1/
16884 q
16885 }
16886 s/.*/./; q'`
16887
Matthias Kloseb9621712010-04-24 17:59:49 +000016888# Avoid depending upon Character Ranges.
16889as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16890as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16891as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16892as_cr_digits='0123456789'
16893as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894
16895ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016896case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016898 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016900 xy) ECHO_C='\c';;
16901 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16902 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903 esac;;
16904*)
16905 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016907
Martin v. Löwis11437992002-04-12 09:54:03 +000016908rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909if test -d conf$$.dir; then
16910 rm -f conf$$.dir/conf$$.file
16911else
16912 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016913 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016915if (echo >conf$$.file) 2>/dev/null; then
16916 if ln -s conf$$.file conf$$ 2>/dev/null; then
16917 as_ln_s='ln -s'
16918 # ... but there are two gotchas:
16919 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16920 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016921 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016922 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016923 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016924 elif ln conf$$.file conf$$ 2>/dev/null; then
16925 as_ln_s=ln
16926 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016927 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016928 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016929else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016930 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16933rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016934
Matthias Kloseb9621712010-04-24 17:59:49 +000016935
16936# as_fn_mkdir_p
16937# -------------
16938# Create "$as_dir" as a directory, including parents if necessary.
16939as_fn_mkdir_p ()
16940{
16941
16942 case $as_dir in #(
16943 -*) as_dir=./$as_dir;;
16944 esac
16945 test -d "$as_dir" || eval $as_mkdir_p || {
16946 as_dirs=
16947 while :; do
16948 case $as_dir in #(
16949 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16950 *) as_qdir=$as_dir;;
16951 esac
16952 as_dirs="'$as_qdir' $as_dirs"
16953 as_dir=`$as_dirname -- "$as_dir" ||
16954$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16955 X"$as_dir" : 'X\(//\)[^/]' \| \
16956 X"$as_dir" : 'X\(//\)$' \| \
16957 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16958$as_echo X"$as_dir" |
16959 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16960 s//\1/
16961 q
16962 }
16963 /^X\(\/\/\)[^/].*/{
16964 s//\1/
16965 q
16966 }
16967 /^X\(\/\/\)$/{
16968 s//\1/
16969 q
16970 }
16971 /^X\(\/\).*/{
16972 s//\1/
16973 q
16974 }
16975 s/.*/./; q'`
16976 test -d "$as_dir" && break
16977 done
16978 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016979 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016980
16981
16982} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016983if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016984 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016985else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016986 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016987 as_mkdir_p=false
16988fi
16989
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016990
16991# as_fn_executable_p FILE
16992# -----------------------
16993# Test if FILE is an executable regular file.
16994as_fn_executable_p ()
16995{
16996 test -f "$1" && test -x "$1"
16997} # as_fn_executable_p
16998as_test_x='test -x'
16999as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017000
17001# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017002as_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 +000017003
17004# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017005as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017006
17007
Martin v. Löwis11437992002-04-12 09:54:03 +000017008exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017009## ----------------------------------- ##
17010## Main body of $CONFIG_STATUS script. ##
17011## ----------------------------------- ##
17012_ASEOF
17013test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017014
Matthias Kloseb9621712010-04-24 17:59:49 +000017015cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17016# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017017# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018# values after options handling.
17019ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040017020This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017021generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017022
17023 CONFIG_FILES = $CONFIG_FILES
17024 CONFIG_HEADERS = $CONFIG_HEADERS
17025 CONFIG_LINKS = $CONFIG_LINKS
17026 CONFIG_COMMANDS = $CONFIG_COMMANDS
17027 $ $0 $@
17028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029on `(hostname || uname -n) 2>/dev/null | sed 1q`
17030"
17031
Martin v. Löwis11437992002-04-12 09:54:03 +000017032_ACEOF
17033
Matthias Kloseb9621712010-04-24 17:59:49 +000017034case $ac_config_files in *"
17035"*) set x $ac_config_files; shift; ac_config_files=$*;;
17036esac
17037
17038case $ac_config_headers in *"
17039"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17040esac
17041
17042
17043cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017044# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017045config_files="$ac_config_files"
17046config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017049
Matthias Kloseb9621712010-04-24 17:59:49 +000017050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017051ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017052\`$as_me' instantiates files and other configuration actions
17053from templates according to the current configuration. Unless the files
17054and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017055
Matthias Kloseb9621712010-04-24 17:59:49 +000017056Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017057
17058 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017059 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017060 --config print configuration, then exit
17061 -q, --quiet, --silent
17062 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017063 -d, --debug don't remove temporary files
17064 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 --file=FILE[:TEMPLATE]
17066 instantiate the configuration file FILE
17067 --header=FILE[:TEMPLATE]
17068 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017069
17070Configuration files:
17071$config_files
17072
17073Configuration headers:
17074$config_headers
17075
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017076Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17080ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017081ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040017082python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017083configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017084 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017085
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017086Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017087This config.status script is free software; the Free Software Foundation
17088gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017089
17090ac_pwd='$ac_pwd'
17091srcdir='$srcdir'
17092INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017093MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017094test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017095_ACEOF
17096
Matthias Kloseb9621712010-04-24 17:59:49 +000017097cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17098# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017099ac_need_defaults=:
17100while test $# != 0
17101do
17102 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017103 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17105 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017106 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017107 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017108 --*=)
17109 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17110 ac_optarg=
17111 ac_shift=:
17112 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017113 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017114 ac_option=$1
17115 ac_optarg=$2
17116 ac_shift=shift
17117 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 esac
17119
Skip Montanaro6dead952003-09-25 14:50:04 +000017120 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017121 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017122 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17123 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017125 $as_echo "$ac_cs_version"; exit ;;
17126 --config | --confi | --conf | --con | --co | --c )
17127 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017128 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017129 debug=: ;;
17130 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017131 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017132 case $ac_optarg in
17133 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017134 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017135 esac
17136 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017137 ac_need_defaults=false;;
17138 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017139 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017140 case $ac_optarg in
17141 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17142 esac
17143 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017144 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145 --he | --h)
17146 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017147 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017148Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017149 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017151 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17152 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17153 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
17155 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017156 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017157Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017158
Matthias Kloseb9621712010-04-24 17:59:49 +000017159 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017161
17162 esac
17163 shift
17164done
17165
Skip Montanaro6dead952003-09-25 14:50:04 +000017166ac_configure_extra_args=
17167
17168if $ac_cs_silent; then
17169 exec 6>/dev/null
17170 ac_configure_extra_args="$ac_configure_extra_args --silent"
17171fi
17172
17173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017174cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017175if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017176 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017177 shift
17178 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17179 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017181 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017182fi
17183
Martin v. Löwis11437992002-04-12 09:54:03 +000017184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017185cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186exec 5>>config.log
17187{
17188 echo
17189 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17190## Running $as_me. ##
17191_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017192 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017196cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017198
Matthias Kloseb9621712010-04-24 17:59:49 +000017199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200
17201# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017202for ac_config_target in $ac_config_targets
17203do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204 case $ac_config_target in
17205 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17206 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17207 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017208 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17209 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17211 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017212 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017213 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017214 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215
Victor Stinnere0be4232011-10-25 13:06:09 +020017216 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017217 esac
17218done
17219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220
Martin v. Löwis11437992002-04-12 09:54:03 +000017221# If the user did not use the arguments to specify the items to instantiate,
17222# then the envvar interface is used. Set only those that are not.
17223# We use the long form for the default assignment because of an extremely
17224# bizarre bug on SunOS 4.1.3.
17225if $ac_need_defaults; then
17226 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17227 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17228fi
17229
Skip Montanaro6dead952003-09-25 14:50:04 +000017230# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017231# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017232# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017233# Hook for its removal unless debugging.
17234# Note that there is a small window in which the directory will not be cleaned:
17235# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017236$debug ||
17237{
Victor Stinnere0be4232011-10-25 13:06:09 +020017238 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017240 : "${ac_tmp:=$tmp}"
17241 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017243 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017244}
Martin v. Löwis11437992002-04-12 09:54:03 +000017245# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017246
Martin v. Löwis11437992002-04-12 09:54:03 +000017247{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017249 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017250} ||
17251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 tmp=./conf$$-$RANDOM
17253 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017254} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017255ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017256
Matthias Kloseb9621712010-04-24 17:59:49 +000017257# Set up the scripts for CONFIG_FILES section.
17258# No need to generate them if there are no CONFIG_FILES.
17259# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017261
Matthias Kloseb9621712010-04-24 17:59:49 +000017262
17263ac_cr=`echo X | tr X '\015'`
17264# On cygwin, bash can eat \r inside `` if the user requested igncr.
17265# But we know of no other shell where ac_cr would be empty at this
17266# point, so we can use a bashism as a fallback.
17267if test "x$ac_cr" = x; then
17268 eval ac_cr=\$\'\\r\'
17269fi
17270ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17271if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017272 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017273else
17274 ac_cs_awk_cr=$ac_cr
17275fi
17276
Victor Stinnere0be4232011-10-25 13:06:09 +020017277echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017278_ACEOF
17279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280
Matthias Kloseb9621712010-04-24 17:59:49 +000017281{
17282 echo "cat >conf$$subs.awk <<_ACEOF" &&
17283 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17284 echo "_ACEOF"
17285} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017286 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17287ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288ac_delim='%!_!# '
17289for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017290 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017291 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292
Matthias Kloseb9621712010-04-24 17:59:49 +000017293 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17294 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295 break
17296 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017297 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298 else
17299 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017300 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301done
Matthias Kloseb9621712010-04-24 17:59:49 +000017302rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303
Matthias Kloseb9621712010-04-24 17:59:49 +000017304cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017305cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017307sed -n '
17308h
17309s/^/S["/; s/!.*/"]=/
17310p
17311g
17312s/^[^!]*!//
17313:repl
17314t repl
17315s/'"$ac_delim"'$//
17316t delim
17317:nl
17318h
17319s/\(.\{148\}\)..*/\1/
17320t more1
17321s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17322p
17323n
17324b repl
17325:more1
17326s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17327p
17328g
17329s/.\{148\}//
17330t nl
17331:delim
17332h
17333s/\(.\{148\}\)..*/\1/
17334t more2
17335s/["\\]/\\&/g; s/^/"/; s/$/"/
17336p
17337b
17338:more2
17339s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17340p
17341g
17342s/.\{148\}//
17343t delim
17344' <conf$$subs.awk | sed '
17345/^[^""]/{
17346 N
17347 s/\n//
17348}
17349' >>$CONFIG_STATUS || ac_write_fail=1
17350rm -f conf$$subs.awk
17351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17352_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017353cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017354 for (key in S) S_is_set[key] = 1
17355 FS = ""
17356
17357}
17358{
17359 line = $ 0
17360 nfields = split(line, field, "@")
17361 substed = 0
17362 len = length(field[1])
17363 for (i = 2; i < nfields; i++) {
17364 key = field[i]
17365 keylen = length(key)
17366 if (S_is_set[key]) {
17367 value = S[key]
17368 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17369 len += length(value) + length(field[++i])
17370 substed = 1
17371 } else
17372 len += 1 + keylen
17373 }
17374
17375 print line
17376}
17377
17378_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017380cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17381if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17382 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17383else
17384 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017385fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017386 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017387_ACEOF
17388
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017389# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17390# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391# trailing colons and then remove the whole line if VPATH becomes empty
17392# (actually we leave an empty line to preserve line numbers).
17393if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017394 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17395h
17396s///
17397s/^/:/
17398s/[ ]*$/:/
17399s/:\$(srcdir):/:/g
17400s/:\${srcdir}:/:/g
17401s/:@srcdir@:/:/g
17402s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017404x
17405s/\(=[ ]*\).*/\1/
17406G
17407s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408s/^[^=]*=[ ]*$//
17409}'
17410fi
17411
Matthias Kloseb9621712010-04-24 17:59:49 +000017412cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017413fi # test -n "$CONFIG_FILES"
17414
Matthias Kloseb9621712010-04-24 17:59:49 +000017415# Set up the scripts for CONFIG_HEADERS section.
17416# No need to generate them if there are no CONFIG_HEADERS.
17417# This happens for instance with `./config.status Makefile'.
17418if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017419cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017420BEGIN {
17421_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422
Matthias Kloseb9621712010-04-24 17:59:49 +000017423# Transform confdefs.h into an awk script `defines.awk', embedded as
17424# here-document in config.status, that substitutes the proper values into
17425# config.h.in to produce config.h.
17426
17427# Create a delimiter string that does not exist in confdefs.h, to ease
17428# handling of long lines.
17429ac_delim='%!_!# '
17430for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017431 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17432 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017433 break
17434 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017435 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017436 else
17437 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17438 fi
17439done
17440
17441# For the awk script, D is an array of macro values keyed by name,
17442# likewise P contains macro parameters if any. Preserve backslash
17443# newline sequences.
17444
17445ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17446sed -n '
17447s/.\{148\}/&'"$ac_delim"'/g
17448t rset
17449:rset
17450s/^[ ]*#[ ]*define[ ][ ]*/ /
17451t def
17452d
17453:def
17454s/\\$//
17455t bsnl
17456s/["\\]/\\&/g
17457s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17458D["\1"]=" \3"/p
17459s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17460d
17461:bsnl
17462s/["\\]/\\&/g
17463s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17464D["\1"]=" \3\\\\\\n"\\/p
17465t cont
17466s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17467t cont
17468d
17469:cont
17470n
17471s/.\{148\}/&'"$ac_delim"'/g
17472t clear
17473:clear
17474s/\\$//
17475t bsnlc
17476s/["\\]/\\&/g; s/^/"/; s/$/"/p
17477d
17478:bsnlc
17479s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17480b cont
17481' <confdefs.h | sed '
17482s/'"$ac_delim"'/"\\\
17483"/g' >>$CONFIG_STATUS || ac_write_fail=1
17484
17485cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17486 for (key in D) D_is_set[key] = 1
17487 FS = ""
17488}
17489/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17490 line = \$ 0
17491 split(line, arg, " ")
17492 if (arg[1] == "#") {
17493 defundef = arg[2]
17494 mac1 = arg[3]
17495 } else {
17496 defundef = substr(arg[1], 2)
17497 mac1 = arg[2]
17498 }
17499 split(mac1, mac2, "(") #)
17500 macro = mac2[1]
17501 prefix = substr(line, 1, index(line, defundef) - 1)
17502 if (D_is_set[macro]) {
17503 # Preserve the white space surrounding the "#".
17504 print prefix "define", macro P[macro] D[macro]
17505 next
17506 } else {
17507 # Replace #undef with comments. This is necessary, for example,
17508 # in the case of _POSIX_SOURCE, which is predefined and required
17509 # on some systems where configure will not decide to define it.
17510 if (defundef == "undef") {
17511 print "/*", prefix defundef, macro, "*/"
17512 next
17513 }
17514 }
17515}
17516{ print }
17517_ACAWK
17518_ACEOF
17519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017520 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017521fi # test -n "$CONFIG_HEADERS"
17522
17523
17524eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17525shift
17526for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527do
17528 case $ac_tag in
17529 :[FHLC]) ac_mode=$ac_tag; continue;;
17530 esac
17531 case $ac_mode$ac_tag in
17532 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017533 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534 :[FH]-) ac_tag=-:-;;
17535 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17536 esac
17537 ac_save_IFS=$IFS
17538 IFS=:
17539 set x $ac_tag
17540 IFS=$ac_save_IFS
17541 shift
17542 ac_file=$1
17543 shift
17544
17545 case $ac_mode in
17546 :L) ac_source=$1;;
17547 :[FH])
17548 ac_file_inputs=
17549 for ac_f
17550 do
17551 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017552 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553 *) # Look for the file first in the build tree, then in the source tree
17554 # (if the path is not absolute). The absolute path cannot be DOS-style,
17555 # because $ac_f cannot contain `:'.
17556 test -f "$ac_f" ||
17557 case $ac_f in
17558 [\\/$]*) false;;
17559 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17560 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017561 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017563 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17564 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565 done
17566
17567 # Let's still pretend it is `configure' which instantiates (i.e., don't
17568 # use $as_me), people would be surprised to read:
17569 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017570 configure_input='Generated from '`
17571 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17572 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 if test x"$ac_file" != x-; then
17574 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017575 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17576$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017578 # Neutralize special characters interpreted by sed in replacement strings.
17579 case $configure_input in #(
17580 *\&* | *\|* | *\\* )
17581 ac_sed_conf_input=`$as_echo "$configure_input" |
17582 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17583 *) ac_sed_conf_input=$configure_input;;
17584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585
17586 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017587 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17588 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589 esac
17590 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017591 esac
17592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017593 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017594$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017595 X"$ac_file" : 'X\(//\)[^/]' \| \
17596 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017598$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17600 s//\1/
17601 q
17602 }
17603 /^X\(\/\/\)[^/].*/{
17604 s//\1/
17605 q
17606 }
17607 /^X\(\/\/\)$/{
17608 s//\1/
17609 q
17610 }
17611 /^X\(\/\).*/{
17612 s//\1/
17613 q
17614 }
17615 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017616 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 ac_builddir=.
17618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619case "$ac_dir" in
17620.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17621*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017622 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017624 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625 case $ac_top_builddir_sub in
17626 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17627 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17628 esac ;;
17629esac
17630ac_abs_top_builddir=$ac_pwd
17631ac_abs_builddir=$ac_pwd$ac_dir_suffix
17632# for backward compatibility:
17633ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017634
17635case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017636 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638 ac_top_srcdir=$ac_top_builddir_sub
17639 ac_abs_top_srcdir=$ac_pwd ;;
17640 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642 ac_top_srcdir=$srcdir
17643 ac_abs_top_srcdir=$srcdir ;;
17644 *) # Relative name.
17645 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17646 ac_top_srcdir=$ac_top_build_prefix$srcdir
17647 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017648esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017650
Martin v. Löwis11437992002-04-12 09:54:03 +000017651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652 case $ac_mode in
17653 :F)
17654 #
17655 # CONFIG_FILE
17656 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017657
17658 case $INSTALL in
17659 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017662 ac_MKDIR_P=$MKDIR_P
17663 case $MKDIR_P in
17664 [\\/$]* | ?:[\\/]* ) ;;
17665 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17666 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017667_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668
Matthias Kloseb9621712010-04-24 17:59:49 +000017669cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670# If the template does not know about datarootdir, expand it.
17671# FIXME: This hack should be removed a few years after 2.60.
17672ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017673ac_sed_dataroot='
17674/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675 p
17676 q
17677}
17678/@datadir@/p
17679/@docdir@/p
17680/@infodir@/p
17681/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017682/@mandir@/p'
17683case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017684*datarootdir*) ac_datarootdir_seen=yes;;
17685*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17687$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017689cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690 ac_datarootdir_hack='
17691 s&@datadir@&$datadir&g
17692 s&@docdir@&$docdir&g
17693 s&@infodir@&$infodir&g
17694 s&@localedir@&$localedir&g
17695 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017696 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017697esac
17698_ACEOF
17699
17700# Neutralize VPATH when `$srcdir' = `.'.
17701# Shell code in configure.ac might set extrasub.
17702# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017703cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17704ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017705$extrasub
17706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017707cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017708:t
17709/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017710s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017712s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713s&@srcdir@&$ac_srcdir&;t t
17714s&@abs_srcdir@&$ac_abs_srcdir&;t t
17715s&@top_srcdir@&$ac_top_srcdir&;t t
17716s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17717s&@builddir@&$ac_builddir&;t t
17718s&@abs_builddir@&$ac_abs_builddir&;t t
17719s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17720s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017721s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017723"
Victor Stinnere0be4232011-10-25 13:06:09 +020017724eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17725 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017728 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17729 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17730 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017732which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017733$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017734which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017735
Victor Stinnere0be4232011-10-25 13:06:09 +020017736 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017738 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17739 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017740 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017741 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742 ;;
17743 :H)
17744 #
17745 # CONFIG_HEADER
17746 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017748 {
17749 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017750 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17751 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017752 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017753 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017754 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17755$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017757 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017758 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017759 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017760 fi
17761 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017763 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017764 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768
17769 esac
17770
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017771
17772 case $ac_file$ac_mode in
17773 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17774
17775 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776done # for ac_tag
17777
Guido van Rossum627b2d71993-12-24 10:39:16 +000017778
Matthias Kloseb9621712010-04-24 17:59:49 +000017779as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017780_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017781ac_clean_files=$ac_clean_files_save
17782
Matthias Kloseb9621712010-04-24 17:59:49 +000017783test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017784 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017785
Martin v. Löwis11437992002-04-12 09:54:03 +000017786
17787# configure is writing to config.log, and then calls config.status.
17788# config.status does its own redirection, appending to config.log.
17789# Unfortunately, on DOS this fails, as config.log is still kept open
17790# by configure, so config.status won't be able to write to it; its
17791# output is simply discarded. So we exec the FD to /dev/null,
17792# effectively closing config.log, so it can be properly (re)opened and
17793# appended to by config.status. When coming back to configure, we
17794# need to make the FD available again.
17795if test "$no_create" != yes; then
17796 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017797 ac_config_status_args=
17798 test "$silent" = yes &&
17799 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017801 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017802 exec 5>>config.log
17803 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17804 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017805 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017806fi
17807if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17809$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017810fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017811
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017812
Christian Heimes75ed8902013-11-20 01:11:18 +010017813echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017814if test ! -f Modules/Setup
17815then
17816 cp $srcdir/Modules/Setup.dist Modules/Setup
17817fi
17818
Christian Heimes75ed8902013-11-20 01:11:18 +010017819echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017820if test ! -f Modules/Setup.local
17821then
17822 echo "# Edit this file for local setup changes" >Modules/Setup.local
17823fi
17824
Christian Heimes75ed8902013-11-20 01:11:18 +010017825echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017826$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17827 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017828 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017829mv config.c Modules
Brett Cannon8c94f972016-09-06 17:15:21 -070017830
17831if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17832 echo "" >&6
17833 echo "" >&6
17834 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17835 echo "please run ./configure --with-optimizations" >&6
17836 echo "" >&6
17837 echo "" >&6
17838fi
17839