blob: 40e64adc8a886d61e5c8a433e78a9115536a614b [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.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
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'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
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
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
730SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000751GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200753PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700786runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_fpectl
840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700897runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001150 -runstatedir | --runstatedir | --runstatedi | --runstated \
1151 | --runstate | --runstat | --runsta | --runst | --runs \
1152 | --run | --ru | --r)
1153 ac_prev=runstatedir ;;
1154 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1155 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1156 | --run=* | --ru=* | --r=*)
1157 runstatedir=$ac_optarg ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160 ac_prev=sbindir ;;
1161 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
1165 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167 | --sharedst | --shareds | --shared | --share | --shar \
1168 | --sha | --sh)
1169 ac_prev=sharedstatedir ;;
1170 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 -site | --site | --sit)
1177 ac_prev=site ;;
1178 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182 ac_prev=srcdir ;;
1183 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187 | --syscon | --sysco | --sysc | --sys | --sy)
1188 ac_prev=sysconfdir ;;
1189 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199 verbose=yes ;;
1200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 -version | --version | --versio | --versi | --vers | -V)
1202 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 --x)
1237 # Obsolete; use --with-x.
1238 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241 | --x-incl | --x-inc | --x-in | --x-i)
1242 ac_prev=x_includes ;;
1243 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249 ac_prev=x_libraries ;;
1250 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 *=*)
1259 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 case $ac_envvar in #(
1262 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 export $ac_envvar ;;
1267
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001268 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001273 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
1276 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277done
1278
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
1283
Matthias Kloseb9621712010-04-24 17:59:49 +00001284if test -n "$ac_unrecognized_opts"; then
1285 case $enable_option_checking in
1286 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289 esac
1290fi
1291
1292# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294 datadir sysconfdir sharedstatedir localstatedir includedir \
1295 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001296 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 # Remove trailing slashes.
1300 case $ac_val in
1301 */ )
1302 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303 eval $ac_var=\$ac_val;;
1304 esac
1305 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 [\\/$]* | ?:[\\/]* ) continue;;
1308 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001311done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322 if test "x$build_alias" = x; then
1323 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 elif test "x$build_alias" != "x$host_alias"; then
1325 cross_compiling=yes
1326 fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349 X"$as_myself" : 'X\(//\)[^/]' \| \
1350 X"$as_myself" : 'X\(//\)$' \| \
1351 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)[^/].*/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\).*/{
1366 s//\1/
1367 q
1368 }
1369 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 srcdir=..
1373 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374else
1375 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377if test ! -r "$srcdir/$ac_unique_file"; then
1378 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384 pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387 srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_env_${ac_var}_value=\$${ac_var}
1398 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406 # Omit some internal or obsolete options to make the list less imposing.
1407 # This message is too long to be a string in the A/UX 3.1 sh.
1408 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001409\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE. See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419 -h, --help display this help and exit
1420 --help=short display options specific to this package
1421 --help=recursive display the short help of all the included packages
1422 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001423 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --cache-file=FILE cache test results in FILE [disabled]
1425 -C, --config-cache alias for \`--cache-file=config.cache'
1426 -n, --no-create do not create output files
1427 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429Installation directories:
1430 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --bindir=DIR user executables [EPREFIX/bin]
1444 --sbindir=DIR system admin executables [EPREFIX/sbin]
1445 --libexecdir=DIR program executables [EPREFIX/libexec]
1446 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1447 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1448 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001449 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464
1465 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001466
1467System types:
1468 --build=BUILD configure for building on BUILD [guessed]
1469 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001470 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001471_ACEOF
1472fi
1473
1474if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001476 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 cat <<\_ACEOF
1479
1480Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1483 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001484 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001485 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-framework[=INSTALLDIR]
1487 Build (MacOSX|Darwin) framework
1488 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001489 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001490 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1491 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001492 --enable-loadable-sqlite-extensions
1493 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --enable-ipv6 Enable ipv6 (with ipv4) support
1495 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001496 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499Optional Packages:
1500 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1501 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001502 --with-universal-archs=ARCH
1503 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001504 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001505 --with-framework-name=FRAMEWORK
1506 specify an alternate name of the framework built
1507 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001509 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001515 --with-lto Enable Link Time Optimization in PGO builds.
1516 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001517 --with-hash-algorithm=[fnv|siphash24]
1518 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001519 --with-address-sanitizer
1520 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001522 --with-system-expat build pyexpat module using an installed expat
1523 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001524 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001525 --with-system-libmpdec build _decimal module using an installed libmpdec
1526 library
Ned Deilyd819b932013-09-06 01:07:05 -07001527 --with-tcltk-includes='-I...'
1528 override search for Tcl and Tk include files
1529 --with-tcltk-libs='-L...'
1530 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001531 --with-dbmliborder=db1:db2:...
1532 order to check db backends for dbm. Valid value is a
1533 colon separated string with the backend names
1534 `ndbm', `gdbm' and `bdb'.
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
1540 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001541 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001542 --with(out)-dtrace disable/enable DTrace 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
Ned Deily4829bc62016-09-12 17:29:04 -04001634python configure 3.7
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
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Ned Deily4829bc62016-09-12 17:29:04 -04002343It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# 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 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$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 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002693if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002694 # If we're building out-of-tree, we need to make sure the following
2695 # resources get picked up before their $srcdir counterparts.
2696 # Objects/ -> typeslots.inc
2697 # Include/ -> Python-ast.h, graminit.h
2698 # Python/ -> importlib.h
2699 # (A side effect of this is that these resources will automatically be
2700 # regenerated when building out-of-tree, regardless of whether or not
2701 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2702 # off.)
2703 BASECPPFLAGS="-IObjects -IInclude -IPython"
2704else
2705 BASECPPFLAGS=""
2706fi
2707
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708
2709
2710
2711
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712if test -e $srcdir/.git/HEAD
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002714# Extract the first word of "git", so it can be a program name with args.
2715set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2717$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719 $as_echo_n "(cached) " >&6
2720else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721 if test -n "$HAS_GIT"; then
2722 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723else
2724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2725for as_dir in $PATH
2726do
2727 IFS=$as_save_IFS
2728 test -z "$as_dir" && as_dir=.
2729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2733 break 2
2734 fi
2735done
2736 done
2737IFS=$as_save_IFS
2738
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002740fi
2741fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742HAS_GIT=$ac_cv_prog_HAS_GIT
2743if test -n "$HAS_GIT"; then
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2745$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2748$as_echo "no" >&6; }
2749fi
2750
2751
2752else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756then
Ned Deily554626a2017-03-20 23:41:52 -04002757 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2758 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761 GITVERSION=""
2762 GITTAG=""
2763 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
2765
2766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
2769
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002770ac_aux_dir=
2771for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2772 if test -f "$ac_dir/install-sh"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/install-sh -c"
2775 break
2776 elif test -f "$ac_dir/install.sh"; then
2777 ac_aux_dir=$ac_dir
2778 ac_install_sh="$ac_aux_dir/install.sh -c"
2779 break
2780 elif test -f "$ac_dir/shtool"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/shtool install -c"
2783 break
2784 fi
2785done
2786if test -z "$ac_aux_dir"; then
2787 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2788fi
2789
2790# These three variables are undocumented and unsupported,
2791# and are intended to be withdrawn in a future Autoconf release.
2792# They can cause serious problems if a builder's source tree is in a directory
2793# whose full name contains unusual characters.
2794ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2795ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2796ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2797
2798
2799# Make sure we can run config.sub.
2800$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2801 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2802
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2804$as_echo_n "checking build system type... " >&6; }
2805if ${ac_cv_build+:} false; then :
2806 $as_echo_n "(cached) " >&6
2807else
2808 ac_build_alias=$build_alias
2809test "x$ac_build_alias" = x &&
2810 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2811test "x$ac_build_alias" = x &&
2812 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2813ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2814 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2815
2816fi
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2818$as_echo "$ac_cv_build" >&6; }
2819case $ac_cv_build in
2820*-*-*) ;;
2821*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2822esac
2823build=$ac_cv_build
2824ac_save_IFS=$IFS; IFS='-'
2825set x $ac_cv_build
2826shift
2827build_cpu=$1
2828build_vendor=$2
2829shift; shift
2830# Remember, the first character of IFS is used to create $*,
2831# except with old shells:
2832build_os=$*
2833IFS=$ac_save_IFS
2834case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2835
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2838$as_echo_n "checking host system type... " >&6; }
2839if ${ac_cv_host+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 if test "x$host_alias" = x; then
2843 ac_cv_host=$ac_cv_build
2844else
2845 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2846 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2847fi
2848
2849fi
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2851$as_echo "$ac_cv_host" >&6; }
2852case $ac_cv_host in
2853*-*-*) ;;
2854*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2855esac
2856host=$ac_cv_host
2857ac_save_IFS=$IFS; IFS='-'
2858set x $ac_cv_host
2859shift
2860host_cpu=$1
2861host_vendor=$2
2862shift; shift
2863# Remember, the first character of IFS is used to create $*,
2864# except with old shells:
2865host_os=$*
2866IFS=$ac_save_IFS
2867case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2868
2869
2870
doko@python.orga10e4a92013-01-25 18:45:12 +01002871
2872
Ned Deilyfcbc2462014-08-22 13:32:49 -07002873# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2874rm -f pybuilddir.txt
2875
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002876for ac_prog in python$PACKAGE_VERSION python3 python
2877do
2878 # Extract the first word of "$ac_prog", so it can be a program name with args.
2879set dummy $ac_prog; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
2882if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2883 $as_echo_n "(cached) " >&6
2884else
2885 if test -n "$PYTHON_FOR_GEN"; then
2886 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2895 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2897 break 2
2898 fi
2899done
2900 done
2901IFS=$as_save_IFS
2902
2903fi
2904fi
2905PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2906if test -n "$PYTHON_FOR_GEN"; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2908$as_echo "$PYTHON_FOR_GEN" >&6; }
2909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
2912fi
2913
2914
2915 test -n "$PYTHON_FOR_GEN" && break
2916done
2917test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2918
2919if test "$PYTHON_FOR_GEN" = not-found; then
2920 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2921 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2922 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2923fi
2924
2925
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002926if test "$cross_compiling" = yes; then
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2928$as_echo_n "checking for python interpreter for cross build... " >&6; }
2929 if test -z "$PYTHON_FOR_BUILD"; then
2930 for interp in python$PACKAGE_VERSION python3 python; do
2931 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002932 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002933 break
2934 fi
2935 interp=
2936 done
2937 if test x$interp = x; then
2938 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2939 fi
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2941$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002942 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 _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002944 # Used to comment out stuff for rebuilding generated files
2945 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002946elif test "$cross_compiling" = maybe; then
2947 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002948else
2949 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002950 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
Martin Pantereac67be2016-07-28 01:28:27 +00002955
Benjamin Petersond23f8222009-04-05 19:13:16 +00002956if test "$prefix" != "/"; then
2957 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2958fi
2959
2960
Martin v. Löwis11437992002-04-12 09:54:03 +00002961
2962
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002963# We don't use PACKAGE_ variables, and they cause conflicts
2964# with other autoconf-based packages that include Python.h
2965grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2966rm confdefs.h
2967mv confdefs.h.new confdefs.h
2968
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002969
Ned Deily4829bc62016-09-12 17:29:04 -04002970VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002971
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002972# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002973
2974SOVERSION=1.0
2975
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976# The later defininition of _XOPEN_SOURCE disables certain features
2977# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980
2981
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002987
2988
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2990# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002994
2995
Martin v. Löwisd6320502004-08-12 13:45:08 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000
3001
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3003# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3004# them.
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003007
3008
3009
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003010define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003011
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003012# Arguments passed to configure.
3013
3014CONFIG_ARGS="$ac_configure_args"
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3017$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003019if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 case $enableval in
3022 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 # Locate the best usable SDK, see Mac/README.txt for more
3024 # information
3025 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003026 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003028 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3029 if test ! -d "${enableval}"
3030 then
3031 enableval=/
3032 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
3036 case $enableval in
3037 no)
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040 ;;
3041 *)
3042 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043 if test ! -d "${UNIVERSALSDK}"
3044 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003045 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 ;;
3048 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003049
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051else
3052
3053 UNIVERSALSDK=
3054 enable_universalsdk=
3055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058if test -n "${UNIVERSALSDK}"
3059then
Matthias Kloseb9621712010-04-24 17:59:49 +00003060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3061$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062else
Matthias Kloseb9621712010-04-24 17:59:49 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deily87adb6e2013-10-18 21:09:56 -07003069ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003070
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071# For backward compatibility reasons we prefer to select '32-bit' if available,
3072# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074if test "`uname -s`" = "Darwin"
3075then
3076 if test -n "${UNIVERSALSDK}"
3077 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003078 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003079 then
3080 UNIVERSAL_ARCHS="intel"
3081 fi
3082 fi
3083fi
3084
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3087$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
3089# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 UNIVERSAL_ARCHS="$withval"
3093
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094fi
3095
Ned Deily87adb6e2013-10-18 21:09:56 -07003096if test -n "${UNIVERSALSDK}"
3097then
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3099$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3100else
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3102$as_echo "no" >&6; }
3103fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003105
3106# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108 withval=$with_framework_name;
3109 PYTHONFRAMEWORK=${withval}
3110 PYTHONFRAMEWORKDIR=${withval}.framework
3111 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3112
3113else
3114
3115 PYTHONFRAMEWORK=Python
3116 PYTHONFRAMEWORKDIR=Python.framework
3117 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3118
3119fi
3120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003122if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003124 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003125 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003126 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 esac
3128 case $enableval in
3129 no)
3130 PYTHONFRAMEWORK=
3131 PYTHONFRAMEWORKDIR=no-framework
3132 PYTHONFRAMEWORKPREFIX=
3133 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134 FRAMEWORKINSTALLFIRST=
3135 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 FRAMEWORKALTINSTALLFIRST=
3137 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003138 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE"; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003144 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003145 ;;
3146 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003149 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003150 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003151 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3152 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003153 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003155
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 if test "x${prefix}" = "xNONE" ; then
3157 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 else
3160 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3161 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003162
3163 case "${enableval}" in
3164 /System*)
3165 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3166 if test "${prefix}" = "NONE" ; then
3167 # See below
3168 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3169 fi
3170 ;;
3171
3172 /Library*)
3173 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3174 ;;
3175
3176 */Library/Frameworks)
3177 MDIR="`dirname "${enableval}"`"
3178 MDIR="`dirname "${MDIR}"`"
3179 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3180
3181 if test "${prefix}" = "NONE"; then
3182 # User hasn't specified the
3183 # --prefix option, but wants to install
3184 # the framework in a non-default location,
3185 # ensure that the compatibility links get
3186 # installed relative to that prefix as well
3187 # instead of in /usr/local.
3188 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3189 fi
3190 ;;
3191
3192 *)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 ;;
3195 esac
3196
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003205 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3206
3207 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3208
Jack Jansene578a632001-08-15 01:27:14 +00003209 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Guido van Rossum563e7081996-09-10 18:20:48 +00003211else
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003214 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003215 PYTHONFRAMEWORKPREFIX=
3216 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217 FRAMEWORKINSTALLFIRST=
3218 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003219 FRAMEWORKALTINSTALLFIRST=
3220 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003221 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222 if test "x${prefix}" = "xNONE" ; then
3223 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3224 else
3225 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3226 fi
Jack Jansene578a632001-08-15 01:27:14 +00003227 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230fi
3231
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
3233
Michael W. Hudson54241132001-12-07 15:38:26 +00003234
3235
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239
3240
3241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003243
Ned Deilyb8f944f2013-11-21 22:42:25 -08003244
Jack Jansene578a632001-08-15 01:27:14 +00003245##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003246## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003247## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003248##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249# Set name for machine-dependent library files
3250
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3252$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253if test -z "$MACHDEP"
3254then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 # avoid using uname for cross builds
3256 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003257 # ac_sys_system and ac_sys_release are used for setting
3258 # a lot of different things including 'define_xopen_source'
3259 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003261 *-*-linux-android*)
3262 ac_sys_system=Linux-android
3263 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 *-*-linux*)
3265 ac_sys_system=Linux
3266 ;;
3267 *-*-cygwin*)
3268 ac_sys_system=Cygwin
3269 ;;
3270 *)
3271 # for now, limit cross builds to known configurations
3272 MACHDEP="unknown"
3273 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3274 esac
3275 ac_sys_release=
3276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003278 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003279 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 fi
3285 ac_md_system=`echo $ac_sys_system |
3286 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3287 ac_md_release=`echo $ac_sys_release |
3288 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3289 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003290
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003292 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003294 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003295 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003296 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298fi
Guido van Rossum91922671997-10-09 20:24:13 +00003299
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003300
3301if test "$cross_compiling" = yes; then
3302 case "$host" in
3303 *-*-linux*)
3304 case "$host_cpu" in
3305 arm*)
3306 _host_cpu=arm
3307 ;;
3308 *)
3309 _host_cpu=$host_cpu
3310 esac
3311 ;;
3312 *-*-cygwin*)
3313 _host_cpu=
3314 ;;
3315 *)
3316 # for now, limit cross builds to known configurations
3317 MACHDEP="unknown"
3318 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3319 esac
3320 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3321fi
3322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3324# disable features if it is defined, without any means to access these
3325# features as extensions. For these systems, we skip the definition of
3326# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3327# some feature, make sure there is no alternative way to access this
3328# feature. Also, when using wildcards, make sure you have verified the
3329# need for not defining _XOPEN_SOURCE on all systems matching the
3330# wildcard, and that the wildcard does not include future systems
3331# (which may remove their limitations).
3332case $ac_sys_system/$ac_sys_release in
3333 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3334 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003335 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003336 # In addition, Stefan Krah confirms that issue #1244610 exists through
3337 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339 define_xopen_source=no
3340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345
3346 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003347 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3349 # also defined. This can be overridden by defining _BSD_SOURCE
3350 # As this has a different meaning on Linux, only define it on OpenBSD
3351
Matthias Kloseb9621712010-04-24 17:59:49 +00003352$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353
3354 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003355 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3356 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3357 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003358 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 +00003359 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003360 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3361 # request to enable features supported by the standard as a request
3362 # to disable features not supported by the standard. The best way
3363 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3364 # entirely and define __EXTENSIONS__ instead.
3365 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003366 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3368 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003369 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003370 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 define_xopen_source=no;;
3372 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003375 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003376 # On FreeBSD 4, the math functions C89 does not cover are never defined
3377 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3378 FreeBSD/4.*)
3379 define_xopen_source=no;;
3380 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3381 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3382 # identifies itself as Darwin/7.*
3383 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3384 # disables platform specific features beyond repair.
3385 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3386 # has no effect, don't bother defining them
3387 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003388 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003389 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003390 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003391 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3392 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3393 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003394 AIX/4)
3395 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003396 AIX/5)
3397 if test `uname -r` -eq 1; then
3398 define_xopen_source=no
3399 fi
3400 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003401 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3402 # defining NI_NUMERICHOST.
3403 QNX/6.3.2)
3404 define_xopen_source=no
3405 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407esac
3408
3409if test $define_xopen_source = yes
3410then
Victor Stinner14d098d2011-09-07 22:29:43 +02003411 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Victor Stinner14d098d2011-09-07 22:29:43 +02003413$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
3416 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3417 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3418 # several APIs are not declared. Since this is also needed in some
3419 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
Matthias Kloseb9621712010-04-24 17:59:49 +00003421$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003424
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003425$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427fi
3428
Christian Heimes647cd872013-12-07 23:39:33 +01003429# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3430case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431 hp*|HP*)
3432 define_stdc_a1=yes;;
3433 *)
3434 define_stdc_a1=no;;
3435esac
3436
3437if test $define_stdc_a1 = yes
3438then
Christian Heimes647cd872013-12-07 23:39:33 +01003439
3440$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3441
Christian Heimesb02bcae2013-12-08 15:21:08 +01003442fi
Christian Heimes647cd872013-12-07 23:39:33 +01003443
Guido van Rossum91922671997-10-09 20:24:13 +00003444#
3445# SGI compilers allow the specification of the both the ABI and the
3446# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003447# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003448#
3449# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3450# thus supply support for various ABI/ISA combinations. The MACHDEP
3451# variable is also adjusted.
3452#
3453
3454if test ! -z "$SGI_ABI"
3455then
3456 CC="cc $SGI_ABI"
3457 LDFLAGS="$SGI_ABI $LDFLAGS"
3458 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3461$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003462
Jack Jansen6b08a402004-06-03 12:41:45 +00003463# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3464# it may influence the way we can build extensions, so distutils
3465# needs to check it
3466
Thomas Wouters477c8d52006-05-27 19:21:47 +00003467
Jack Jansen6b08a402004-06-03 12:41:45 +00003468CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003469EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003470
Guido van Rossum627b2d71993-12-24 10:39:16 +00003471# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003472
3473# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3474# for debug/optimization stuff. BASECFLAGS is for flags that are required
3475# just to get things to compile and link. Users are free to override OPT
3476# when running configure or make. The build should not break if they do.
3477# BASECFLAGS should generally not be messed with, however.
3478
3479# XXX shouldn't some/most/all of this code be merged with the stuff later
3480# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3482$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003485if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003487 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003488 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003489 without_gcc=yes;;
3490 yes) CC=gcc
3491 without_gcc=no;;
3492 *) CC=$withval
3493 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003494 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003495else
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003497 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003498 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003499 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003500 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003501 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502fi
3503
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3505$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003506
Zachary Ware5af85642015-12-21 12:09:17 -06003507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3508$as_echo_n "checking for --with-icc... " >&6; }
3509
3510# Check whether --with-icc was given.
3511if test "${with_icc+set}" = set; then :
3512 withval=$with_icc;
3513 case $withval in
3514 no) CC=${CC:-cc}
3515 with_icc=no;;
3516 yes) CC=icc
3517 CXX=icpc
3518 with_icc=yes;;
3519 *) CC=$withval
3520 with_icc=$withval;;
3521 esac
3522else
3523
3524 with_icc=no
3525fi
3526
3527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3528$as_echo "$with_icc" >&6; }
3529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
3547 # AC_PROG_CC can handle, see Mac/README.txt for more
3548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
3557 if test -x $as_dir/gcc; then
3558 if test -z "${found_gcc}"; then
3559 found_gcc=$as_dir/gcc
3560 fi
3561 fi
3562 if test -x $as_dir/clang; then
3563 if test -z "${found_clang}"; then
3564 found_clang=$as_dir/clang
3565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003615else
3616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $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 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003653if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $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 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # 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 +00003703set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $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 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003746if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003748else
3749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $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 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003805if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003807else
3808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
3815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $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 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003849if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
3852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
3859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 $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 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3908set X $ac_compile
3909ac_compiler=$2
3910for ac_option in --version -v -V -qversion; do
3911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3917$as_echo "$ac_try_echo"; } >&5
3918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
3927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
3935main ()
3936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
4034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
4075main ()
4076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
4089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_link") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_try") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
4117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
4127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004132if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo_n "(cached) " >&6
4134else
4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
4166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
4202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_test_CFLAGS=${CFLAGS+set}
4217ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004220if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
4246main ()
4247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Matthias Kloseb9621712010-04-24 17:59:49 +00004255else
4256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004298if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
4305#include <stdarg.h>
4306#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004307struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
Skip Montanaro6dead952003-09-25 14:50:04 +00004341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
4354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f core conftest.err conftest.$ac_objext
4363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
4367
4368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004382if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4398$as_echo_n "checking how to run the C preprocessor... " >&6; }
4399# On Suns, sometimes $CPP names a directory.
4400if test -n "$CPP" && test -d "$CPP"; then
4401 CPP=
4402fi
4403if test -z "$CPP"; then
4404 if ${ac_cv_prog_CPP+:} false; then :
4405 $as_echo_n "(cached) " >&6
4406else
4407 # Double quotes because CPP needs to be expanded
4408 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4409 do
4410 ac_preproc_ok=false
4411for ac_c_preproc_warn_flag in '' yes
4412do
4413 # Use a header file that comes with gcc, so configuring glibc
4414 # with a fresh cross-compiler works.
4415 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4416 # <limits.h> exists even on freestanding compilers.
4417 # On the NeXT, cc -E runs the code through the compiler's parser,
4418 # not just through cpp. "Syntax error" is here to catch this case.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420/* end confdefs.h. */
4421#ifdef __STDC__
4422# include <limits.h>
4423#else
4424# include <assert.h>
4425#endif
4426 Syntax error
4427_ACEOF
4428if ac_fn_c_try_cpp "$LINENO"; then :
4429
4430else
4431 # Broken: fails on valid input.
4432continue
4433fi
4434rm -f conftest.err conftest.i conftest.$ac_ext
4435
4436 # OK, works on sane cases. Now check whether nonexistent headers
4437 # can be detected and how.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#include <ac_nonexistent.h>
4441_ACEOF
4442if ac_fn_c_try_cpp "$LINENO"; then :
4443 # Broken: success on invalid input.
4444continue
4445else
4446 # Passes both tests.
4447ac_preproc_ok=:
4448break
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452done
4453# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4454rm -f conftest.i conftest.err conftest.$ac_ext
4455if $ac_preproc_ok; then :
4456 break
4457fi
4458
4459 done
4460 ac_cv_prog_CPP=$CPP
4461
4462fi
4463 CPP=$ac_cv_prog_CPP
4464else
4465 ac_cv_prog_CPP=$CPP
4466fi
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4468$as_echo "$CPP" >&6; }
4469ac_preproc_ok=false
4470for ac_c_preproc_warn_flag in '' yes
4471do
4472 # Use a header file that comes with gcc, so configuring glibc
4473 # with a fresh cross-compiler works.
4474 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4475 # <limits.h> exists even on freestanding compilers.
4476 # On the NeXT, cc -E runs the code through the compiler's parser,
4477 # not just through cpp. "Syntax error" is here to catch this case.
4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4479/* end confdefs.h. */
4480#ifdef __STDC__
4481# include <limits.h>
4482#else
4483# include <assert.h>
4484#endif
4485 Syntax error
4486_ACEOF
4487if ac_fn_c_try_cpp "$LINENO"; then :
4488
4489else
4490 # Broken: fails on valid input.
4491continue
4492fi
4493rm -f conftest.err conftest.i conftest.$ac_ext
4494
4495 # OK, works on sane cases. Now check whether nonexistent headers
4496 # can be detected and how.
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#include <ac_nonexistent.h>
4500_ACEOF
4501if ac_fn_c_try_cpp "$LINENO"; then :
4502 # Broken: success on invalid input.
4503continue
4504else
4505 # Passes both tests.
4506ac_preproc_ok=:
4507break
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511done
4512# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4513rm -f conftest.i conftest.err conftest.$ac_ext
4514if $ac_preproc_ok; then :
4515
4516else
4517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4518$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4519as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4520See \`config.log' for more details" "$LINENO" 5; }
4521fi
4522
4523ac_ext=c
4524ac_cpp='$CPP $CPPFLAGS'
4525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4527ac_compiler_gnu=$ac_cv_c_compiler_gnu
4528
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4530$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4531if ${ac_cv_path_GREP+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
4534 if test -z "$GREP"; then
4535 ac_path_GREP_found=false
4536 # Loop through the user's path and test for each of PROGNAME-LIST
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4539do
4540 IFS=$as_save_IFS
4541 test -z "$as_dir" && as_dir=.
4542 for ac_prog in grep ggrep; do
4543 for ac_exec_ext in '' $ac_executable_extensions; do
4544 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4545 as_fn_executable_p "$ac_path_GREP" || continue
4546# Check for GNU ac_path_GREP and select it if it is found.
4547 # Check for GNU $ac_path_GREP
4548case `"$ac_path_GREP" --version 2>&1` in
4549*GNU*)
4550 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4551*)
4552 ac_count=0
4553 $as_echo_n 0123456789 >"conftest.in"
4554 while :
4555 do
4556 cat "conftest.in" "conftest.in" >"conftest.tmp"
4557 mv "conftest.tmp" "conftest.in"
4558 cp "conftest.in" "conftest.nl"
4559 $as_echo 'GREP' >> "conftest.nl"
4560 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4562 as_fn_arith $ac_count + 1 && ac_count=$as_val
4563 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4564 # Best one so far, save it but keep looking for a better one
4565 ac_cv_path_GREP="$ac_path_GREP"
4566 ac_path_GREP_max=$ac_count
4567 fi
4568 # 10*(2^10) chars as input seems more than enough
4569 test $ac_count -gt 10 && break
4570 done
4571 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
4574 $ac_path_GREP_found && break 3
4575 done
4576 done
4577 done
4578IFS=$as_save_IFS
4579 if test -z "$ac_cv_path_GREP"; then
4580 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4581 fi
4582else
4583 ac_cv_path_GREP=$GREP
4584fi
4585
4586fi
4587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4588$as_echo "$ac_cv_path_GREP" >&6; }
4589 GREP="$ac_cv_path_GREP"
4590
4591
Łukasz Langaa785c872016-09-09 17:37:37 -07004592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4593$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4594if ${ac_cv_path_SED+:} false; then :
4595 $as_echo_n "(cached) " >&6
4596else
4597 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4598 for ac_i in 1 2 3 4 5 6 7; do
4599 ac_script="$ac_script$as_nl$ac_script"
4600 done
4601 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4602 { ac_script=; unset ac_script;}
4603 if test -z "$SED"; then
4604 ac_path_SED_found=false
4605 # Loop through the user's path and test for each of PROGNAME-LIST
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_prog in sed gsed; do
4612 for ac_exec_ext in '' $ac_executable_extensions; do
4613 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4614 as_fn_executable_p "$ac_path_SED" || continue
4615# Check for GNU ac_path_SED and select it if it is found.
4616 # Check for GNU $ac_path_SED
4617case `"$ac_path_SED" --version 2>&1` in
4618*GNU*)
4619 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4620*)
4621 ac_count=0
4622 $as_echo_n 0123456789 >"conftest.in"
4623 while :
4624 do
4625 cat "conftest.in" "conftest.in" >"conftest.tmp"
4626 mv "conftest.tmp" "conftest.in"
4627 cp "conftest.in" "conftest.nl"
4628 $as_echo '' >> "conftest.nl"
4629 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4630 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4631 as_fn_arith $ac_count + 1 && ac_count=$as_val
4632 if test $ac_count -gt ${ac_path_SED_max-0}; then
4633 # Best one so far, save it but keep looking for a better one
4634 ac_cv_path_SED="$ac_path_SED"
4635 ac_path_SED_max=$ac_count
4636 fi
4637 # 10*(2^10) chars as input seems more than enough
4638 test $ac_count -gt 10 && break
4639 done
4640 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4641esac
4642
4643 $ac_path_SED_found && break 3
4644 done
4645 done
4646 done
4647IFS=$as_save_IFS
4648 if test -z "$ac_cv_path_SED"; then
4649 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4650 fi
4651else
4652 ac_cv_path_SED=$SED
4653fi
4654
4655fi
4656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4657$as_echo "$ac_cv_path_SED" >&6; }
4658 SED="$ac_cv_path_SED"
4659 rm -f conftest.sed
4660
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004661
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
4663
Matthias Kloseb9621712010-04-24 17:59:49 +00004664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4665$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004668if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004670
4671 case $withval in
4672 no) with_cxx_main=no
4673 MAINCC='$(CC)';;
4674 yes) with_cxx_main=yes
4675 MAINCC='$(CXX)';;
4676 *) with_cxx_main=yes
4677 MAINCC=$withval
4678 if test -z "$CXX"
4679 then
4680 CXX=$withval
4681 fi;;
4682 esac
4683else
4684
4685 with_cxx_main=no
4686 MAINCC='$(CC)'
4687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004688fi
4689
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4691$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004692
4693preset_cxx="$CXX"
4694if test -z "$CXX"
4695then
4696 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 gcc) if test -n "$ac_tool_prefix"; then
4698 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4699set dummy ${ac_tool_prefix}g++; ac_word=$2
4700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4701$as_echo_n "checking for $ac_word... " >&6; }
4702if ${ac_cv_path_CXX+:} false; then :
4703 $as_echo_n "(cached) " >&6
4704else
4705 case $CXX in
4706 [\\/]* | ?:[\\/]*)
4707 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4708 ;;
4709 *)
4710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in notfound
4712do
4713 IFS=$as_save_IFS
4714 test -z "$as_dir" && as_dir=.
4715 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004717 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4719 break 2
4720 fi
4721done
4722 done
4723IFS=$as_save_IFS
4724
4725 ;;
4726esac
4727fi
4728CXX=$ac_cv_path_CXX
4729if test -n "$CXX"; then
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4731$as_echo "$CXX" >&6; }
4732else
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
4735fi
4736
4737
4738fi
4739if test -z "$ac_cv_path_CXX"; then
4740 ac_pt_CXX=$CXX
4741 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745if ${ac_cv_path_ac_pt_CXX+:} false; then :
4746 $as_echo_n "(cached) " >&6
4747else
4748 case $ac_pt_CXX in
4749 [\\/]* | ?:[\\/]*)
4750 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4751 ;;
4752 *)
4753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in notfound
4755do
4756 IFS=$as_save_IFS
4757 test -z "$as_dir" && as_dir=.
4758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4762 break 2
4763 fi
4764done
4765 done
4766IFS=$as_save_IFS
4767
4768 ;;
4769esac
4770fi
4771ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4772if test -n "$ac_pt_CXX"; then
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4774$as_echo "$ac_pt_CXX" >&6; }
4775else
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780 if test "x$ac_pt_CXX" = x; then
4781 CXX="g++"
4782 else
4783 case $cross_compiling:$ac_tool_warned in
4784yes:)
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4787ac_tool_warned=yes ;;
4788esac
4789 CXX=$ac_pt_CXX
4790 fi
4791else
4792 CXX="$ac_cv_path_CXX"
4793fi
4794 ;;
4795 cc) if test -n "$ac_tool_prefix"; then
4796 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4797set dummy ${ac_tool_prefix}c++; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004800if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802else
4803 case $CXX in
4804 [\\/]* | ?:[\\/]*)
4805 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4806 ;;
4807 *)
4808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in notfound
4810do
4811 IFS=$as_save_IFS
4812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 break 2
4818 fi
4819done
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004821IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 ;;
4824esac
4825fi
4826CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4829$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830else
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004834
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835
4836fi
4837if test -z "$ac_cv_path_CXX"; then
4838 ac_pt_CXX=$CXX
4839 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 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 +00004849 ;;
4850 *)
4851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4852for as_dir in notfound
4853do
4854 IFS=$as_save_IFS
4855 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 break 2
4861 fi
4862done
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004864IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866 ;;
4867esac
4868fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4870if test -n "$ac_pt_CXX"; then
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4872$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873else
Matthias Kloseb9621712010-04-24 17:59:49 +00004874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4875$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004877
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004878 if test "x$ac_pt_CXX" = x; then
4879 CXX="c++"
4880 else
4881 case $cross_compiling:$ac_tool_warned in
4882yes:)
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4885ac_tool_warned=yes ;;
4886esac
4887 CXX=$ac_pt_CXX
4888 fi
4889else
4890 CXX="$ac_cv_path_CXX"
4891fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004892 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893 clang|*/clang) if test -n "$ac_tool_prefix"; then
4894 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4895set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if ${ac_cv_path_CXX+:} false; then :
4899 $as_echo_n "(cached) " >&6
4900else
4901 case $CXX in
4902 [\\/]* | ?:[\\/]*)
4903 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4904 ;;
4905 *)
4906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907for as_dir in notfound
4908do
4909 IFS=$as_save_IFS
4910 test -z "$as_dir" && as_dir=.
4911 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004913 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4915 break 2
4916 fi
4917done
4918 done
4919IFS=$as_save_IFS
4920
Ned Deilycbfb9a52012-06-23 16:02:19 -07004921 ;;
4922esac
4923fi
4924CXX=$ac_cv_path_CXX
4925if test -n "$CXX"; then
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4927$as_echo "$CXX" >&6; }
4928else
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930$as_echo "no" >&6; }
4931fi
4932
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004933
4934fi
4935if test -z "$ac_cv_path_CXX"; then
4936 ac_pt_CXX=$CXX
4937 # Extract the first word of "clang++", so it can be a program name with args.
4938set dummy clang++; ac_word=$2
4939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940$as_echo_n "checking for $ac_word... " >&6; }
4941if ${ac_cv_path_ac_pt_CXX+:} false; then :
4942 $as_echo_n "(cached) " >&6
4943else
4944 case $ac_pt_CXX in
4945 [\\/]* | ?:[\\/]*)
4946 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4947 ;;
4948 *)
4949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4950for as_dir in notfound
4951do
4952 IFS=$as_save_IFS
4953 test -z "$as_dir" && as_dir=.
4954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004956 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4958 break 2
4959 fi
4960done
4961 done
4962IFS=$as_save_IFS
4963
4964 ;;
4965esac
4966fi
4967ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4968if test -n "$ac_pt_CXX"; then
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4970$as_echo "$ac_pt_CXX" >&6; }
4971else
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4973$as_echo "no" >&6; }
4974fi
4975
4976 if test "x$ac_pt_CXX" = x; then
4977 CXX="clang++"
4978 else
4979 case $cross_compiling:$ac_tool_warned in
4980yes:)
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4983ac_tool_warned=yes ;;
4984esac
4985 CXX=$ac_pt_CXX
4986 fi
4987else
4988 CXX="$ac_cv_path_CXX"
4989fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004990 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004991 icc|*/icc) if test -n "$ac_tool_prefix"; then
4992 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4993set dummy ${ac_tool_prefix}icpc; ac_word=$2
4994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4995$as_echo_n "checking for $ac_word... " >&6; }
4996if ${ac_cv_path_CXX+:} false; then :
4997 $as_echo_n "(cached) " >&6
4998else
4999 case $CXX in
5000 [\\/]* | ?:[\\/]*)
5001 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5002 ;;
5003 *)
5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5005for as_dir in notfound
5006do
5007 IFS=$as_save_IFS
5008 test -z "$as_dir" && as_dir=.
5009 for ac_exec_ext in '' $ac_executable_extensions; do
5010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5011 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5013 break 2
5014 fi
5015done
5016 done
5017IFS=$as_save_IFS
5018
5019 ;;
5020esac
5021fi
5022CXX=$ac_cv_path_CXX
5023if test -n "$CXX"; then
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5025$as_echo "$CXX" >&6; }
5026else
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5028$as_echo "no" >&6; }
5029fi
5030
5031
5032fi
5033if test -z "$ac_cv_path_CXX"; then
5034 ac_pt_CXX=$CXX
5035 # Extract the first word of "icpc", so it can be a program name with args.
5036set dummy icpc; ac_word=$2
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_ac_pt_CXX+:} false; then :
5040 $as_echo_n "(cached) " >&6
5041else
5042 case $ac_pt_CXX in
5043 [\\/]* | ?:[\\/]*)
5044 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5045 ;;
5046 *)
5047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in notfound
5049do
5050 IFS=$as_save_IFS
5051 test -z "$as_dir" && as_dir=.
5052 for ac_exec_ext in '' $ac_executable_extensions; do
5053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056 break 2
5057 fi
5058done
5059 done
5060IFS=$as_save_IFS
5061
5062 ;;
5063esac
5064fi
5065ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5066if test -n "$ac_pt_CXX"; then
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5068$as_echo "$ac_pt_CXX" >&6; }
5069else
5070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
5072fi
5073
5074 if test "x$ac_pt_CXX" = x; then
5075 CXX="icpc"
5076 else
5077 case $cross_compiling:$ac_tool_warned in
5078yes:)
5079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5081ac_tool_warned=yes ;;
5082esac
5083 CXX=$ac_pt_CXX
5084 fi
5085else
5086 CXX="$ac_cv_path_CXX"
5087fi
5088 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089 esac
5090 if test "$CXX" = "notfound"
5091 then
5092 CXX=""
5093 fi
5094fi
5095if test -z "$CXX"
5096then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 if test -n "$ac_tool_prefix"; then
5098 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5099 do
5100 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5101set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005104if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106else
5107 if test -n "$CXX"; then
5108 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005117 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119 break 2
5120 fi
5121done
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125fi
5126fi
5127CXX=$ac_cv_prog_CXX
5128if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5130$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131else
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005134fi
5135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 test -n "$CXX" && break
5138 done
5139fi
5140if test -z "$CXX"; then
5141 ac_ct_CXX=$CXX
5142 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5143do
5144 # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5149 $as_echo_n "(cached) " >&6
5150else
5151 if test -n "$ac_ct_CXX"; then
5152 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157 IFS=$as_save_IFS
5158 test -z "$as_dir" && as_dir=.
5159 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005160 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005161 ac_cv_prog_ac_ct_CXX="$ac_prog"
5162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5163 break 2
5164 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005165done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005166 done
5167IFS=$as_save_IFS
5168
5169fi
5170fi
5171ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5172if test -n "$ac_ct_CXX"; then
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5174$as_echo "$ac_ct_CXX" >&6; }
5175else
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181 test -n "$ac_ct_CXX" && break
5182done
5183
5184 if test "x$ac_ct_CXX" = x; then
5185 CXX="notfound"
5186 else
5187 case $cross_compiling:$ac_tool_warned in
5188yes:)
5189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5191ac_tool_warned=yes ;;
5192esac
5193 CXX=$ac_ct_CXX
5194 fi
5195fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196
5197 if test "$CXX" = "notfound"
5198 then
5199 CXX=""
5200 fi
5201fi
5202if test "$preset_cxx" != "$CXX"
5203then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005204 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005205
5206 By default, distutils will build C++ extension modules with \"$CXX\".
5207 If this is not intended, then set CXX on the configure command line.
5208 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005209$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005210
5211 By default, distutils will build C++ extension modules with \"$CXX\".
5212 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005213 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005214fi
5215
5216
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5218
5219
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5221$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5222cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005223#undef bfin
5224#undef cris
5225#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef hppa
5228#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005229#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005231#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005232#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005233#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005234#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005235 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005236#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005237# if defined(__x86_64__) && defined(__LP64__)
5238 x86_64-linux-gnu
5239# elif defined(__x86_64__) && defined(__ILP32__)
5240 x86_64-linux-gnux32
5241# elif defined(__i386__)
5242 i386-linux-gnu
5243# elif defined(__aarch64__) && defined(__AARCH64EL__)
5244# if defined(__ILP32__)
5245 aarch64_ilp32-linux-gnu
5246# else
5247 aarch64-linux-gnu
5248# endif
5249# elif defined(__aarch64__) && defined(__AARCH64EB__)
5250# if defined(__ILP32__)
5251 aarch64_be_ilp32-linux-gnu
5252# else
5253 aarch64_be-linux-gnu
5254# endif
5255# elif defined(__alpha__)
5256 alpha-linux-gnu
5257# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5258# if defined(__ARMEL__)
5259 arm-linux-gnueabihf
5260# else
5261 armeb-linux-gnueabihf
5262# endif
5263# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5264# if defined(__ARMEL__)
5265 arm-linux-gnueabi
5266# else
5267 armeb-linux-gnueabi
5268# endif
5269# elif defined(__hppa__)
5270 hppa-linux-gnu
5271# elif defined(__ia64__)
5272 ia64-linux-gnu
5273# elif defined(__m68k__) && !defined(__mcoldfire__)
5274 m68k-linux-gnu
5275# elif defined(__mips_hard_float) && defined(_MIPSEL)
5276# if _MIPS_SIM == _ABIO32
5277 mipsel-linux-gnu
5278# elif _MIPS_SIM == _ABIN32
5279 mips64el-linux-gnuabin32
5280# elif _MIPS_SIM == _ABI64
5281 mips64el-linux-gnuabi64
5282# else
5283# error unknown platform triplet
5284# endif
5285# elif defined(__mips_hard_float)
5286# if _MIPS_SIM == _ABIO32
5287 mips-linux-gnu
5288# elif _MIPS_SIM == _ABIN32
5289 mips64-linux-gnuabin32
5290# elif _MIPS_SIM == _ABI64
5291 mips64-linux-gnuabi64
5292# else
5293# error unknown platform triplet
5294# endif
5295# elif defined(__or1k__)
5296 or1k-linux-gnu
5297# elif defined(__powerpc__) && defined(__SPE__)
5298 powerpc-linux-gnuspe
5299# elif defined(__powerpc64__)
5300# if defined(__LITTLE_ENDIAN__)
5301 powerpc64le-linux-gnu
5302# else
5303 powerpc64-linux-gnu
5304# endif
5305# elif defined(__powerpc__)
5306 powerpc-linux-gnu
5307# elif defined(__s390x__)
5308 s390x-linux-gnu
5309# elif defined(__s390__)
5310 s390-linux-gnu
5311# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5312 sh4-linux-gnu
5313# elif defined(__sparc__) && defined(__arch64__)
5314 sparc64-linux-gnu
5315# elif defined(__sparc__)
5316 sparc-linux-gnu
5317# else
5318# error unknown platform triplet
5319# endif
5320#elif defined(__FreeBSD_kernel__)
5321# if defined(__LP64__)
5322 x86_64-kfreebsd-gnu
5323# elif defined(__i386__)
5324 i386-kfreebsd-gnu
5325# else
5326# error unknown platform triplet
5327# endif
5328#elif defined(__gnu_hurd__)
5329 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005330#elif defined(__APPLE__)
5331 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332#else
5333# error unknown platform triplet
5334#endif
5335
5336EOF
5337
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005338if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005339 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5341$as_echo "$PLATFORM_TRIPLET" >&6; }
5342else
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5344$as_echo "none" >&6; }
5345fi
5346rm -f conftest.c conftest.out
5347
5348if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5349 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5350 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5351 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005352elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5353 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005354fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005355
doko@ubuntu.com55532312016-06-14 08:55:19 +02005356if test x$MULTIARCH != x; then
5357 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5358fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359
5360
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5362$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5363save_LDFLAGS="$LDFLAGS"
5364LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005365
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5367/* end confdefs.h. */
5368
5369int
5370main ()
5371{
5372
5373 ;
5374 return 0;
5375}
5376_ACEOF
5377if ac_fn_c_try_link "$LINENO"; then :
5378 NO_AS_NEEDED="-Wl,--no-as-needed"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5380$as_echo "yes" >&6; }
5381else
5382 NO_AS_NEEDED=""
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5384$as_echo "no" >&6; }
5385fi
5386rm -f core conftest.err conftest.$ac_objext \
5387 conftest$ac_exeext conftest.$ac_ext
5388LDFLAGS="$save_LDFLAGS"
5389
5390
5391
5392# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393
Matthias Kloseb9621712010-04-24 17:59:49 +00005394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5395$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005396if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398else
5399 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5400 then ac_cv_path_EGREP="$GREP -E"
5401 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 # Loop through the user's path and test for each of PROGNAME-LIST
5405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5407do
5408 IFS=$as_save_IFS
5409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 for ac_prog in egrep; do
5411 for ac_exec_ext in '' $ac_executable_extensions; do
5412 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005413 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005414# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 # Check for GNU $ac_path_EGREP
5416case `"$ac_path_EGREP" --version 2>&1` in
5417*GNU*)
5418 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5419*)
5420 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 while :
5423 do
5424 cat "conftest.in" "conftest.in" >"conftest.tmp"
5425 mv "conftest.tmp" "conftest.in"
5426 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5429 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5432 # Best one so far, save it but keep looking for a better one
5433 ac_cv_path_EGREP="$ac_path_EGREP"
5434 ac_path_EGREP_max=$ac_count
5435 fi
5436 # 10*(2^10) chars as input seems more than enough
5437 test $ac_count -gt 10 && break
5438 done
5439 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5440esac
5441
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $ac_path_EGREP_found && break 3
5443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005448 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 +00005449 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450else
5451 ac_cv_path_EGREP=$EGREP
5452fi
5453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005454 fi
5455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5457$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005459
5460
Matthias Kloseb9621712010-04-24 17:59:49 +00005461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5462$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005463if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 $as_echo_n "(cached) " >&6
5465else
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005468#include <stdlib.h>
5469#include <stdarg.h>
5470#include <string.h>
5471#include <float.h>
5472
5473int
5474main ()
5475{
5476
5477 ;
5478 return 0;
5479}
5480_ACEOF
5481if ac_fn_c_try_compile "$LINENO"; then :
5482 ac_cv_header_stdc=yes
5483else
5484 ac_cv_header_stdc=no
5485fi
5486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491/* end confdefs.h. */
5492#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005493
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005496 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005498else
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005501rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502
Matthias Kloseb9621712010-04-24 17:59:49 +00005503fi
5504
5505if test $ac_cv_header_stdc = yes; then
5506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5508/* end confdefs.h. */
5509#include <stdlib.h>
5510
5511_ACEOF
5512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5513 $EGREP "free" >/dev/null 2>&1; then :
5514
5515else
5516 ac_cv_header_stdc=no
5517fi
5518rm -f conftest*
5519
5520fi
5521
5522if test $ac_cv_header_stdc = yes; then
5523 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5524 if test "$cross_compiling" = yes; then :
5525 :
5526else
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h. */
5529#include <ctype.h>
5530#include <stdlib.h>
5531#if ((' ' & 0x0FF) == 0x020)
5532# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5533# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5534#else
5535# define ISLOWER(c) \
5536 (('a' <= (c) && (c) <= 'i') \
5537 || ('j' <= (c) && (c) <= 'r') \
5538 || ('s' <= (c) && (c) <= 'z'))
5539# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5540#endif
5541
5542#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5543int
5544main ()
5545{
5546 int i;
5547 for (i = 0; i < 256; i++)
5548 if (XOR (islower (i), ISLOWER (i))
5549 || toupper (i) != TOUPPER (i))
5550 return 2;
5551 return 0;
5552}
5553_ACEOF
5554if ac_fn_c_try_run "$LINENO"; then :
5555
5556else
5557 ac_cv_header_stdc=no
5558fi
5559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5560 conftest.$ac_objext conftest.beam conftest.$ac_ext
5561fi
5562
5563fi
5564fi
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5566$as_echo "$ac_cv_header_stdc" >&6; }
5567if test $ac_cv_header_stdc = yes; then
5568
5569$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5570
5571fi
5572
5573# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5574for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5575 inttypes.h stdint.h unistd.h
5576do :
5577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5578ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5579"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 cat >>confdefs.h <<_ACEOF
5582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5583_ACEOF
5584
5585fi
5586
5587done
5588
5589
5590
5591 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 +02005592if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005593 MINIX=yes
5594else
5595 MINIX=
5596fi
5597
5598
5599 if test "$MINIX" = yes; then
5600
5601$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5602
5603
5604$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5605
5606
5607$as_echo "#define _MINIX 1" >>confdefs.h
5608
5609 fi
5610
5611
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5613$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005614if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005615 $as_echo_n "(cached) " >&6
5616else
5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618/* end confdefs.h. */
5619
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005620# define __EXTENSIONS__ 1
5621 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005622int
5623main ()
5624{
5625
5626 ;
5627 return 0;
5628}
5629_ACEOF
5630if ac_fn_c_try_compile "$LINENO"; then :
5631 ac_cv_safe_to_define___extensions__=yes
5632else
5633 ac_cv_safe_to_define___extensions__=no
5634fi
5635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5636fi
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5638$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5639 test $ac_cv_safe_to_define___extensions__ = yes &&
5640 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5641
5642 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5643
5644 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5645
5646 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5647
5648 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5649
5650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
Xavier de Gaye95750b12016-07-09 11:05:42 +02005652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5653$as_echo_n "checking for the Android API level... " >&6; }
5654cat >> conftest.c <<EOF
5655#ifdef __ANDROID__
5656#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005657android_api = __ANDROID_API__
5658arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659#else
5660#error not Android
5661#endif
5662EOF
5663
5664if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005665 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5666 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5668$as_echo "$ANDROID_API_LEVEL" >&6; }
5669
5670cat >>confdefs.h <<_ACEOF
5671#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5672_ACEOF
5673
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005674
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5676$as_echo_n "checking for the Android arm ABI... " >&6; }
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5678$as_echo "$_arm_arch" >&6; }
5679 if test "$_arm_arch" = 7; then
5680 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5681 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5682 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005683else
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5685$as_echo "not Android" >&6; }
5686fi
5687rm -f conftest.c conftest.out
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689# Check for unsupported systems
5690case $ac_sys_system/$ac_sys_release in
5691atheos*|Linux*/1*)
5692 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5693 echo See README for details.
5694 exit 1;;
5695esac
5696
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5699$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
5701# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 withval=$with_suffix;
5704 case $withval in
5705 no) EXEEXT=;;
5706 yes) EXEEXT=.exe;;
5707 *) EXEEXT=$withval;;
5708 esac
5709fi
5710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5712$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# Test whether we're running on a non-case-sensitive system, in which
5715# case we give a warning if no ext is given
5716
Matthias Kloseb9621712010-04-24 17:59:49 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5718$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719if test ! -d CaseSensitiveTestDir; then
5720mkdir CaseSensitiveTestDir
5721fi
5722
5723if test -d casesensitivetestdir
5724then
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5726$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727 BUILDEXEEXT=.exe
5728else
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 BUILDEXEEXT=$EXEEXT
5732fi
5733rmdir CaseSensitiveTestDir
5734
5735case $MACHDEP in
5736bsdos*)
5737 case $CC in
5738 gcc) CC="$CC -D_HAVE_BSDI";;
5739 esac;;
5740esac
5741
5742case $ac_sys_system in
5743hp*|HP*)
5744 case $CC in
5745 cc|*/cc) CC="$CC -Ae";;
5746 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747esac
5748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5751$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752if test -z "$LIBRARY"
5753then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005754 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5757$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
5759# LDLIBRARY is the name of the library to link against (as opposed to the
5760# name of the library into which to insert object files). BLDLIBRARY is also
5761# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5762# is blank as the main program is not linked directly against LDLIBRARY.
5763# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5764# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5765# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5766# DLLLIBRARY is the shared (i.e., DLL) library.
5767#
5768# RUNSHARED is used to run shared python without installed libraries
5769#
5770# INSTSONAME is the name of the shared library that will be use to install
5771# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005772#
5773# LDVERSION is the shared library version number, normally the Python version
5774# with the ABI build flags appended.
5775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
5777
5778
5779
5780
5781
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783LDLIBRARY="$LIBRARY"
5784BLDLIBRARY='$(LDLIBRARY)'
5785INSTSONAME='$(LDLIBRARY)'
5786DLLLIBRARY=''
5787LDLIBRARYDIR=''
5788RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005789LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
5791# LINKCC is the command that links the python executable -- default is $(CC).
5792# If CXX is set, and if it is needed to link a main function that was
5793# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5794# python might then depend on the C++ runtime
5795# This is altered for AIX in order to build the export list before
5796# linking.
5797
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5799$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800if test -z "$LINKCC"
5801then
5802 LINKCC='$(PURIFY) $(MAINCC)'
5803 case $ac_sys_system in
5804 AIX*)
5805 exp_extra="\"\""
5806 if test $ac_sys_release -ge 5 -o \
5807 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5808 exp_extra="."
5809 fi
5810 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 QNX*)
5812 # qcc must be used because the other compilers do not
5813 # support -N.
5814 LINKCC=qcc;;
5815 esac
5816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5818$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
5820# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5821# make sure we default having it set to "no": this is used by
5822# distutils.unixccompiler to know if it should add --enable-new-dtags
5823# to linker command lines, and failing to detect GNU ld simply results
5824# in the same bahaviour as before.
5825
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5827$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828ac_prog=ld
5829if test "$GCC" = yes; then
5830 ac_prog=`$CC -print-prog-name=ld`
5831fi
5832case `"$ac_prog" -V 2>&1 < /dev/null` in
5833 *GNU*)
5834 GNULD=yes;;
5835 *)
5836 GNULD=no;;
5837esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5839$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
Matthias Kloseb9621712010-04-24 17:59:49 +00005841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5842$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005844if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845 enableval=$enable_shared;
5846fi
5847
5848
5849if test -z "$enable_shared"
5850then
5851 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005852 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853 enable_shared="yes";;
5854 *)
5855 enable_shared="no";;
5856 esac
5857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5859$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5862$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865 enableval=$enable_profiling;
5866fi
5867
5868if test "x$enable_profiling" = xyes; then
5869 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005870 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872/* end confdefs.h. */
5873int main() { return 0; }
5874_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875if ac_fn_c_try_link "$LINENO"; then :
5876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005878 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880rm -f core conftest.err conftest.$ac_objext \
5881 conftest$ac_exeext conftest.$ac_ext
5882 CC="$ac_save_cc"
5883else
5884 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5887$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888
doko@ubuntu.comba015832012-06-30 16:52:05 +02005889if test "x$enable_profiling" = xyes; then
5890 BASECFLAGS="-pg $BASECFLAGS"
5891 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
5893
Matthias Kloseb9621712010-04-24 17:59:49 +00005894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5895$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
5897# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5898# library that we build, but we do not want to link against it (we
5899# will find it with a -framework option). For this reason there is an
5900# extra variable BLDLIBRARY against which Python and the extension
5901# modules are linked, BLDLIBRARY. This is normally the same as
5902# LDLIBRARY, but empty for MacOSX framework builds.
5903if test "$enable_framework"
5904then
5905 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005906 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 BLDLIBRARY=''
5908else
5909 BLDLIBRARY='$(LDLIBRARY)'
5910fi
5911
5912# Other platforms follow
5913if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005914 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
Matthias Kloseb9621712010-04-24 17:59:49 +00005916$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917
5918 case $ac_sys_system in
5919 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).dll.a'
5921 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
5923 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
5925 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005929 then
5930 PY3LIBRARY=libpython3.so
5931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005933 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).so'
5935 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005936 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005938 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005939 then
5940 PY3LIBRARY=libpython3.so
5941 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
5943 hp*|HP*)
5944 case `uname -m` in
5945 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
5948 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
5951 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005953 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).dylib'
5957 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005958 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005960 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005962 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005963 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964
5965 esac
5966else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005967 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 case $ac_sys_system in
5969 CYGWIN*)
5970 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005971 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ;;
5973 esac
5974fi
5975
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005976if test "$cross_compiling" = yes; then
5977 RUNSHARED=
5978fi
5979
Matthias Kloseb9621712010-04-24 17:59:49 +00005980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5981$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982
5983if test -n "$ac_tool_prefix"; then
5984 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5985set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005988if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990else
5991 if test -n "$RANLIB"; then
5992 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997 IFS=$as_save_IFS
5998 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 break 2
6004 fi
6005done
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007IFS=$as_save_IFS
6008
6009fi
6010fi
6011RANLIB=$ac_cv_prog_RANLIB
6012if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6014$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018fi
6019
6020
6021fi
6022if test -z "$ac_cv_prog_RANLIB"; then
6023 ac_ct_RANLIB=$RANLIB
6024 # Extract the first word of "ranlib", so it can be a program name with args.
6025set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6027$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006028if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030else
6031 if test -n "$ac_ct_RANLIB"; then
6032 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6033else
6034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035for as_dir in $PATH
6036do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043 break 2
6044 fi
6045done
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047IFS=$as_save_IFS
6048
6049fi
6050fi
6051ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6052if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6054$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055else
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058fi
6059
6060 if test "x$ac_ct_RANLIB" = x; then
6061 RANLIB=":"
6062 else
6063 case $cross_compiling:$ac_tool_warned in
6064yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067ac_tool_warned=yes ;;
6068esac
6069 RANLIB=$ac_ct_RANLIB
6070 fi
6071else
6072 RANLIB="$ac_cv_prog_RANLIB"
6073fi
6074
6075
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006076if test -n "$ac_tool_prefix"; then
6077 for ac_prog in ar aal
6078 do
6079 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6080set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6082$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006083if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085else
6086 if test -n "$AR"; then
6087 ac_cv_prog_AR="$AR" # Let the user override the test.
6088else
6089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092 IFS=$as_save_IFS
6093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006096 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098 break 2
6099 fi
6100done
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102IFS=$as_save_IFS
6103
6104fi
6105fi
6106AR=$ac_cv_prog_AR
6107if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6109$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110else
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006113fi
6114
6115
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006116 test -n "$AR" && break
6117 done
6118fi
6119if test -z "$AR"; then
6120 ac_ct_AR=$AR
6121 for ac_prog in ar aal
6122do
6123 # Extract the first word of "$ac_prog", so it can be a program name with args.
6124set dummy $ac_prog; ac_word=$2
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126$as_echo_n "checking for $ac_word... " >&6; }
6127if ${ac_cv_prog_ac_ct_AR+:} false; then :
6128 $as_echo_n "(cached) " >&6
6129else
6130 if test -n "$ac_ct_AR"; then
6131 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6132else
6133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134for as_dir in $PATH
6135do
6136 IFS=$as_save_IFS
6137 test -z "$as_dir" && as_dir=.
6138 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006140 ac_cv_prog_ac_ct_AR="$ac_prog"
6141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142 break 2
6143 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006145 done
6146IFS=$as_save_IFS
6147
6148fi
6149fi
6150ac_ct_AR=$ac_cv_prog_ac_ct_AR
6151if test -n "$ac_ct_AR"; then
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6153$as_echo "$ac_ct_AR" >&6; }
6154else
6155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6156$as_echo "no" >&6; }
6157fi
6158
6159
6160 test -n "$ac_ct_AR" && break
6161done
6162
6163 if test "x$ac_ct_AR" = x; then
6164 AR="ar"
6165 else
6166 case $cross_compiling:$ac_tool_warned in
6167yes:)
6168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6170ac_tool_warned=yes ;;
6171esac
6172 AR=$ac_ct_AR
6173 fi
6174fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175
6176
6177# tweak ARFLAGS only if the user didn't set it on the command line
6178
6179if test -z "$ARFLAGS"
6180then
6181 ARFLAGS="rc"
6182fi
6183
doko@ubuntu.com58844492012-06-30 18:25:32 +02006184if test -n "$ac_tool_prefix"; then
6185 for ac_prog in readelf
6186 do
6187 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6188set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6190$as_echo_n "checking for $ac_word... " >&6; }
6191if ${ac_cv_prog_READELF+:} false; then :
6192 $as_echo_n "(cached) " >&6
6193else
6194 if test -n "$READELF"; then
6195 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6196else
6197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200 IFS=$as_save_IFS
6201 test -z "$as_dir" && as_dir=.
6202 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006203 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006204 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6205 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206 break 2
6207 fi
6208done
6209 done
6210IFS=$as_save_IFS
6211
6212fi
6213fi
6214READELF=$ac_cv_prog_READELF
6215if test -n "$READELF"; then
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6217$as_echo "$READELF" >&6; }
6218else
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220$as_echo "no" >&6; }
6221fi
6222
6223
6224 test -n "$READELF" && break
6225 done
6226fi
6227if test -z "$READELF"; then
6228 ac_ct_READELF=$READELF
6229 for ac_prog in readelf
6230do
6231 # Extract the first word of "$ac_prog", so it can be a program name with args.
6232set dummy $ac_prog; ac_word=$2
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234$as_echo_n "checking for $ac_word... " >&6; }
6235if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6236 $as_echo_n "(cached) " >&6
6237else
6238 if test -n "$ac_ct_READELF"; then
6239 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6240else
6241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6242for as_dir in $PATH
6243do
6244 IFS=$as_save_IFS
6245 test -z "$as_dir" && as_dir=.
6246 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006247 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006248 ac_cv_prog_ac_ct_READELF="$ac_prog"
6249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6250 break 2
6251 fi
6252done
6253 done
6254IFS=$as_save_IFS
6255
6256fi
6257fi
6258ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6259if test -n "$ac_ct_READELF"; then
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6261$as_echo "$ac_ct_READELF" >&6; }
6262else
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6264$as_echo "no" >&6; }
6265fi
6266
6267
6268 test -n "$ac_ct_READELF" && break
6269done
6270
6271 if test "x$ac_ct_READELF" = x; then
6272 READELF=":"
6273 else
6274 case $cross_compiling:$ac_tool_warned in
6275yes:)
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6277$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6278ac_tool_warned=yes ;;
6279esac
6280 READELF=$ac_ct_READELF
6281 fi
6282fi
6283
6284if test "$cross_compiling" = yes; then
6285 case "$READELF" in
6286 readelf|:)
6287 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6288 ;;
6289 esac
6290fi
6291
6292
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294case $MACHDEP in
6295bsdos*|hp*|HP*)
6296 # install -d does not work on BSDI or HP-UX
6297 if test -z "$INSTALL"
6298 then
6299 INSTALL="${srcdir}/install-sh -c"
6300 fi
6301esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302# Find a good install program. We prefer a C program (faster),
6303# so one script is as good as another. But avoid the broken or
6304# incompatible versions:
6305# SysV /etc/install, /usr/sbin/install
6306# SunOS /usr/etc/install
6307# IRIX /sbin/install
6308# AIX /bin/install
6309# AmigaOS /C/install, which installs bootblocks on floppy discs
6310# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6311# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6312# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6313# OS/2's system install, which has a completely different semantic
6314# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006315# Reject install programs that cannot install multiple files.
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6317$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006319if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321else
6322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325 IFS=$as_save_IFS
6326 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 # Account for people who put trailing slashes in PATH elements.
6328case $as_dir/ in #((
6329 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 /usr/ucb/* ) ;;
6333 *)
6334 # OSF1 and SCO ODT 3.0 have their own names for install.
6335 # Don't use installbsd from OSF since it installs stuff as root
6336 # by default.
6337 for ac_prog in ginstall scoinst install; do
6338 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006339 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340 if test $ac_prog = install &&
6341 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6342 # AIX install. It has an incompatible calling convention.
6343 :
6344 elif test $ac_prog = install &&
6345 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6346 # program-specific install script used by HP pwplus--don't use.
6347 :
6348 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 rm -rf conftest.one conftest.two conftest.dir
6350 echo one > conftest.one
6351 echo two > conftest.two
6352 mkdir conftest.dir
6353 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6354 test -s conftest.one && test -s conftest.two &&
6355 test -s conftest.dir/conftest.one &&
6356 test -s conftest.dir/conftest.two
6357 then
6358 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6359 break 3
6360 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361 fi
6362 fi
6363 done
6364 done
6365 ;;
6366esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006367
6368 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369IFS=$as_save_IFS
6370
Matthias Kloseb9621712010-04-24 17:59:49 +00006371rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372
6373fi
6374 if test "${ac_cv_path_install+set}" = set; then
6375 INSTALL=$ac_cv_path_install
6376 else
6377 # As a last resort, use the slow shell script. Don't cache a
6378 # value for INSTALL within a source directory, because that will
6379 # break other packages using the cache if that directory is
6380 # removed, or if the value is a relative name.
6381 INSTALL=$ac_install_sh
6382 fi
6383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6385$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
6387# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6388# It thinks the first close brace ends the variable substitution.
6389test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6390
6391test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6392
6393test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6394
Matthias Klose93a0ef12012-03-15 18:08:34 +01006395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6396$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6397if test -z "$MKDIR_P"; then
6398 if ${ac_cv_path_mkdir+:} false; then :
6399 $as_echo_n "(cached) " >&6
6400else
6401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6403do
6404 IFS=$as_save_IFS
6405 test -z "$as_dir" && as_dir=.
6406 for ac_prog in mkdir gmkdir; do
6407 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006408 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006409 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6410 'mkdir (GNU coreutils) '* | \
6411 'mkdir (coreutils) '* | \
6412 'mkdir (fileutils) '4.1*)
6413 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6414 break 3;;
6415 esac
6416 done
6417 done
6418 done
6419IFS=$as_save_IFS
6420
6421fi
6422
6423 test -d ./--version && rmdir ./--version
6424 if test "${ac_cv_path_mkdir+set}" = set; then
6425 MKDIR_P="$ac_cv_path_mkdir -p"
6426 else
6427 # As a last resort, use the slow shell script. Don't cache a
6428 # value for MKDIR_P within a source directory, because that will
6429 # break other packages using the cache if that directory is
6430 # removed, or if the value is a relative name.
6431 MKDIR_P="$ac_install_sh -d"
6432 fi
6433fi
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6435$as_echo "$MKDIR_P" >&6; }
6436
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437
6438# Not every filesystem supports hard links
6439
6440if test -z "$LN" ; then
6441 case $ac_sys_system in
6442 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 *) LN=ln;;
6444 esac
6445fi
6446
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006447# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006448
6449ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006450
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006451# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6453$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454
6455# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006456if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006457 withval=$with_pydebug;
6458if test "$withval" != no
6459then
6460
Matthias Kloseb9621712010-04-24 17:59:49 +00006461$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462
Matthias Kloseb9621712010-04-24 17:59:49 +00006463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6464$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006465 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006466 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006467else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469fi
6470else
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473fi
6474
6475
Brett Cannon63d98bc2016-09-06 17:12:40 -07006476# Enable optimization flags
6477
6478
6479Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6481$as_echo_n "checking for --enable-optimizations... " >&6; }
6482# Check whether --enable-optimizations was given.
6483if test "${enable_optimizations+set}" = set; then :
6484 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006485if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006486then
6487 Py_OPT='true'
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6489$as_echo "yes" >&6; };
6490else
6491 Py_OPT='false'
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; };
6494fi
6495else
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
6498fi
6499
6500if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006501 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6502 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006503 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006504 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006505 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006506 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006507 DEF_MAKE_RULE="build_all"
6508else
6509 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006510 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006511 DEF_MAKE_RULE="all"
6512fi
6513
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006514# Enable LTO flags
6515
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6517$as_echo_n "checking for --with-lto... " >&6; }
6518
6519# Check whether --with-lto was given.
6520if test "${with_lto+set}" = set; then :
6521 withval=$with_lto;
6522if test "$withval" != no
6523then
6524 Py_LTO='true'
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6526$as_echo "yes" >&6; };
6527else
6528 Py_LTO='false'
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; };
6531fi
6532else
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535fi
6536
6537if test "$Py_LTO" = 'true' ; then
6538 case $CC in
6539 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006540 case $ac_sys_system in
6541 Darwin*)
6542 # Any changes made here should be reflected in the GCC+Darwin case below
6543 LTOFLAGS="-flto -Wl,-export_dynamic"
6544 ;;
6545 *)
6546 LTOFLAGS="-flto"
6547 ;;
6548 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006549 ;;
6550 *gcc*)
6551 case $ac_sys_system in
6552 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006553 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006554 ;;
6555 *)
6556 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6557 ;;
6558 esac
6559 ;;
6560 esac
6561fi
6562
Brett Cannon7188a3e2015-09-18 15:13:44 -07006563# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006564
6565
6566
6567
6568
Gregory P. Smith799520c2016-09-07 16:10:00 -07006569# Make this work on systems where llvm tools are not installed with their
6570# normal names in the default $PATH (ie: Ubuntu). They exist under the
6571# non-suffixed name in their versioned llvm directory.
6572llvm_bin_dir=''
6573llvm_path="${PATH}"
6574if test "${CC}" = "clang"
6575then
6576 clang_bin=`which clang`
6577 # Some systems install clang elsewhere as a symlink to the real path
6578 # which is where the related llvm tools are located.
6579 if test -L "${clang_bin}"
6580 then
6581 clang_dir=`dirname "${clang_bin}"`
6582 clang_bin=`readlink "${clang_bin}"`
6583 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6584 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6585 fi
6586fi
Zachary Ware5af85642015-12-21 12:09:17 -06006587
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6589$as_echo_n "checking target system type... " >&6; }
6590if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006591 $as_echo_n "(cached) " >&6
6592else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006593 if test "x$target_alias" = x; then
6594 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006595else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006596 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6597 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6598fi
6599
6600fi
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6602$as_echo "$ac_cv_target" >&6; }
6603case $ac_cv_target in
6604*-*-*) ;;
6605*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6606esac
6607target=$ac_cv_target
6608ac_save_IFS=$IFS; IFS='-'
6609set x $ac_cv_target
6610shift
6611target_cpu=$1
6612target_vendor=$2
6613shift; shift
6614# Remember, the first character of IFS is used to create $*,
6615# except with old shells:
6616target_os=$*
6617IFS=$ac_save_IFS
6618case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6619
6620
6621# The aliases save the names the user supplied, while $host etc.
6622# will get canonicalized.
6623test -n "$target_alias" &&
6624 test "$program_prefix$program_suffix$program_transform_name" = \
6625 NONENONEs,x,x, &&
6626 program_prefix=${target_alias}-
6627# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6628set dummy $target_alias-llvm-profdata; ac_word=$2
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6630$as_echo_n "checking for $ac_word... " >&6; }
6631if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6632 $as_echo_n "(cached) " >&6
6633else
6634 case $LLVM_PROFDATA in
6635 [\\/]* | ?:[\\/]*)
6636 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6637 ;;
6638 *)
6639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006641do
6642 IFS=$as_save_IFS
6643 test -z "$as_dir" && as_dir=.
6644 for ac_exec_ext in '' $ac_executable_extensions; do
6645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006646 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6648 break 2
6649 fi
6650done
6651 done
6652IFS=$as_save_IFS
6653
Gregory P. Smith799520c2016-09-07 16:10:00 -07006654 ;;
6655esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006657LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6658if test -n "$LLVM_PROFDATA"; then
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6660$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661else
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663$as_echo "no" >&6; }
6664fi
6665
6666
Gregory P. Smith799520c2016-09-07 16:10:00 -07006667if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6668 if test "$build" = "$target"; then
6669 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6670 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6671set dummy llvm-profdata; ac_word=$2
6672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6673$as_echo_n "checking for $ac_word... " >&6; }
6674if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6675 $as_echo_n "(cached) " >&6
6676else
6677 case $ac_pt_LLVM_PROFDATA in
6678 [\\/]* | ?:[\\/]*)
6679 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6680 ;;
6681 *)
6682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6683for as_dir in ${llvm_path}
6684do
6685 IFS=$as_save_IFS
6686 test -z "$as_dir" && as_dir=.
6687 for ac_exec_ext in '' $ac_executable_extensions; do
6688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6689 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6691 break 2
6692 fi
6693done
6694 done
6695IFS=$as_save_IFS
6696
6697 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6698 ;;
6699esac
6700fi
6701ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6702if test -n "$ac_pt_LLVM_PROFDATA"; then
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6704$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6705else
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707$as_echo "no" >&6; }
6708fi
6709
6710 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6711 else
6712 LLVM_PROFDATA="''"
6713 fi
6714else
6715 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6716fi
6717
6718
6719if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6720then
6721 LLVM_PROF_FOUND="found"
6722else
6723 LLVM_PROF_FOUND="not-found"
6724fi
6725if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6726then
6727 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6728 if test -n "${found_llvm_profdata}"
6729 then
6730 # llvm-profdata isn't directly in $PATH in some cases.
6731 # https://apple.stackexchange.com/questions/197053/
6732 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6733 LLVM_PROF_FOUND=found
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6735$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6736 fi
6737fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006738LLVM_PROF_ERR=no
6739case $CC in
6740 *clang*)
6741 # Any changes made here should be reflected in the GCC+Darwin case below
6742 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6743 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006745 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6746 if test $LLVM_PROF_FOUND = not-found
6747 then
6748 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006749 if test "${REQUIRE_PGO}" = "yes"
6750 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006751 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006752 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006753 fi
6754 ;;
6755 *gcc*)
6756 case $ac_sys_system in
6757 Darwin*)
6758 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6759 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006762 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006763 then
6764 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 if test "${REQUIRE_PGO}" = "yes"
6766 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006767 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006768 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 fi
6770 ;;
6771 *)
6772 PGO_PROF_GEN_FLAG="-fprofile-generate"
6773 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6774 LLVM_PROF_MERGER="true"
6775 LLVM_PROF_FILE=""
6776 ;;
6777 esac
6778 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006779 *icc*)
6780 PGO_PROF_GEN_FLAG="-prof-gen"
6781 PGO_PROF_USE_FLAG="-prof-use"
6782 LLVM_PROF_MERGER="true"
6783 LLVM_PROF_FILE=""
6784 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785esac
6786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6788# merged with this chunk of code?
6789
6790# Optimizer/debugger flags
6791# ------------------------
6792# (The following bit of code is complicated enough - please keep things
6793# indented properly. Just pretend you're editing Python code. ;-)
6794
6795# There are two parallel sets of case statements below, one that checks to
6796# see if OPT was set and one that does BASECFLAGS setting based upon
6797# compiler and platform. BASECFLAGS tweaks need to be made even if the
6798# user set OPT.
6799
6800# tweak OPT based on compiler and platform, only if the user didn't set
6801# it on the command line
6802
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006803if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804then
6805 case $GCC in
6806 yes)
6807 if test "$CC" != 'g++' ; then
6808 STRICT_PROTO="-Wstrict-prototypes"
6809 fi
6810 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6811 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6812 WRAP="-fwrapv"
6813 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006814
6815 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006816 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006817 *clang*)
6818 WRAP="-fwrapv"
6819 # bpo-30104: Python/dtoa.c requires to be build with
6820 # -fno-strict-aliasing to fix compiler issue on the
6821 # double/ULong[2] union using clang 4.0 and optimization level
6822 # -O2 or higher
6823 # https://bugs.llvm.org//show_bug.cgi?id=31928
6824 ALIASING="-fno-strict-aliasing"
6825 ;;
Stefan Krahaf04ff22011-12-08 22:20:31 +01006826 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828 case $ac_cv_prog_cc_g in
6829 yes)
6830 if test "$Py_DEBUG" = 'true' ; then
6831 # Optimization messes up debuggers, so turn it off for
6832 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006833 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006834 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006835 else
Victor Stinner28205b22017-04-21 11:24:34 +02006836 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006837 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838 else
Victor Stinner28205b22017-04-21 11:24:34 +02006839 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840 fi
6841 ;;
6842 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006843 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006844 ;;
6845 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006846
6847 OPT="$OPT $STRICT_PROTO $ALIASING"
6848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 case $ac_sys_system in
6850 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6851 ;;
6852 esac
6853 ;;
6854
6855 *)
6856 OPT="-O"
6857 ;;
6858 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859fi
6860
6861
6862
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864# The -arch flags for universal builds on OSX
6865UNIVERSAL_ARCH_FLAGS=
6866
6867
6868# tweak BASECFLAGS based on compiler and platform
6869case $GCC in
6870yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006871 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006872
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6874$as_echo_n "checking for -Wextra... " >&6; }
6875 ac_save_cc="$CC"
6876 CC="$CC -Wextra -Werror"
6877 if ${ac_cv_extra_warnings+:} false; then :
6878 $as_echo_n "(cached) " >&6
6879else
6880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6881/* end confdefs.h. */
6882
6883
6884int
6885main ()
6886{
6887
6888 ;
6889 return 0;
6890}
6891
6892_ACEOF
6893if ac_fn_c_try_compile "$LINENO"; then :
6894
6895 ac_cv_extra_warnings=yes
6896
6897else
6898
6899 ac_cv_extra_warnings=no
6900
6901fi
6902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6903fi
6904
6905 CC="$ac_save_cc"
6906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6907$as_echo "$ac_cv_extra_warnings" >&6; }
6908
6909 if test $ac_cv_extra_warnings = yes
6910 then
6911 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6912 fi
6913
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006914 # Python doesn't violate C99 aliasing rules, but older versions of
6915 # GCC produce warnings for legal Python code. Enable
6916 # -fno-strict-aliasing on versions of GCC that support but produce
6917 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6919$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920 ac_save_cc="$CC"
6921 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006922 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006923 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006925else
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006928
Matthias Kloseb159a552010-04-25 21:00:44 +00006929
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006930int
6931main ()
6932{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006933
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006934 ;
6935 return 0;
6936}
Matthias Kloseb159a552010-04-25 21:00:44 +00006937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006939if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006940
6941 CC="$ac_save_cc -fstrict-aliasing"
6942 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006944/* end confdefs.h. */
6945
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006946 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006947int
6948main ()
6949{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006950double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006951 ;
6952 return 0;
6953}
Matthias Kloseb159a552010-04-25 21:00:44 +00006954
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006956if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006957
6958 ac_cv_no_strict_aliasing=no
6959
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006960else
Matthias Kloseb159a552010-04-25 21:00:44 +00006961
6962 ac_cv_no_strict_aliasing=yes
6963
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006967else
Matthias Kloseb159a552010-04-25 21:00:44 +00006968
6969 ac_cv_no_strict_aliasing=no
6970
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006971fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006973fi
6974
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006975 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6978$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006979 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980 then
6981 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6982 fi
6983
Zachary Ware5af85642015-12-21 12:09:17 -06006984 # ICC doesn't recognize the option, but only emits a warning
6985 ## XXX does it emit an unused result warning and can it be disabled?
6986 case "$CC" in
6987 *icc*)
6988 ac_cv_disable_unused_result_warning=no
6989 ;;
6990 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6992$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6993 ac_save_cc="$CC"
6994 CC="$CC -Wunused-result -Werror"
6995 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006996 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006997 $as_echo_n "(cached) " >&6
6998else
6999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7000/* end confdefs.h. */
7001
7002
7003int
7004main ()
7005{
7006
7007 ;
7008 return 0;
7009}
7010
7011_ACEOF
7012if ac_fn_c_try_compile "$LINENO"; then :
7013
7014 ac_cv_disable_unused_result_warning=yes
7015
7016else
7017
7018 ac_cv_disable_unused_result_warning=no
7019
7020fi
7021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7022fi
7023
7024 CFLAGS="$save_CFLAGS"
7025 CC="$ac_save_cc"
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7027$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007028 ;;
7029 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007030
7031 if test $ac_cv_disable_unused_result_warning = yes
7032 then
7033 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007034 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7035 fi
7036
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7038$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7039 ac_save_cc="$CC"
7040 CC="$CC -Wunused-parameter -Werror"
7041 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7042 $as_echo_n "(cached) " >&6
7043else
7044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7045/* end confdefs.h. */
7046
7047
7048int
7049main ()
7050{
7051
7052 ;
7053 return 0;
7054}
7055
7056_ACEOF
7057if ac_fn_c_try_compile "$LINENO"; then :
7058
7059 ac_cv_disable_unused_parameter_warning=yes
7060
7061else
7062
7063 ac_cv_disable_unused_parameter_warning=no
7064
7065fi
7066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7067fi
7068
7069 CC="$ac_save_cc"
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7071$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7072
7073 if test $ac_cv_disable_unused_parameter_warning = yes
7074 then
7075 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7076 fi
7077
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7079$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7080 ac_save_cc="$CC"
7081 CC="$CC -Wmissing-field-initializers -Werror"
7082 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7083 $as_echo_n "(cached) " >&6
7084else
7085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7086/* end confdefs.h. */
7087
7088
7089int
7090main ()
7091{
7092
7093 ;
7094 return 0;
7095}
7096
7097_ACEOF
7098if ac_fn_c_try_compile "$LINENO"; then :
7099
7100 ac_cv_disable_missing_field_initializers=yes
7101
7102else
7103
7104 ac_cv_disable_missing_field_initializers=no
7105
7106fi
7107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7108fi
7109
7110 CC="$ac_save_cc"
7111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7112$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7113
7114 if test $ac_cv_disable_missing_field_initializers = yes
7115 then
7116 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007117 fi
7118
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7120$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7121 ac_save_cc="$CC"
7122 CC="$CC -Wsign-compare"
7123 save_CFLAGS="$CFLAGS"
7124 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7125 $as_echo_n "(cached) " >&6
7126else
7127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7128/* end confdefs.h. */
7129
7130
7131int
7132main ()
7133{
7134
7135 ;
7136 return 0;
7137}
7138
7139_ACEOF
7140if ac_fn_c_try_compile "$LINENO"; then :
7141
7142 ac_cv_enable_sign_compare_warning=yes
7143
7144else
7145
7146 ac_cv_enable_sign_compare_warning=no
7147
7148fi
7149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7150fi
7151
7152 CFLAGS="$save_CFLAGS"
7153 CC="$ac_save_cc"
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7155$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7156
7157 if test $ac_cv_enable_sign_compare_warning = yes
7158 then
7159 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7160 fi
7161
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7163$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7164 ac_save_cc="$CC"
7165 CC="$CC -Wunreachable-code"
7166 save_CFLAGS="$CFLAGS"
7167 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7168 $as_echo_n "(cached) " >&6
7169else
7170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7171/* end confdefs.h. */
7172
7173
7174int
7175main ()
7176{
7177
7178 ;
7179 return 0;
7180}
7181
7182_ACEOF
7183if ac_fn_c_try_compile "$LINENO"; then :
7184
7185 ac_cv_enable_unreachable_code_warning=yes
7186
7187else
7188
7189 ac_cv_enable_unreachable_code_warning=no
7190
7191fi
7192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7193fi
7194
7195 CFLAGS="$save_CFLAGS"
7196 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007197
7198 # Don't enable unreachable code warning in debug mode, since it usually
7199 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007200 # Issue #24324: Unfortunately, the unreachable code warning does not work
7201 # correctly on gcc and has been silently removed from the compiler.
7202 # It is supported on clang but on OS X systems gcc may be an alias
7203 # for clang. Try to determine if the compiler is not really gcc and,
7204 # if so, only then enable the warning.
7205 if test $ac_cv_enable_unreachable_code_warning = yes && \
7206 test "$Py_DEBUG" != "true" && \
7207 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007208 then
7209 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007210 else
7211 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007212 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7214$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007215
Victor Stinner193ee0a2017-02-06 14:24:00 +01007216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7217$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7218 ac_save_cc="$CC"
7219 CC="$CC -Werror=implicit-function-declaration"
7220 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7221 $as_echo_n "(cached) " >&6
7222else
7223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7224/* end confdefs.h. */
7225
7226
7227int
7228main ()
7229{
7230
7231 ;
7232 return 0;
7233}
7234
7235_ACEOF
7236if ac_fn_c_try_compile "$LINENO"; then :
7237
7238 ac_cv_enable_implicit_function_declaration_error=yes
7239
7240else
7241
7242 ac_cv_enable_implicit_function_declaration_error=no
7243
7244fi
7245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7246fi
7247
7248 CC="$ac_save_cc"
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7250$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7251
7252 if test $ac_cv_enable_implicit_function_declaration_error = yes
7253 then
7254 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7255 fi
7256
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007257 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7258 # support. Without this, treatment of subnormals doesn't follow
7259 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007260 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007261 alpha*)
7262 BASECFLAGS="$BASECFLAGS -mieee"
7263 ;;
7264 esac
7265
7266 case $ac_sys_system in
7267 SCO_SV*)
7268 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7269 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007270
7271 # is there any other compiler on Darwin besides gcc?
7272 Darwin*)
7273 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7274 # used to be here, but non-Apple gcc doesn't accept them.
7275 if test "${CC}" = gcc
7276 then
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007278$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007279 case "${UNIVERSALSDK}" in
7280 */MacOSX10.4u.sdk)
7281 # Build using 10.4 SDK, force usage of gcc when the
7282 # compiler is gcc, otherwise the user will get very
7283 # confusing error messages when building on OSX 10.6
7284 CC=gcc-4.0
7285 CPP=cpp-4.0
7286 ;;
7287 esac
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007289$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007290 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291
Ned Deily87adb6e2013-10-18 21:09:56 -07007292 if test "${enable_universalsdk}"
7293 then
7294 case "$UNIVERSAL_ARCHS" in
7295 32-bit)
7296 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7297 LIPO_32BIT_FLAGS=""
7298 ARCH_RUN_32BIT=""
7299 ;;
7300 64-bit)
7301 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7302 LIPO_32BIT_FLAGS=""
7303 ARCH_RUN_32BIT="true"
7304 ;;
7305 all)
7306 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7307 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7308 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7309 ;;
7310 intel)
7311 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7312 LIPO_32BIT_FLAGS="-extract i386"
7313 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7314 ;;
7315 intel-32)
7316 UNIVERSAL_ARCH_FLAGS="-arch i386"
7317 LIPO_32BIT_FLAGS=""
7318 ARCH_RUN_32BIT=""
7319 ;;
7320 3-way)
7321 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7322 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7323 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7324 ;;
7325 *)
7326 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7327 ;;
7328 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007329
Ned Deily87adb6e2013-10-18 21:09:56 -07007330 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7331 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7332 if test "${UNIVERSALSDK}" != "/"
7333 then
7334 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7335 fi
7336 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007337
Ned Deily87adb6e2013-10-18 21:09:56 -07007338 # Calculate an appropriate deployment target for this build:
7339 # The deployment target value is used explicitly to enable certain
7340 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007341 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007342 # component of the string returned by distutils.get_platform().
7343 #
7344 # Use the value from:
7345 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7346 # 2. the operating system version of the build machine if >= 10.6
7347 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7348 # below to pick either 10.3, 10.4, or 10.5 as the target.
7349 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350
Ned Deily87adb6e2013-10-18 21:09:56 -07007351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7352$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007353 cur_target_major=`sw_vers -productVersion | \
7354 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7355 cur_target_minor=`sw_vers -productVersion | \
7356 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7357 cur_target="${cur_target_major}.${cur_target_minor}"
7358 if test ${cur_target_major} -eq 10 && \
7359 test ${cur_target_minor} -ge 3 && \
7360 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007361 then
Ned Deily36820b62014-06-25 13:44:22 -07007362 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007363 cur_target=10.3
7364 if test ${enable_universalsdk}
7365 then
7366 case "$UNIVERSAL_ARCHS" in
7367 all|3-way|intel|64-bit)
7368 # These configurations were first supported in 10.5
7369 cur_target='10.5'
7370 ;;
7371 esac
7372 else
7373 if test `/usr/bin/arch` = "i386"
7374 then
7375 # 10.4 was the first release to support Intel archs
7376 cur_target="10.4"
7377 fi
7378 fi
7379 fi
7380 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007381
Ned Deily87adb6e2013-10-18 21:09:56 -07007382 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7383 # environment with a value that is the same as what we'll use
7384 # in the Makefile to ensure that we'll get the same compiler
7385 # environment during configure and build time.
7386 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7387 export MACOSX_DEPLOYMENT_TARGET
7388 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7390$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007391
Ned Deily87adb6e2013-10-18 21:09:56 -07007392 # end of Darwin* tests
7393 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394 esac
7395 ;;
7396
7397*)
7398 case $ac_sys_system in
7399 OpenUNIX*|UnixWare*)
7400 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7401 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402 SCO_SV*)
7403 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7404 ;;
7405 esac
7406 ;;
7407esac
7408
Zachary Ware5af85642015-12-21 12:09:17 -06007409# ICC needs -fp-model strict or floats behave badly
7410case "$CC" in
7411*icc*)
7412 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7413 ;;
7414esac
7415
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416if test "$Py_DEBUG" = 'true'; then
7417 :
7418else
7419 OPT="-DNDEBUG $OPT"
7420fi
7421
7422if test "$ac_arch_flags"
7423then
7424 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7425fi
7426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427# On some compilers, pthreads are available without further options
7428# (e.g. MacOS X). On some of these systems, the compiler will not
7429# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7430# So we have to see first whether pthreads are available without
7431# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7433$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007434if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007435 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436else
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438 ac_cv_pthread_is_default=no
7439else
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441/* end confdefs.h. */
7442
Stefan Krah7dba5942012-11-22 22:49:11 +01007443#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444#include <pthread.h>
7445
7446void* routine(void* p){return NULL;}
7447
7448int main(){
7449 pthread_t p;
7450 if(pthread_create(&p,NULL,routine,NULL)!=0)
7451 return 1;
7452 (void)pthread_detach(p);
7453 return 0;
7454}
7455
7456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007457if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007458
7459 ac_cv_pthread_is_default=yes
7460 ac_cv_kthread=no
7461 ac_cv_pthread=no
7462
7463else
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7467 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468fi
7469
7470
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471fi
7472
Matthias Kloseb9621712010-04-24 17:59:49 +00007473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7474$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475
7476
7477if test $ac_cv_pthread_is_default = yes
7478then
7479 ac_cv_kpthread=no
7480else
7481# -Kpthread, if available, provides the right #defines
7482# and linker options to make pthread_create available
7483# Some compilers won't report that they do not support -Kpthread,
7484# so we need to run a program to see whether it really made the
7485# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7487$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007488if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490else
7491 ac_save_cc="$CC"
7492CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007493if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494 ac_cv_kpthread=no
7495else
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497/* end confdefs.h. */
7498
Stefan Krah7dba5942012-11-22 22:49:11 +01007499#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500#include <pthread.h>
7501
7502void* routine(void* p){return NULL;}
7503
7504int main(){
7505 pthread_t p;
7506 if(pthread_create(&p,NULL,routine,NULL)!=0)
7507 return 1;
7508 (void)pthread_detach(p);
7509 return 0;
7510}
7511
7512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007513if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514 ac_cv_kpthread=yes
7515else
Matthias Kloseb9621712010-04-24 17:59:49 +00007516 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520fi
7521
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522CC="$ac_save_cc"
7523fi
7524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7526$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527fi
7528
7529if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7530then
7531# -Kthread, if available, provides the right #defines
7532# and linker options to make pthread_create available
7533# Some compilers won't report that they do not support -Kthread,
7534# so we need to run a program to see whether it really made the
7535# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7537$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007538if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540else
7541 ac_save_cc="$CC"
7542CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007543if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544 ac_cv_kthread=no
7545else
Matthias Kloseb9621712010-04-24 17:59:49 +00007546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547/* end confdefs.h. */
7548
Stefan Krah7dba5942012-11-22 22:49:11 +01007549#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550#include <pthread.h>
7551
7552void* routine(void* p){return NULL;}
7553
7554int main(){
7555 pthread_t p;
7556 if(pthread_create(&p,NULL,routine,NULL)!=0)
7557 return 1;
7558 (void)pthread_detach(p);
7559 return 0;
7560}
7561
7562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007563if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564 ac_cv_kthread=yes
7565else
Matthias Kloseb9621712010-04-24 17:59:49 +00007566 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570fi
7571
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572CC="$ac_save_cc"
7573fi
7574
Matthias Kloseb9621712010-04-24 17:59:49 +00007575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7576$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577fi
7578
7579if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7580then
7581# -pthread, if available, provides the right #defines
7582# and linker options to make pthread_create available
7583# Some compilers won't report that they do not support -pthread,
7584# so we need to run a program to see whether it really made the
7585# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7587$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007588if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007589 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590else
7591 ac_save_cc="$CC"
7592CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007593if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594 ac_cv_pthread=no
7595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597/* end confdefs.h. */
7598
Stefan Krah7dba5942012-11-22 22:49:11 +01007599#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600#include <pthread.h>
7601
7602void* routine(void* p){return NULL;}
7603
7604int main(){
7605 pthread_t p;
7606 if(pthread_create(&p,NULL,routine,NULL)!=0)
7607 return 1;
7608 (void)pthread_detach(p);
7609 return 0;
7610}
7611
7612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007613if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614 ac_cv_pthread=yes
7615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620fi
7621
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622CC="$ac_save_cc"
7623fi
7624
Matthias Kloseb9621712010-04-24 17:59:49 +00007625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7626$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627fi
7628
7629# If we have set a CC compiler flag for thread support then
7630# check if it works for CXX, too.
7631ac_cv_cxx_thread=no
7632if test ! -z "$CXX"
7633then
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7635$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636ac_save_cxx="$CXX"
7637
7638if test "$ac_cv_kpthread" = "yes"
7639then
7640 CXX="$CXX -Kpthread"
7641 ac_cv_cxx_thread=yes
7642elif test "$ac_cv_kthread" = "yes"
7643then
7644 CXX="$CXX -Kthread"
7645 ac_cv_cxx_thread=yes
7646elif test "$ac_cv_pthread" = "yes"
7647then
7648 CXX="$CXX -pthread"
7649 ac_cv_cxx_thread=yes
7650fi
7651
7652if test $ac_cv_cxx_thread = yes
7653then
7654 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7655 $CXX -c conftest.$ac_ext 2>&5
7656 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7657 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7658 then
7659 ac_cv_cxx_thread=yes
7660 else
7661 ac_cv_cxx_thread=no
7662 fi
7663 rm -fr conftest*
7664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7666$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667fi
7668CXX="$ac_save_cxx"
7669
7670
7671# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7673$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007674if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678/* end confdefs.h. */
7679#include <stdlib.h>
7680#include <stdarg.h>
7681#include <string.h>
7682#include <float.h>
7683
7684int
7685main ()
7686{
7687
7688 ;
7689 return 0;
7690}
7691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007692if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693 ac_cv_header_stdc=yes
7694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7698
7699if test $ac_cv_header_stdc = yes; then
7700 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702/* end confdefs.h. */
7703#include <string.h>
7704
7705_ACEOF
7706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 $EGREP "memchr" >/dev/null 2>&1; then :
7708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709else
7710 ac_cv_header_stdc=no
7711fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007712rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713
7714fi
7715
7716if test $ac_cv_header_stdc = yes; then
7717 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719/* end confdefs.h. */
7720#include <stdlib.h>
7721
7722_ACEOF
7723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 $EGREP "free" >/dev/null 2>&1; then :
7725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726else
7727 ac_cv_header_stdc=no
7728fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007729rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730
7731fi
7732
7733if test $ac_cv_header_stdc = yes; then
7734 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736 :
7737else
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739/* end confdefs.h. */
7740#include <ctype.h>
7741#include <stdlib.h>
7742#if ((' ' & 0x0FF) == 0x020)
7743# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7744# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7745#else
7746# define ISLOWER(c) \
7747 (('a' <= (c) && (c) <= 'i') \
7748 || ('j' <= (c) && (c) <= 'r') \
7749 || ('s' <= (c) && (c) <= 'z'))
7750# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7751#endif
7752
7753#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7754int
7755main ()
7756{
7757 int i;
7758 for (i = 0; i < 256; i++)
7759 if (XOR (islower (i), ISLOWER (i))
7760 || toupper (i) != TOUPPER (i))
7761 return 2;
7762 return 0;
7763}
7764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007765if ac_fn_c_try_run "$LINENO"; then :
7766
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767else
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772fi
7773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774fi
7775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7777$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778if test $ac_cv_header_stdc = yes; then
7779
Matthias Kloseb9621712010-04-24 17:59:49 +00007780$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781
7782fi
7783
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007784for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007785fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007786ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007787sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007788unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007789poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007790sys/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 +01007791sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007792sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007793sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007794sys/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 -07007795libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007796linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007797sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007798do :
7799 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7800ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007801if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007803#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007804_ACEOF
7805
7806fi
7807
Guido van Rossum627b2d71993-12-24 10:39:16 +00007808done
7809
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007810ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007811for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7814$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007815if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007817else
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007819/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007820#include <sys/types.h>
7821#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007822
Martin v. Löwis11437992002-04-12 09:54:03 +00007823int
7824main ()
7825{
7826if ((DIR *) 0)
7827return 0;
7828 ;
7829 return 0;
7830}
7831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007834else
Matthias Kloseb9621712010-04-24 17:59:49 +00007835 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007839eval ac_res=\$$as_ac_Header
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7841$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007842if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007844#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007845_ACEOF
7846
7847ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007848fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007849
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007850done
7851# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7852if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7854$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007855if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007857else
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862/* Override any GCC internal prototype to avoid an error.
7863 Use char because int might match the return type of a GCC
7864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007865#ifdef __cplusplus
7866extern "C"
7867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007868char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007869int
7870main ()
7871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 ;
7874 return 0;
7875}
7876_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877for ac_lib in '' dir; do
7878 if test -z "$ac_lib"; then
7879 ac_res="none required"
7880 else
7881 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007882 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007887rm -f core conftest.err conftest.$ac_objext \
7888 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007889 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892done
Victor Stinnere0be4232011-10-25 13:06:09 +02007893if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895else
7896 ac_cv_search_opendir=no
7897fi
7898rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007899LIBS=$ac_func_search_save_LIBS
7900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7902$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007904if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007906
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007907fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007908
Michael W. Hudson54241132001-12-07 15:38:26 +00007909else
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7911$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007912if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007914else
7915 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919/* Override any GCC internal prototype to avoid an error.
7920 Use char because int might match the return type of a GCC
7921 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007922#ifdef __cplusplus
7923extern "C"
7924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007925char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007926int
7927main ()
7928{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 ;
7931 return 0;
7932}
7933_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934for ac_lib in '' x; do
7935 if test -z "$ac_lib"; then
7936 ac_res="none required"
7937 else
7938 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007939 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007941 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007944rm -f core conftest.err conftest.$ac_objext \
7945 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007946 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949done
Victor Stinnere0be4232011-10-25 13:06:09 +02007950if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952else
7953 ac_cv_search_opendir=no
7954fi
7955rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007956LIBS=$ac_func_search_save_LIBS
7957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7959$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007961if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007964fi
7965
7966fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007967
Matthias Kloseb9621712010-04-24 17:59:49 +00007968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7969$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007970if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007972else
Matthias Kloseb9621712010-04-24 17:59:49 +00007973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007974/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007975#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007976int
7977main ()
7978{
7979return makedev(0, 0);
7980 ;
7981 return 0;
7982}
7983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007985 ac_cv_header_sys_types_h_makedev=yes
7986else
Matthias Kloseb9621712010-04-24 17:59:49 +00007987 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007989rm -f core conftest.err conftest.$ac_objext \
7990 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007991
7992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7994$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007995
7996if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007997ac_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 +02007998if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007999
Matthias Kloseb9621712010-04-24 17:59:49 +00008000$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008001
8002fi
8003
8004
8005
8006 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 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 +02008008if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008009
Matthias Kloseb9621712010-04-24 17:59:49 +00008010$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008011
8012fi
8013
8014
8015 fi
8016fi
8017
Michael W. Hudson54241132001-12-07 15:38:26 +00008018
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008019# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8020# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8021SAVE_CFLAGS=$CFLAGS
8022CFLAGS="-std=c99 $CFLAGS"
8023for ac_header in bluetooth/bluetooth.h
8024do :
8025 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8026if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8027 cat >>confdefs.h <<_ACEOF
8028#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8029_ACEOF
8030
8031fi
8032
8033done
8034
8035CFLAGS=$SAVE_CFLAGS
8036
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008037# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8038for ac_header in net/if.h
8039do :
8040 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8041#ifdef STDC_HEADERS
8042# include <stdlib.h>
8043# include <stddef.h>
8044#else
8045# ifdef HAVE_STDLIB_H
8046# include <stdlib.h>
8047# endif
8048#endif
8049#ifdef HAVE_SYS_SOCKET_H
8050# include <sys/socket.h>
8051#endif
8052
8053"
Victor Stinnere0be4232011-10-25 13:06:09 +02008054if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008055 cat >>confdefs.h <<_ACEOF
8056#define HAVE_NET_IF_H 1
8057_ACEOF
8058
8059fi
8060
8061done
8062
8063
Martin v. Löwis11017b12006-01-14 18:12:57 +00008064# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008065for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008066do :
8067 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 +00008068#ifdef HAVE_ASM_TYPES_H
8069#include <asm/types.h>
8070#endif
8071#ifdef HAVE_SYS_SOCKET_H
8072#include <sys/socket.h>
8073#endif
8074
Matthias Kloseb9621712010-04-24 17:59:49 +00008075"
Victor Stinnere0be4232011-10-25 13:06:09 +02008076if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008077 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008078#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008079_ACEOF
8080
8081fi
8082
8083done
8084
8085
Charles-François Natali47413c12011-10-06 19:47:44 +02008086# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008087for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008088do :
8089 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8090ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8091#ifdef HAVE_SYS_SOCKET_H
8092#include <sys/socket.h>
8093#endif
8094
8095"
8096if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8097 cat >>confdefs.h <<_ACEOF
8098#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8099_ACEOF
8100
8101fi
8102
8103done
8104
8105
Guido van Rossum627b2d71993-12-24 10:39:16 +00008106# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008107was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8109$as_echo_n "checking for clock_t in time.h... " >&6; }
8110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008111/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008112#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008113
8114_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008117 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008118else
Martin v. Löwis11437992002-04-12 09:54:03 +00008119
8120
Matthias Kloseb9621712010-04-24 17:59:49 +00008121$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008122
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008123
Guido van Rossum627b2d71993-12-24 10:39:16 +00008124fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008125rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8128$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008129
Matthias Kloseb9621712010-04-24 17:59:49 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8131$as_echo_n "checking for makedev... " >&6; }
8132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008133/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008134
Jesus Cea740f53a2010-04-28 11:35:30 +00008135#if defined(MAJOR_IN_MKDEV)
8136#include <sys/mkdev.h>
8137#elif defined(MAJOR_IN_SYSMACROS)
8138#include <sys/sysmacros.h>
8139#else
8140#include <sys/types.h>
8141#endif
8142
Neal Norwitz11690112002-07-30 01:08:28 +00008143int
8144main ()
8145{
Jesus Cea740f53a2010-04-28 11:35:30 +00008146
8147 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008148 ;
8149 return 0;
8150}
Matthias Kloseb159a552010-04-25 21:00:44 +00008151
Neal Norwitz11690112002-07-30 01:08:28 +00008152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008153if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008154 ac_cv_has_makedev=yes
8155else
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008158rm -f core conftest.err conftest.$ac_objext \
8159 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8161$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008162if test "$ac_cv_has_makedev" = "yes"; then
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008165
8166fi
8167
Christian Heimes985ecdc2013-11-20 11:46:18 +01008168# byte swapping
8169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8170$as_echo_n "checking for le64toh... " >&6; }
8171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8172/* end confdefs.h. */
8173
8174#ifdef HAVE_ENDIAN_H
8175#include <endian.h>
8176#elif defined(HAVE_SYS_ENDIAN_H)
8177#include <sys/endian.h>
8178#endif
8179
8180int
8181main ()
8182{
8183
8184 le64toh(1)
8185 ;
8186 return 0;
8187}
8188
8189_ACEOF
8190if ac_fn_c_try_link "$LINENO"; then :
8191 ac_cv_has_le64toh=yes
8192else
8193 ac_cv_has_le64toh=no
8194fi
8195rm -f core conftest.err conftest.$ac_objext \
8196 conftest$ac_exeext conftest.$ac_ext
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8198$as_echo "$ac_cv_has_le64toh" >&6; }
8199if test "$ac_cv_has_le64toh" = "yes"; then
8200
8201$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8202
8203fi
8204
Martin v. Löwis399a6892002-10-04 10:22:02 +00008205# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8206# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8207# defined, but the compiler does not support pragma redefine_extname,
8208# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8209# structures (such as rlimit64) without declaring them. As a
8210# work-around, disable LFS on such configurations
8211
8212use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8214$as_echo_n "checking Solaris LFS bug... " >&6; }
8215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008216/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008217
8218#define _LARGEFILE_SOURCE 1
8219#define _FILE_OFFSET_BITS 64
8220#include <sys/resource.h>
8221
Martin v. Löwis399a6892002-10-04 10:22:02 +00008222int
8223main ()
8224{
8225struct rlimit foo;
8226 ;
8227 return 0;
8228}
8229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008230if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008231 sol_lfs_bug=no
8232else
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8237$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008238if test "$sol_lfs_bug" = "yes"; then
8239 use_lfs=no
8240fi
8241
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008242# Don't use largefile support for GNU/Hurd
8243case $ac_sys_system in GNU*)
8244 use_lfs=no
8245esac
8246
Martin v. Löwis399a6892002-10-04 10:22:02 +00008247if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008248# Two defines needed to enable largefile support on various platforms
8249# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008250case $ac_sys_system/$ac_sys_release in
8251AIX*)
8252
8253$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8254
8255 ;;
8256esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008257
Matthias Kloseb9621712010-04-24 17:59:49 +00008258$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
8260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008262
Martin v. Löwis399a6892002-10-04 10:22:02 +00008263fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008264
Guido van Rossum84e7b241996-08-19 21:59:00 +00008265# Add some code to confdefs.h so that the test for off_t works on SCO
8266cat >> confdefs.h <<\EOF
8267#if defined(SCO_DS)
8268#undef _OFF_T
8269#endif
8270EOF
8271
Guido van Rossumef2255b2000-03-10 22:30:29 +00008272# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008273ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008274if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008275
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008276else
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
8278cat >>confdefs.h <<_ACEOF
8279#define mode_t int
8280_ACEOF
8281
8282fi
8283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008285if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008287else
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
8289cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008291_ACEOF
8292
8293fi
8294
Matthias Kloseb9621712010-04-24 17:59:49 +00008295ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008296if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008297
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008298else
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
8300cat >>confdefs.h <<_ACEOF
8301#define pid_t int
8302_ACEOF
8303
8304fi
8305
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008308#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008309_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008310
Matthias Kloseb9621712010-04-24 17:59:49 +00008311ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008312if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008313
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008314else
Martin v. Löwis11437992002-04-12 09:54:03 +00008315
8316cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008318_ACEOF
8319
8320fi
8321
Matthias Kloseb9621712010-04-24 17:59:49 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8323$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008324if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008326else
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008329#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008330
8331_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008334 ac_cv_type_uid_t=yes
8335else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008336 ac_cv_type_uid_t=no
8337fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008338rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008339
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8342$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008343if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
8347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008349
8350fi
8351
Mark Dickinson983bc162012-12-02 12:11:38 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008354if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008357
8358fi
8359
Stefan Krah1919b7e2012-03-21 18:25:23 +01008360ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8361if test "x$ac_cv_type___uint128_t" = xyes; then :
8362
8363$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8364
8365fi
8366
Jack Jansendd19cf82001-12-06 22:36:17 +00008367
Michael W. Hudson54241132001-12-07 15:38:26 +00008368# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008369# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370# The cast to long int works around a bug in the HP C Compiler
8371# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8372# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8373# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8375$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008376if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008378else
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 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 +00008380
Martin v. Löwis11437992002-04-12 09:54:03 +00008381else
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 if test "$ac_cv_type_int" = yes; then
8383 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8384$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008385as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008386See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387 else
8388 ac_cv_sizeof_int=0
8389 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008391
Martin v. Löwis11437992002-04-12 09:54:03 +00008392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8394$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395
8396
8397
Martin v. Löwis11437992002-04-12 09:54:03 +00008398cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008399#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008400_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008401
8402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403# The cast to long int works around a bug in the HP C Compiler
8404# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8405# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8406# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8408$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008409if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008411else
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 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 +00008413
Martin v. Löwis11437992002-04-12 09:54:03 +00008414else
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 if test "$ac_cv_type_long" = yes; then
8416 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008418as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008419See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420 else
8421 ac_cv_sizeof_long=0
8422 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8427$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428
8429
8430
Martin v. Löwis11437992002-04-12 09:54:03 +00008431cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008432#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008433_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008434
8435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436# The cast to long int works around a bug in the HP C Compiler
8437# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8438# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8439# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8441$as_echo_n "checking size of long long... " >&6; }
8442if ${ac_cv_sizeof_long_long+:} false; then :
8443 $as_echo_n "(cached) " >&6
8444else
8445 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8446
8447else
8448 if test "$ac_cv_type_long_long" = yes; then
8449 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8450$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8451as_fn_error 77 "cannot compute sizeof (long long)
8452See \`config.log' for more details" "$LINENO" 5; }
8453 else
8454 ac_cv_sizeof_long_long=0
8455 fi
8456fi
8457
8458fi
8459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8460$as_echo "$ac_cv_sizeof_long_long" >&6; }
8461
8462
8463
8464cat >>confdefs.h <<_ACEOF
8465#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8466_ACEOF
8467
8468
8469# The cast to long int works around a bug in the HP C Compiler
8470# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8471# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8472# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8474$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008475if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008477else
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 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 +00008479
Martin v. Löwis11437992002-04-12 09:54:03 +00008480else
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 if test "$ac_cv_type_void_p" = yes; then
8482 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8483$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008484as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008485See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486 else
8487 ac_cv_sizeof_void_p=0
8488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008490
Martin v. Löwis11437992002-04-12 09:54:03 +00008491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8493$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494
8495
8496
Martin v. Löwis11437992002-04-12 09:54:03 +00008497cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008498#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008499_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008500
8501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502# The cast to long int works around a bug in the HP C Compiler
8503# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8504# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8505# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8507$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008508if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 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 +00008512
Martin v. Löwis11437992002-04-12 09:54:03 +00008513else
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 if test "$ac_cv_type_short" = yes; then
8515 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8516$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008517as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008518See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519 else
8520 ac_cv_sizeof_short=0
8521 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523
Martin v. Löwis11437992002-04-12 09:54:03 +00008524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8526$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527
8528
8529
Martin v. Löwis11437992002-04-12 09:54:03 +00008530cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008531#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008532_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008533
8534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535# The cast to long int works around a bug in the HP C Compiler
8536# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8537# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8538# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8540$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008541if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008543else
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 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 +00008545
Martin v. Löwis11437992002-04-12 09:54:03 +00008546else
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 if test "$ac_cv_type_float" = yes; then
8548 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008550as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008551See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552 else
8553 ac_cv_sizeof_float=0
8554 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8559$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560
8561
8562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008564#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008565_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008566
8567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568# The cast to long int works around a bug in the HP C Compiler
8569# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8570# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8571# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8573$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008574if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008576else
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 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 +00008578
Martin v. Löwis11437992002-04-12 09:54:03 +00008579else
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 if test "$ac_cv_type_double" = yes; then
8581 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008583as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008584See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585 else
8586 ac_cv_sizeof_double=0
8587 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8592$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593
8594
8595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008597#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008598_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008599
8600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601# The cast to long int works around a bug in the HP C Compiler
8602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8604# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8606$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008607if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008609else
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 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 +00008611
Martin v. Löwis11437992002-04-12 09:54:03 +00008612else
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 if test "$ac_cv_type_fpos_t" = yes; then
8614 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008616as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008617See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618 else
8619 ac_cv_sizeof_fpos_t=0
8620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008622
Martin v. Löwis11437992002-04-12 09:54:03 +00008623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8625$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626
8627
8628
Martin v. Löwis11437992002-04-12 09:54:03 +00008629cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008630#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008631_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008632
Michael W. Hudson54241132001-12-07 15:38:26 +00008633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634# The cast to long int works around a bug in the HP C Compiler
8635# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8636# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8637# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8639$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008640if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008642else
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 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 +00008644
Martin v. Löwis18e16552006-02-15 17:27:45 +00008645else
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 if test "$ac_cv_type_size_t" = yes; then
8647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008649as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008650See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008651 else
8652 ac_cv_sizeof_size_t=0
8653 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008655
Martin v. Löwis18e16552006-02-15 17:27:45 +00008656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8658$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659
8660
8661
Martin v. Löwis18e16552006-02-15 17:27:45 +00008662cat >>confdefs.h <<_ACEOF
8663#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8664_ACEOF
8665
8666
Christian Heimes400adb02008-02-01 08:12:03 +00008667# The cast to long int works around a bug in the HP C Compiler
8668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8670# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8672$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008673if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008675else
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 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 +00008677
Christian Heimes400adb02008-02-01 08:12:03 +00008678else
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 if test "$ac_cv_type_pid_t" = yes; then
8680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008682as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008683See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008684 else
8685 ac_cv_sizeof_pid_t=0
8686 fi
8687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688
Christian Heimes400adb02008-02-01 08:12:03 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8691$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008692
8693
8694
8695cat >>confdefs.h <<_ACEOF
8696#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8697_ACEOF
8698
8699
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008700# The cast to long int works around a bug in the HP C Compiler
8701# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8702# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8703# This bug is HP SR number 8606223364.
8704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8705$as_echo_n "checking size of uintptr_t... " >&6; }
8706if ${ac_cv_sizeof_uintptr_t+:} false; then :
8707 $as_echo_n "(cached) " >&6
8708else
8709 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8710
8711else
8712 if test "$ac_cv_type_uintptr_t" = yes; then
8713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8715as_fn_error 77 "cannot compute sizeof (uintptr_t)
8716See \`config.log' for more details" "$LINENO" 5; }
8717 else
8718 ac_cv_sizeof_uintptr_t=0
8719 fi
8720fi
8721
8722fi
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8724$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8725
8726
8727
8728cat >>confdefs.h <<_ACEOF
8729#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8730_ACEOF
8731
8732
Michael W. Hudson54241132001-12-07 15:38:26 +00008733
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8735$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008736have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008738/* end confdefs.h. */
8739
8740int
8741main ()
8742{
8743long double x; x = (long double)0;
8744 ;
8745 return 0;
8746}
8747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008748if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008749
8750
Matthias Kloseb9621712010-04-24 17:59:49 +00008751$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008752
8753 have_long_double=yes
8754
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008755fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8758$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008759if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008760# The cast to long int works around a bug in the HP C Compiler
8761# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8762# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8763# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8765$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008766if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768else
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 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 +00008770
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 if test "$ac_cv_type_long_double" = yes; then
8773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008775as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008776See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008777 else
8778 ac_cv_sizeof_long_double=0
8779 fi
8780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8784$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008785
8786
8787
8788cat >>confdefs.h <<_ACEOF
8789#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8790_ACEOF
8791
8792
8793fi
8794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795# The cast to long int works around a bug in the HP C Compiler
8796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8798# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8800$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008801if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008803else
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 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 +00008805
Thomas Woutersb2137042007-02-01 18:02:27 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 if test "$ac_cv_type__Bool" = yes; then
8808 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008810as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008811See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812 else
8813 ac_cv_sizeof__Bool=0
8814 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008816
Thomas Woutersb2137042007-02-01 18:02:27 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8819$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820
8821
8822
Thomas Woutersb2137042007-02-01 18:02:27 +00008823cat >>confdefs.h <<_ACEOF
8824#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8825_ACEOF
8826
8827
Thomas Woutersb2137042007-02-01 18:02:27 +00008828
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829# The cast to long int works around a bug in the HP C Compiler
8830# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8831# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8832# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8834$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008835if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837else
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839#ifdef HAVE_SYS_TYPES_H
8840#include <sys/types.h>
8841#endif
8842
Matthias Kloseb9621712010-04-24 17:59:49 +00008843"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845else
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if test "$ac_cv_type_off_t" = yes; then
8847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008849as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008850See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851 else
8852 ac_cv_sizeof_off_t=0
8853 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8858$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008859
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008860
8861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008863#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008864_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008865
Michael W. Hudson54241132001-12-07 15:38:26 +00008866
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8869$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008870if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008871 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008872
Matthias Kloseb9621712010-04-24 17:59:49 +00008873$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008874
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8876$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008877else
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8879$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008880fi
8881
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008882# The cast to long int works around a bug in the HP C Compiler
8883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8885# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8887$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008888if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890else
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892#ifdef HAVE_SYS_TYPES_H
8893#include <sys/types.h>
8894#endif
8895#ifdef HAVE_TIME_H
8896#include <time.h>
8897#endif
8898
Matthias Kloseb9621712010-04-24 17:59:49 +00008899"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901else
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 if test "$ac_cv_type_time_t" = yes; then
8903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008905as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008906See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008907 else
8908 ac_cv_sizeof_time_t=0
8909 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008911
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8914$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008915
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008916
8917
Martin v. Löwis11437992002-04-12 09:54:03 +00008918cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008919#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008920_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008921
Michael W. Hudson54241132001-12-07 15:38:26 +00008922
8923
Trent Mick635f6fb2000-08-23 21:33:05 +00008924# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008925ac_save_cc="$CC"
8926if test "$ac_cv_kpthread" = "yes"
8927then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008928elif test "$ac_cv_kthread" = "yes"
8929then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008930elif test "$ac_cv_pthread" = "yes"
8931then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008932fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008933
Matthias Kloseb9621712010-04-24 17:59:49 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8935$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008936have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008938/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008939
8940 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008941int
8942main ()
8943{
Guido van Rossum12580492000-09-24 16:47:19 +00008944pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 ;
8946 return 0;
8947}
Matthias Kloseb159a552010-04-25 21:00:44 +00008948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008950if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008951 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8955$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008956if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008957 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8960# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8962$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008963if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008965else
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008967#ifdef HAVE_PTHREAD_H
8968#include <pthread.h>
8969#endif
8970
Matthias Kloseb9621712010-04-24 17:59:49 +00008971"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008972
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973else
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 if test "$ac_cv_type_pthread_t" = yes; then
8975 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008977as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008978See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979 else
8980 ac_cv_sizeof_pthread_t=0
8981 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008983
Trent Mick635f6fb2000-08-23 21:33:05 +00008984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8986$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008987
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008988
8989
Martin v. Löwis11437992002-04-12 09:54:03 +00008990cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008991#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008992_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008993
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008994
Trent Mick635f6fb2000-08-23 21:33:05 +00008995fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008996CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008997
Michael W. Hudson54241132001-12-07 15:38:26 +00008998
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008999case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009000 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009001 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9002 ;;
9003 Darwin/*)
9004 OTHER_LIBTOOL_OPT=""
9005 ;;
9006esac
9007
9008
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009009
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009010case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009011 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009012 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9013 if test "${enable_universalsdk}"; then
9014 :
9015 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009016 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009017 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009018 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009019 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009020 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009021 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009022 if test ${gcc_version} '<' 4.0
9023 then
9024 LIBTOOL_CRUFT="-lcc_dynamic"
9025 else
9026 LIBTOOL_CRUFT=""
9027 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009029 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009032/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009033
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009034 #include <unistd.h>
9035 int main(int argc, char*argv[])
9036 {
9037 if (sizeof(long) == 4) {
9038 return 0;
9039 } else {
9040 return 1;
9041 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009042 }
9043
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009045if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009046 ac_osx_32bit=yes
9047else
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9051 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009052fi
9053
9054
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009055 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009056 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009057 i386)
9058 MACOSX_DEFAULT_ARCH="i386"
9059 ;;
9060 ppc)
9061 MACOSX_DEFAULT_ARCH="ppc"
9062 ;;
9063 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009064 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009065 ;;
9066 esac
9067 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009068 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009069 i386)
9070 MACOSX_DEFAULT_ARCH="x86_64"
9071 ;;
9072 ppc)
9073 MACOSX_DEFAULT_ARCH="ppc64"
9074 ;;
9075 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009076 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009077 ;;
9078 esac
9079
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009080 fi
9081
9082 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009083 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009084 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009085esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9087$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009088if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009089then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009090 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009092 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009095
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9097$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009098 if test $enable_shared = "yes"
9099 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009100 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 +00009101 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009102else
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9104$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009105fi
9106
Matthias Kloseb9621712010-04-24 17:59:49 +00009107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9108$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009109case $ac_sys_system/$ac_sys_release in
9110 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009111
Matthias Kloseb9621712010-04-24 17:59:49 +00009112$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009113
Matthias Kloseb9621712010-04-24 17:59:49 +00009114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9115$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009116 ;;
9117 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009120 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009121esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009122
Guido van Rossum0a516c91994-09-12 10:58:40 +00009123# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009124
Michael W. Hudson54241132001-12-07 15:38:26 +00009125
9126
9127
9128
Benjamin Peterson99f03762010-04-11 22:15:28 +00009129
Thomas Wouters477c8d52006-05-27 19:21:47 +00009130
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009131# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9132# -- usually .so, .sl on HP-UX, .dll on Cygwin
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9134$as_echo_n "checking the extension of shared libraries... " >&6; }
9135if test -z "$SHLIB_SUFFIX"; then
9136 case $ac_sys_system in
9137 hp*|HP*)
9138 case `uname -m` in
9139 ia64) SHLIB_SUFFIX=.so;;
9140 *) SHLIB_SUFFIX=.sl;;
9141 esac
9142 ;;
9143 CYGWIN*) SHLIB_SUFFIX=.dll;;
9144 *) SHLIB_SUFFIX=.so;;
9145 esac
9146fi
9147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9148$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009149
Guido van Rossum0a516c91994-09-12 10:58:40 +00009150# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009151# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009152# (Shared libraries in this instance are shared modules to be loaded into
9153# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9155$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009156if test -z "$LDSHARED"
9157then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009158 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009159 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009160 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009161 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009162 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009163 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009164 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009166 if test "$GCC" = "yes" ; then
9167 LDSHARED='$(CC) -shared'
9168 LDCXXSHARED='$(CXX) -shared'
9169 else
9170 LDSHARED='$(CC) -G'
9171 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009172 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009173 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009174 if test "$GCC" = "yes" ; then
9175 LDSHARED='$(CC) -shared'
9176 LDCXXSHARED='$(CXX) -shared'
9177 else
9178 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009179 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009180 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009181 LDSHARED='$(CC) -bundle'
9182 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009183 if test "$enable_framework" ; then
9184 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009185 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9186 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009187 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009188 else
9189 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009190 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009191 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009192 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009193 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009194 LDSHARED='$(CC) -bundle'
9195 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009196 if test "$enable_framework" ; then
9197 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009198 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9199 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009200 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009201 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009202 # No framework, use the Python app as bundle-loader
9203 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009204 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009205 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009206 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009207 Darwin/*)
9208 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9209 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009210
Ned Deily36820b62014-06-25 13:44:22 -07009211 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9212 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9213 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9214 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9215 if test ${dep_target_major} -eq 10 && \
9216 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009217 then
Ned Deily36820b62014-06-25 13:44:22 -07009218 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009219 LDSHARED='$(CC) -bundle'
9220 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009221 if test "$enable_framework" ; then
9222 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009223 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9224 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009225 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009226 else
9227 # No framework, use the Python app as bundle-loader
9228 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9229 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009230 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009231 fi
Ned Deily36820b62014-06-25 13:44:22 -07009232 else
9233 # building for OS X 10.3 and later
9234 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9235 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9236 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009237 fi
9238 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009239 Linux*|GNU*|QNX*)
9240 LDSHARED='$(CC) -shared'
9241 LDCXXSHARED='$(CXX) -shared';;
9242 BSD/OS*/4*)
9243 LDSHARED="gcc -shared"
9244 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009245 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009246 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009247 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009248 LDSHARED='$(CC) -shared'
9249 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009250 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009251 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009252 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009253 OpenBSD*)
9254 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9255 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009256 LDSHARED='$(CC) -shared $(CCSHARED)'
9257 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009258 else
9259 case `uname -r` in
9260 [01].* | 2.[0-7] | 2.[0-7].*)
9261 LDSHARED="ld -Bshareable ${LDFLAGS}"
9262 ;;
9263 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009264 LDSHARED='$(CC) -shared $(CCSHARED)'
9265 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009266 ;;
9267 esac
9268 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009269 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009270 LDSHARED='$(CC) -shared'
9271 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009272 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009273 if test "$GCC" = "yes" ; then
9274 LDSHARED='$(CC) -shared'
9275 LDCXXSHARED='$(CXX) -shared'
9276 else
9277 LDSHARED='$(CC) -G'
9278 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009279 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009280 SCO_SV*)
9281 LDSHARED='$(CC) -Wl,-G,-Bexport'
9282 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9283 CYGWIN*)
9284 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9285 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009286 *) LDSHARED="ld";;
9287 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9290$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009291LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009292BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009293# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009294# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9296$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009297if test -z "$CCSHARED"
9298then
Guido van Rossum07397971997-04-29 21:49:50 +00009299 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009300 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009301 then CCSHARED="-fPIC";
9302 elif test `uname -p` = sparc;
9303 then CCSHARED="-xcode=pic32";
9304 else CCSHARED="-Kpic";
9305 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009306 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009307 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009308 else CCSHARED="+z";
9309 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009310 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009311 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009312 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009313 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009314 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009315 if test "$GCC" = "yes"
9316 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009317 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009318 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009319 SCO_SV*)
9320 if test "$GCC" = "yes"
9321 then CCSHARED="-fPIC"
9322 else CCSHARED="-Kpic -belf"
9323 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009324 IRIX*/6*) case $CC in
9325 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009326 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009327 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9331$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009333# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9335$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336if test -z "$LINKFORSHARED"
9337then
Guido van Rossum07397971997-04-29 21:49:50 +00009338 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009339 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009340 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009341 LINKFORSHARED="-Wl,-E -Wl,+s";;
9342# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009343 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009344 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009345 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009346 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009348 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009349
9350 # Issue #18075: the default maximum stack size (8MBytes) is too
9351 # small for the default recursion limit. Increase the stack size
9352 # to ensure that tests don't crash
9353 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9354
Jack Jansene578a632001-08-15 01:27:14 +00009355 if test "$enable_framework"
9356 then
Jack Jansenda49e192005-01-07 13:08:22 +00009357 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009358 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009359 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009360 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009361 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009362 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009363 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009364 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9365 then
9366 LINKFORSHARED="-Wl,--export-dynamic"
9367 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009368 SunOS/5*) case $CC in
9369 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009370 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009371 then
9372 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009373 fi;;
9374 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009375 CYGWIN*)
9376 if test $enable_shared = "no"
9377 then
9378 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9379 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009380 QNX*)
9381 # -Wl,-E causes the symbols to be added to the dynamic
9382 # symbol table so that they can be found when a module
9383 # is loaded. -N 2048K causes the stack size to be set
9384 # to 2048 kilobytes so that the stack doesn't overflow
9385 # when running test_compile.py.
9386 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009387 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9390$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009391
Michael W. Hudson54241132001-12-07 15:38:26 +00009392
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009393
Matthias Kloseb9621712010-04-24 17:59:49 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9395$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009396if test ! "$LIBRARY" = "$LDLIBRARY"
9397then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009398 case $ac_sys_system in
9399 CYGWIN*)
9400 # Cygwin needs CCSHARED when building extension DLLs
9401 # but not when building the interpreter DLL.
9402 CFLAGSFORSHARED='';;
9403 *)
9404 CFLAGSFORSHARED='$(CCSHARED)'
9405 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9408$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009409
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009410# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9411# library (with --enable-shared).
9412# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009413# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9414# if it is not required, since it creates a dependency of the shared library
9415# to LIBS. This, in turn, means that applications linking the shared libpython
9416# don't need to link LIBS explicitly. The default should be only changed
9417# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418
Matthias Kloseb9621712010-04-24 17:59:49 +00009419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9420$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009421case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009422 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009423 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009424esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9426$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009427
9428
Guido van Rossum627b2d71993-12-24 10:39:16 +00009429# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9431$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009432if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009433 $as_echo_n "(cached) " >&6
9434else
9435 ac_check_lib_save_LIBS=$LIBS
9436LIBS="-lsendfile $LIBS"
9437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9438/* end confdefs.h. */
9439
9440/* Override any GCC internal prototype to avoid an error.
9441 Use char because int might match the return type of a GCC
9442 builtin and then its argument prototype would still apply. */
9443#ifdef __cplusplus
9444extern "C"
9445#endif
9446char sendfile ();
9447int
9448main ()
9449{
9450return sendfile ();
9451 ;
9452 return 0;
9453}
9454_ACEOF
9455if ac_fn_c_try_link "$LINENO"; then :
9456 ac_cv_lib_sendfile_sendfile=yes
9457else
9458 ac_cv_lib_sendfile_sendfile=no
9459fi
9460rm -f core conftest.err conftest.$ac_objext \
9461 conftest$ac_exeext conftest.$ac_ext
9462LIBS=$ac_check_lib_save_LIBS
9463fi
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9465$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009466if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009467 cat >>confdefs.h <<_ACEOF
9468#define HAVE_LIBSENDFILE 1
9469_ACEOF
9470
9471 LIBS="-lsendfile $LIBS"
9472
9473fi
9474
Matthias Kloseb9621712010-04-24 17:59:49 +00009475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9476$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009477if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009479else
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009481LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485/* Override any GCC internal prototype to avoid an error.
9486 Use char because int might match the return type of a GCC
9487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009488#ifdef __cplusplus
9489extern "C"
9490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009491char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009492int
9493main ()
9494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009495return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ;
9497 return 0;
9498}
9499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009500if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009502else
Matthias Kloseb9621712010-04-24 17:59:49 +00009503 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505rm -f core conftest.err conftest.$ac_objext \
9506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009507LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9510$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009511if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 cat >>confdefs.h <<_ACEOF
9513#define HAVE_LIBDL 1
9514_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009515
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009516 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009517
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009518fi
9519 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9521$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009522if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009523 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009524else
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009526LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530/* Override any GCC internal prototype to avoid an error.
9531 Use char because int might match the return type of a GCC
9532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009533#ifdef __cplusplus
9534extern "C"
9535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009536char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537int
9538main ()
9539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 ;
9542 return 0;
9543}
9544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009545if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009547else
Matthias Kloseb9621712010-04-24 17:59:49 +00009548 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550rm -f core conftest.err conftest.$ac_objext \
9551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009552LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9555$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009556if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 cat >>confdefs.h <<_ACEOF
9558#define HAVE_LIBDLD 1
9559_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009560
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009561 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009562
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009563fi
9564 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009565
Georg Brandlb1441c72009-01-03 22:33:39 +00009566# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009567if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9569$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009570if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009572else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009573 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577/* Override any GCC internal prototype to avoid an error.
9578 Use char because int might match the return type of a GCC
9579 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009580#ifdef __cplusplus
9581extern "C"
9582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009583char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009587return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 ;
9589 return 0;
9590}
9591_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592for ac_lib in '' pthread rt posix4; do
9593 if test -z "$ac_lib"; then
9594 ac_res="none required"
9595 else
9596 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009597 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009599 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009602rm -f core conftest.err conftest.$ac_objext \
9603 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009604 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607done
Victor Stinnere0be4232011-10-25 13:06:09 +02009608if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610else
9611 ac_cv_search_sem_init=no
9612fi
9613rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009614LIBS=$ac_func_search_save_LIBS
9615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9617$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009619if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009621
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009622fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009623 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009624 # posix4 on Solaris 2.6
9625 # pthread (first!) on Linux
9626fi
9627
Martin v. Löwis19d17342003-06-14 21:03:05 +00009628# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9630$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009631if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633else
9634 ac_check_lib_save_LIBS=$LIBS
9635LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009637/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639/* Override any GCC internal prototype to avoid an error.
9640 Use char because int might match the return type of a GCC
9641 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009642#ifdef __cplusplus
9643extern "C"
9644#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009645char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646int
9647main ()
9648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009650 ;
9651 return 0;
9652}
9653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009654if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009655 ac_cv_lib_intl_textdomain=yes
9656else
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009659rm -f core conftest.err conftest.$ac_objext \
9660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009661LIBS=$ac_check_lib_save_LIBS
9662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9664$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009665if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009666
Matthias Kloseb9621712010-04-24 17:59:49 +00009667$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009668
Brett Cannonc6d936e2009-06-07 20:09:53 +00009669 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009670fi
9671
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672
9673# checks for system dependent C++ extensions support
9674case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9676$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009678/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009679
Georg Brandl59e87bd2011-02-15 19:48:59 +00009680 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009681int
9682main ()
9683{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009684loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ;
9686 return 0;
9687}
Matthias Kloseb159a552010-04-25 21:00:44 +00009688
Martin v. Löwis11437992002-04-12 09:54:03 +00009689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009690if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009691
Matthias Kloseb159a552010-04-25 21:00:44 +00009692
Matthias Kloseb9621712010-04-24 17:59:49 +00009693$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009694
Matthias Kloseb159a552010-04-25 21:00:44 +00009695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009696$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009697
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009698else
Matthias Kloseb159a552010-04-25 21:00:44 +00009699
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009701$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009702
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009704rm -f core conftest.err conftest.$ac_objext \
9705 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009706 *) ;;
9707esac
9708
Christian Heimes985ecdc2013-11-20 11:46:18 +01009709# check for systems that require aligned memory access
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9711$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009712if ${ac_cv_aligned_required+:} false; then :
9713 $as_echo_n "(cached) " >&6
9714else
9715 if test "$cross_compiling" = yes; then :
9716 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009717else
9718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9719/* end confdefs.h. */
9720
9721int main()
9722{
9723 char s[16];
9724 int i, *p1, *p2;
9725 for (i=0; i < 16; i++)
9726 s[i] = i;
9727 p1 = (int*)(s+1);
9728 p2 = (int*)(s+2);
9729 if (*p1 == *p2)
9730 return 1;
9731 return 0;
9732}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009733_ACEOF
9734if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009735 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009736else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009737 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009738fi
9739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9740 conftest.$ac_objext conftest.beam conftest.$ac_ext
9741fi
9742
9743
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009744fi
9745
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9747$as_echo "$ac_cv_aligned_required" >&6; }
9748if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009749
9750$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9751
9752fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009753
9754# str, bytes and memoryview hash algorithm
9755
9756
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9758$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9759
9760# Check whether --with-hash_algorithm was given.
9761if test "${with_hash_algorithm+set}" = set; then :
9762 withval=$with_hash_algorithm;
9763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9764$as_echo "$withval" >&6; }
9765case "$withval" in
9766 siphash24)
9767 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9768
9769 ;;
9770 fnv)
9771 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9772
9773 ;;
9774 *)
9775 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9776 ;;
9777esac
9778
9779else
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9781$as_echo "default" >&6; }
9782fi
9783
9784
Charles-François Natalid30b0222014-05-08 23:08:51 +01009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9786$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9787
9788# Check whether --with-address_sanitizer was given.
9789if test "${with_address_sanitizer+set}" = set; then :
9790 withval=$with_address_sanitizer;
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9792$as_echo "$withval" >&6; }
9793BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9794LDFLAGS="-fsanitize=address $LDFLAGS"
9795
9796else
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9798$as_echo "no" >&6; }
9799fi
9800
9801
Guido van Rossum70c7f481998-03-26 18:44:10 +00009802# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9804$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009805if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009806 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009807else
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009809LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813/* Override any GCC internal prototype to avoid an error.
9814 Use char because int might match the return type of a GCC
9815 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009816#ifdef __cplusplus
9817extern "C"
9818#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009819char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009820int
9821main ()
9822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 ;
9825 return 0;
9826}
9827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009828if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009830else
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009833rm -f core conftest.err conftest.$ac_objext \
9834 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009835LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9838$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009839if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009840 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009841fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009842 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9844$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009845if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009847else
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009849LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853/* Override any GCC internal prototype to avoid an error.
9854 Use char because int might match the return type of a GCC
9855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009856#ifdef __cplusplus
9857extern "C"
9858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009859char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009860int
9861main ()
9862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ;
9865 return 0;
9866}
9867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009868if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009870else
Matthias Kloseb9621712010-04-24 17:59:49 +00009871 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009873rm -f core conftest.err conftest.$ac_objext \
9874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009875LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9878$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009879if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009880 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009881fi
9882 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009883
Matthias Kloseb9621712010-04-24 17:59:49 +00009884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9885$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009888if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9891$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009892LIBS="$withval $LIBS"
9893
9894else
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9896$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897fi
9898
Guido van Rossum7f43da71994-08-01 12:15:30 +00009899
Victor Stinner8291b5e2015-03-20 16:03:14 +01009900
9901
9902
9903
9904
9905
9906
9907if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9908 if test -n "$ac_tool_prefix"; then
9909 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9910set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9912$as_echo_n "checking for $ac_word... " >&6; }
9913if ${ac_cv_path_PKG_CONFIG+:} false; then :
9914 $as_echo_n "(cached) " >&6
9915else
9916 case $PKG_CONFIG in
9917 [\\/]* | ?:[\\/]*)
9918 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9919 ;;
9920 *)
9921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9922for as_dir in $PATH
9923do
9924 IFS=$as_save_IFS
9925 test -z "$as_dir" && as_dir=.
9926 for ac_exec_ext in '' $ac_executable_extensions; do
9927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9928 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9930 break 2
9931 fi
9932done
9933 done
9934IFS=$as_save_IFS
9935
9936 ;;
9937esac
9938fi
9939PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9940if test -n "$PKG_CONFIG"; then
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9942$as_echo "$PKG_CONFIG" >&6; }
9943else
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945$as_echo "no" >&6; }
9946fi
9947
9948
9949fi
9950if test -z "$ac_cv_path_PKG_CONFIG"; then
9951 ac_pt_PKG_CONFIG=$PKG_CONFIG
9952 # Extract the first word of "pkg-config", so it can be a program name with args.
9953set dummy pkg-config; ac_word=$2
9954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9955$as_echo_n "checking for $ac_word... " >&6; }
9956if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9957 $as_echo_n "(cached) " >&6
9958else
9959 case $ac_pt_PKG_CONFIG in
9960 [\\/]* | ?:[\\/]*)
9961 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9962 ;;
9963 *)
9964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9965for as_dir in $PATH
9966do
9967 IFS=$as_save_IFS
9968 test -z "$as_dir" && as_dir=.
9969 for ac_exec_ext in '' $ac_executable_extensions; do
9970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9971 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9973 break 2
9974 fi
9975done
9976 done
9977IFS=$as_save_IFS
9978
9979 ;;
9980esac
9981fi
9982ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9983if test -n "$ac_pt_PKG_CONFIG"; then
9984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9985$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9986else
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9988$as_echo "no" >&6; }
9989fi
9990
9991 if test "x$ac_pt_PKG_CONFIG" = x; then
9992 PKG_CONFIG=""
9993 else
9994 case $cross_compiling:$ac_tool_warned in
9995yes:)
9996{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9997$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9998ac_tool_warned=yes ;;
9999esac
10000 PKG_CONFIG=$ac_pt_PKG_CONFIG
10001 fi
10002else
10003 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10004fi
10005
10006fi
10007if test -n "$PKG_CONFIG"; then
10008 _pkg_min_version=0.9.0
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10010$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10011 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10013$as_echo "yes" >&6; }
10014 else
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016$as_echo "no" >&6; }
10017 PKG_CONFIG=""
10018 fi
10019fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010020
10021# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10023$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010024
10025# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010026if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010027 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010028else
10029 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010030fi
10031
10032
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10034$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010035
10036# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10038$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010039
10040# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010041if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010042 withval=$with_system_ffi;
10043fi
10044
10045
Zachary Waref40d4dd2016-09-17 01:25:24 -050010046if test "$ac_sys_system" = "Darwin"
10047then
10048 case "$with_system_ffi" in
10049 "")
10050 with_system_ffi="no"
10051 ;;
10052 yes|no)
10053 ;;
10054 *)
10055 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10056 ;;
10057 esac
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10059$as_echo "$with_system_ffi" >&6; }
10060else
10061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10062$as_echo "yes" >&6; }
10063 if test "$with_system_ffi" != ""
10064 then
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10066$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10067 fi
10068 with_system_ffi="yes"
10069fi
Zachary Ware935043d2016-09-09 17:01:21 -070010070
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010071if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010072 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10073else
10074 LIBFFI_INCLUDEDIR=""
10075fi
10076
10077
Stefan Krah60187b52012-03-23 19:06:27 +010010078# Check for use of the system libmpdec library
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10080$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10081
10082# Check whether --with-system_libmpdec was given.
10083if test "${with_system_libmpdec+set}" = set; then :
10084 withval=$with_system_libmpdec;
10085else
10086 with_system_libmpdec="no"
10087fi
10088
10089
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10091$as_echo "$with_system_libmpdec" >&6; }
10092
Benjamin Peterson076ed002010-10-31 17:11:02 +000010093# Check for support for loadable sqlite extensions
10094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10095$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10096# Check whether --enable-loadable-sqlite-extensions was given.
10097if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10098 enableval=$enable_loadable_sqlite_extensions;
10099else
10100 enable_loadable_sqlite_extensions="no"
10101fi
10102
10103
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10105$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10106
Ned Deilyd819b932013-09-06 01:07:05 -070010107# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10108
10109
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10111$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10112
10113# Check whether --with-tcltk-includes was given.
10114if test "${with_tcltk_includes+set}" = set; then :
10115 withval=$with_tcltk_includes;
10116else
10117 with_tcltk_includes="default"
10118fi
10119
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10121$as_echo "$with_tcltk_includes" >&6; }
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10123$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10124
10125# Check whether --with-tcltk-libs was given.
10126if test "${with_tcltk_libs+set}" = set; then :
10127 withval=$with_tcltk_libs;
10128else
10129 with_tcltk_libs="default"
10130fi
10131
10132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10133$as_echo "$with_tcltk_libs" >&6; }
10134if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10135then
10136 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10137 then
10138 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10139 fi
10140 TCLTK_INCLUDES=""
10141 TCLTK_LIBS=""
10142else
10143 TCLTK_INCLUDES="$with_tcltk_includes"
10144 TCLTK_LIBS="$with_tcltk_libs"
10145fi
10146
Matthias Klose55708cc2009-04-30 08:06:49 +000010147# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10149$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010150
10151# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010152if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010153 withval=$with_dbmliborder;
10154if test x$with_dbmliborder = xyes
10155then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010156as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010157else
10158 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10159 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10160 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010161 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010162 fi
10163 done
10164fi
10165fi
10166
Matthias Kloseb9621712010-04-24 17:59:49 +000010167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10168$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010169
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010170# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010171
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010172USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
10176# Templates for things AC_DEFINEd more than once.
10177# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010178
10179
Martin v. Löwis11437992002-04-12 09:54:03 +000010180
Matthias Kloseb9621712010-04-24 17:59:49 +000010181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10182$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010185if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186 withval=$with_threads;
10187fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010188
10189
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010190# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010193if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194 withval=$with_thread; with_threads=$with_thread
10195fi
10196
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010197
10198if test -z "$with_threads"
10199then with_threads="yes"
10200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10202$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010203
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010204
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010205if test "$with_threads" = "no"
10206then
10207 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010208elif test "$ac_cv_pthread_is_default" = yes
10209then
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010211
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010212 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010214
10215 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010217elif test "$ac_cv_kpthread" = "yes"
10218then
10219 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010220 if test "$ac_cv_cxx_thread" = "yes"; then
10221 CXX="$CXX -Kpthread"
10222 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010224
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010225 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010226 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010227elif test "$ac_cv_kthread" = "yes"
10228then
10229 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010230 if test "$ac_cv_cxx_thread" = "yes"; then
10231 CXX="$CXX -Kthread"
10232 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010234
10235 posix_threads=yes
10236 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010237elif test "$ac_cv_pthread" = "yes"
10238then
10239 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010240 if test "$ac_cv_cxx_thread" = "yes"; then
10241 CXX="$CXX -pthread"
10242 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010244
10245 posix_threads=yes
10246 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010247else
10248 if test ! -z "$with_threads" -a -d "$with_threads"
10249 then LDFLAGS="$LDFLAGS -L$with_threads"
10250 fi
10251 if test ! -z "$withval" -a -d "$withval"
10252 then LDFLAGS="$LDFLAGS -L$withval"
10253 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010254
10255 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010256 # define _POSIX_THREADS in unistd.h. Some apparently don't
10257 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10259$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010262
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010263#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010264#ifdef _POSIX_THREADS
10265yes
10266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010267
10268_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010271 unistd_defines_pthreads=yes
10272else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010273 unistd_defines_pthreads=no
10274fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010275rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010276
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10278$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010279
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010281
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010282 # Just looking for pthread_create in libpthread is not enough:
10283 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10284 # So we really have to include pthread.h, and then link.
10285 _libs=$LIBS
10286 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10288$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010290/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010291
10292#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010293#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010294
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010295void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010296int
10297main ()
10298{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010299
10300pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 ;
10302 return 0;
10303}
10304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010306
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10308$as_echo "yes" >&6; }
10309 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010310
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010311 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010312 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010313else
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010315 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010316 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010317if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010319
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010320 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010321 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010322else
Guido van Rossumad678af1998-10-02 14:42:15 +000010323
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10325$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010326if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010328else
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010330LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334/* Override any GCC internal prototype to avoid an error.
10335 Use char because int might match the return type of a GCC
10336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337#ifdef __cplusplus
10338extern "C"
10339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010340char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010341int
10342main ()
10343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010351else
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010354rm -f core conftest.err conftest.$ac_objext \
10355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010356LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10359$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010360if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010362
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010363 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010364 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010365 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010366else
Greg Steinadf63d62000-07-05 10:38:09 +000010367
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10369$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010370if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010372else
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010374LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378/* Override any GCC internal prototype to avoid an error.
10379 Use char because int might match the return type of a GCC
10380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010381#ifdef __cplusplus
10382extern "C"
10383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010384char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010385int
10386main ()
10387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010398rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010400LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10403$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010404if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010407 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010408 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010409 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010410else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010411
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10413$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010414if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010416else
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010418LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422/* Override any GCC internal prototype to avoid an error.
10423 Use char because int might match the return type of a GCC
10424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010425#ifdef __cplusplus
10426extern "C"
10427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010428char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010429int
10430main ()
10431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ;
10434 return 0;
10435}
10436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010439else
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010442rm -f core conftest.err conftest.$ac_objext \
10443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010444LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10447$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010448if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010450
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010451 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010452 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010453 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010454else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010455
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10457$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010458if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010460else
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010462LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010466/* Override any GCC internal prototype to avoid an error.
10467 Use char because int might match the return type of a GCC
10468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010469#ifdef __cplusplus
10470extern "C"
10471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010472char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010473int
10474main ()
10475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ;
10478 return 0;
10479}
10480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010483else
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010486rm -f core conftest.err conftest.$ac_objext \
10487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010488LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10491$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010492if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010496 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010497 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010498else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010499
Martin v. Löwis130fb172001-07-19 11:00:41 +000010500 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010501fi
10502
Guido van Rossum627b2d71993-12-24 10:39:16 +000010503
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010504fi
10505
Guido van Rossum0be3e491997-05-22 20:33:33 +000010506fi
10507
Guido van Rossum49545951997-12-02 19:28:29 +000010508fi
10509
Guido van Rossumb93a8621998-05-07 13:27:32 +000010510fi
10511
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513rm -f core conftest.err conftest.$ac_objext \
10514 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010515
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10517$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010518if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010520else
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010522LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526/* Override any GCC internal prototype to avoid an error.
10527 Use char because int might match the return type of a GCC
10528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010529#ifdef __cplusplus
10530extern "C"
10531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010532char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010533int
10534main ()
10535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010537 ;
10538 return 0;
10539}
10540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010543else
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010546rm -f core conftest.err conftest.$ac_objext \
10547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10551$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010552if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010554
Martin v. Löwis130fb172001-07-19 11:00:41 +000010555 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010556 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010557 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010558fi
10559
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010560
Neal Norwitza978ab02002-11-02 16:58:05 +000010561 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10563$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010564if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010566else
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010568LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572/* Override any GCC internal prototype to avoid an error.
10573 Use char because int might match the return type of a GCC
10574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010575#ifdef __cplusplus
10576extern "C"
10577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010578char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010579int
10580main ()
10581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010583 ;
10584 return 0;
10585}
10586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010589else
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010592rm -f core conftest.err conftest.$ac_objext \
10593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010594LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10597$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010598if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010600
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010601 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010602 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010603 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010604fi
10605
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010606 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609if test "$posix_threads" = "yes"; then
10610 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010611
Matthias Kloseb9621712010-04-24 17:59:49 +000010612$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010613
10614 fi
10615
10616 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10617 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010618 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010619$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010620
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621 ;;
10622 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010623$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624
10625 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010626 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010627$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010628
10629 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010630 esac
10631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10633$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010634 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010636else
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010638 ac_cv_pthread_system_supported=no
10639else
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010641/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010642
10643 #include <stdio.h>
10644 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645 void *foo(void *parm) {
10646 return NULL;
10647 }
10648 main() {
10649 pthread_attr_t attr;
10650 pthread_t id;
10651 if (pthread_attr_init(&attr)) exit(-1);
10652 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10653 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10654 exit(0);
10655 }
10656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010657if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010658 ac_cv_pthread_system_supported=yes
10659else
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010664fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666
Guido van Rossum627b2d71993-12-24 10:39:16 +000010667fi
10668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10670$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010671 if test "$ac_cv_pthread_system_supported" = "yes"; then
10672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010674
10675 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 for ac_func in pthread_sigmask
10677do :
10678 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010679if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010680 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010683 case $ac_sys_system in
10684 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685
Matthias Kloseb9621712010-04-24 17:59:49 +000010686$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010687
10688 ;;
10689 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010690fi
10691done
10692
Christian Heimesf77b4b22013-08-21 13:26:05 +020010693 for ac_func in pthread_atfork
10694do :
10695 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10696if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10697 cat >>confdefs.h <<_ACEOF
10698#define HAVE_PTHREAD_ATFORK 1
10699_ACEOF
10700
10701fi
10702done
10703
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010704fi
10705
10706
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10710$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010712if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010717 ipv6=no
10718 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10720$as_echo "yes" >&6; }
10721 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722
10723 ipv6=yes
10724 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726else
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010729/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730 /* AF_INET6 available check */
10731#include <sys/types.h>
10732#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010733int
10734main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010736int domain = AF_INET6;
10737 ;
10738 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739}
Martin v. Löwis11437992002-04-12 09:54:03 +000010740_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010741if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10744$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010746
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747else
Matthias Kloseb159a552010-04-25 21:00:44 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10750$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010752
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010756if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10758$as_echo_n "checking if RFC2553 API is available... " >&6; }
10759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010760/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010761
10762 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010763#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010764int
10765main ()
10766{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010767struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010768 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 ;
10770 return 0;
10771}
Matthias Kloseb159a552010-04-25 21:00:44 +000010772
Martin v. Löwis11437992002-04-12 09:54:03 +000010773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010774if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010775
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010777$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010778 ipv6=yes
10779
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010780else
Matthias Kloseb159a552010-04-25 21:00:44 +000010781
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010783$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010784 ipv6=no
10785
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010788fi
10789
10790if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010792
10793fi
10794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795fi
10796
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797
10798ipv6type=unknown
10799ipv6lib=none
10800ipv6trylibc=no
10801
10802if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10804$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010805 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10806 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807 case $i in
10808 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010810/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812#include <netinet/in.h>
10813#ifdef IPV6_INRIA_VERSION
10814yes
10815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010816_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010819 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010821rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822
10823 ;;
10824 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010826/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828#include <netinet/in.h>
10829#ifdef __KAME__
10830yes
10831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010832_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835 ipv6type=$i;
10836 ipv6lib=inet6
10837 ipv6libdir=/usr/local/v6/lib
10838 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010840rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841
10842 ;;
10843 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010845/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010846
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847#include <features.h>
10848#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10849yes
10850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010851_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854 ipv6type=$i;
10855 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010857rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858
10859 ;;
10860 linux-inet6)
10861 if test -d /usr/inet6; then
10862 ipv6type=$i
10863 ipv6lib=inet6
10864 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010865 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866 fi
10867 ;;
10868 solaris)
10869 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010870 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871 ipv6type=$i
10872 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873 fi
10874 fi
10875 ;;
10876 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010878/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880#include <sys/param.h>
10881#ifdef _TOSHIBA_INET6
10882yes
10883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887 ipv6type=$i;
10888 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010889 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892
10893 ;;
10894 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898#include </usr/local/v6/include/sys/v6config.h>
10899#ifdef __V6D__
10900yes
10901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 ipv6type=$i;
10906 ipv6lib=v6;
10907 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010908 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010910rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911
10912 ;;
10913 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917#include <sys/param.h>
10918#ifdef _ZETA_MINAMI_INET6
10919yes
10920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010921_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924 ipv6type=$i;
10925 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010926 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010927fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010928rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929
10930 ;;
10931 esac
10932 if test "$ipv6type" != "unknown"; then
10933 break
10934 fi
10935 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10937$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938fi
10939
10940if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10941 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10942 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10943 echo "using lib$ipv6lib"
10944 else
10945 if test $ipv6trylibc = "yes"; then
10946 echo "using libc"
10947 else
10948 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10949 echo "You need to fetch lib$ipv6lib.a from appropriate"
10950 echo 'ipv6 kit and compile beforehand.'
10951 exit 1
10952 fi
10953 fi
10954fi
10955
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10957$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10959/* end confdefs.h. */
10960 /* CAN_RAW_FD_FRAMES available check */
10961#include <linux/can/raw.h>
10962int
10963main ()
10964{
10965int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10966 ;
10967 return 0;
10968}
10969_ACEOF
10970if ac_fn_c_try_compile "$LINENO"; then :
10971
10972
10973$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10974
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10976$as_echo "yes" >&6; }
10977
10978else
10979
10980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10981$as_echo "no" >&6; }
10982
10983fi
10984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10985
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010986# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10988$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010991if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992 withval=$with_doc_strings;
10993fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010994
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010995
10996if test -z "$with_doc_strings"
10997then with_doc_strings="yes"
10998fi
10999if test "$with_doc_strings" != "no"
11000then
11001
Matthias Kloseb9621712010-04-24 17:59:49 +000011002$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011003
11004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11006$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011007
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011008# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11010$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014 withval=$with_pymalloc;
11015fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011016
Neil Schemenauera35c6882001-02-27 04:45:05 +000011017
Neil Schemenauer16c22972002-03-22 15:34:49 +000011018if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011019then
11020 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011021fi
11022if test "$with_pymalloc" != "no"
11023then
Martin v. Löwis11437992002-04-12 09:54:03 +000011024
Matthias Kloseb9621712010-04-24 17:59:49 +000011025$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011026
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011027 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11030$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011031
Benjamin Peterson05159c42009-12-03 03:01:27 +000011032# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11034$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011035
11036# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011037if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011038 withval=$with_valgrind;
11039else
11040 with_valgrind=no
11041fi
11042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11044$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011045if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011047if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011050
11051else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011052 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011053
11054fi
11055
11056
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011057 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011058fi
11059
Łukasz Langaa785c872016-09-09 17:37:37 -070011060# Check for DTrace support
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11062$as_echo_n "checking for --with-dtrace... " >&6; }
11063
11064# Check whether --with-dtrace was given.
11065if test "${with_dtrace+set}" = set; then :
11066 withval=$with_dtrace;
11067else
11068 with_dtrace=no
11069fi
11070
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11072$as_echo "$with_dtrace" >&6; }
11073
11074
11075
11076
11077
11078DTRACE=
11079DFLAGS=
11080DTRACE_HEADERS=
11081DTRACE_OBJS=
11082
11083if test "$with_dtrace" = "yes"
11084then
11085 # Extract the first word of "dtrace", so it can be a program name with args.
11086set dummy dtrace; ac_word=$2
11087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11088$as_echo_n "checking for $ac_word... " >&6; }
11089if ${ac_cv_path_DTRACE+:} false; then :
11090 $as_echo_n "(cached) " >&6
11091else
11092 case $DTRACE in
11093 [\\/]* | ?:[\\/]*)
11094 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11095 ;;
11096 *)
11097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11098for as_dir in $PATH
11099do
11100 IFS=$as_save_IFS
11101 test -z "$as_dir" && as_dir=.
11102 for ac_exec_ext in '' $ac_executable_extensions; do
11103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11104 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11106 break 2
11107 fi
11108done
11109 done
11110IFS=$as_save_IFS
11111
11112 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11113 ;;
11114esac
11115fi
11116DTRACE=$ac_cv_path_DTRACE
11117if test -n "$DTRACE"; then
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11119$as_echo "$DTRACE" >&6; }
11120else
11121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11122$as_echo "no" >&6; }
11123fi
11124
11125
11126 if test "$DTRACE" = "not found"; then
11127 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11128 fi
11129
11130$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11131
11132 DTRACE_HEADERS="Include/pydtrace_probes.h"
11133
11134 # On OS X, DTrace providers do not need to be explicitly compiled and
11135 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11136 # generation flag '-G'. We check for presence of this flag, rather than
11137 # hardcoding support by OS, in the interest of robustness.
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11139$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11140if ${ac_cv_dtrace_link+:} false; then :
11141 $as_echo_n "(cached) " >&6
11142else
11143 ac_cv_dtrace_link=no
11144 echo 'BEGIN' > conftest.d
11145 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11146 ac_cv_dtrace_link=yes
11147
11148fi
11149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11150$as_echo "$ac_cv_dtrace_link" >&6; }
11151 if test "$ac_cv_dtrace_link" = "yes"; then
11152 DTRACE_OBJS="Python/pydtrace.o"
11153 fi
11154fi
11155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011156# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011157
Guido van Rossum98935bf2001-09-05 19:13:16 +000011158DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011159
Guido van Rossume97ee181999-12-20 21:27:22 +000011160# the dlopen() function means we might want to use dynload_shlib.o. some
11161# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011162for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011163do :
11164 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011165if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011167#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011168_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011169
Guido van Rossume97ee181999-12-20 21:27:22 +000011170fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011171done
Guido van Rossume97ee181999-12-20 21:27:22 +000011172
Michael W. Hudson54241132001-12-07 15:38:26 +000011173
Guido van Rossume97ee181999-12-20 21:27:22 +000011174# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11175# loading of modules.
11176
Matthias Kloseb9621712010-04-24 17:59:49 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11178$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011179if test -z "$DYNLOADFILE"
11180then
11181 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011182 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11183 if test "$ac_cv_func_dlopen" = yes
11184 then DYNLOADFILE="dynload_shlib.o"
11185 else DYNLOADFILE="dynload_aix.o"
11186 fi
11187 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011188 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011189 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11190 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011191 *)
11192 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11193 # out any dynamic loading
11194 if test "$ac_cv_func_dlopen" = yes
11195 then DYNLOADFILE="dynload_shlib.o"
11196 else DYNLOADFILE="dynload_stub.o"
11197 fi
11198 ;;
11199 esac
11200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11202$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011203if test "$DYNLOADFILE" != "dynload_stub.o"
11204then
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011207
11208fi
11209
Neil Schemenauer4e425612001-06-19 15:44:15 +000011210# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11211
Michael W. Hudson54241132001-12-07 15:38:26 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11214$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011215if test -z "$MACHDEP_OBJS"
11216then
Jack Jansene578a632001-08-15 01:27:14 +000011217 MACHDEP_OBJS=$extra_machdep_objs
11218else
11219 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011220fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011221if test -z "$MACHDEP_OBJS"; then
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11223$as_echo "none" >&6; }
11224else
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11226$as_echo "$MACHDEP_OBJS" >&6; }
11227fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011228
Guido van Rossum627b2d71993-12-24 10:39:16 +000011229# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011230for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011231 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011232 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011233 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011234 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011235 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011236 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011237 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011238 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011239 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011240 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011241 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011242 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011243 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011244 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11245 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011246 sigaction sigaltstack siginterrupt sigpending sigrelse \
11247 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011248 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011249 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011250 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011251do :
11252 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11253ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011254if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011257_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011258
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011259fi
11260done
11261
Michael W. Hudson54241132001-12-07 15:38:26 +000011262
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011263ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11264 #include <dirent.h>
11265"
11266if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11267
11268$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11269
11270fi
11271
11272
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011273# For some functions, having a definition is not sufficient, since
11274# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11276$as_echo_n "checking for chroot... " >&6; }
11277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011278/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011279#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011280int
11281main ()
11282{
11283void *x=chroot
11284 ;
11285 return 0;
11286}
11287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011291
Matthias Kloseb159a552010-04-25 21:00:44 +000011292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011293$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011294else
Matthias Kloseb9621712010-04-24 17:59:49 +000011295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011297
11298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11301$as_echo_n "checking for link... " >&6; }
11302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305int
11306main ()
11307{
11308void *x=link
11309 ;
11310 return 0;
11311}
11312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011316
Matthias Kloseb159a552010-04-25 21:00:44 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011318$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011319else
Matthias Kloseb9621712010-04-24 17:59:49 +000011320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011322
11323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11326$as_echo_n "checking for symlink... " >&6; }
11327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011328/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011329#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330int
11331main ()
11332{
11333void *x=symlink
11334 ;
11335 return 0;
11336}
11337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011339
Matthias Kloseb9621712010-04-24 17:59:49 +000011340$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011341
Matthias Kloseb159a552010-04-25 21:00:44 +000011342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011343$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011344else
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011347
11348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11351$as_echo_n "checking for fchdir... " >&6; }
11352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011353/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011354#include <unistd.h>
11355int
11356main ()
11357{
11358void *x=fchdir
11359 ;
11360 return 0;
11361}
11362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011364
Matthias Kloseb9621712010-04-24 17:59:49 +000011365$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011366
Matthias Kloseb159a552010-04-25 21:00:44 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011368$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011372
11373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11376$as_echo_n "checking for fsync... " >&6; }
11377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011379#include <unistd.h>
11380int
11381main ()
11382{
11383void *x=fsync
11384 ;
11385 return 0;
11386}
11387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011389
Matthias Kloseb9621712010-04-24 17:59:49 +000011390$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011391
Matthias Kloseb159a552010-04-25 21:00:44 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011393$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011394else
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011397
11398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11401$as_echo_n "checking for fdatasync... " >&6; }
11402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011403/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011404#include <unistd.h>
11405int
11406main ()
11407{
11408void *x=fdatasync
11409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011416
Matthias Kloseb159a552010-04-25 21:00:44 +000011417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011418$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011419else
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011422
11423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11426$as_echo_n "checking for epoll... " >&6; }
11427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011428/* end confdefs.h. */
11429#include <sys/epoll.h>
11430int
11431main ()
11432{
11433void *x=epoll_create
11434 ;
11435 return 0;
11436}
11437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011441
Matthias Kloseb159a552010-04-25 21:00:44 +000011442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011443$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011447
11448fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11451$as_echo_n "checking for epoll_create1... " >&6; }
11452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11453/* end confdefs.h. */
11454#include <sys/epoll.h>
11455int
11456main ()
11457{
11458void *x=epoll_create1
11459 ;
11460 return 0;
11461}
11462_ACEOF
11463if ac_fn_c_try_compile "$LINENO"; then :
11464
11465$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11466
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11468$as_echo "yes" >&6; }
11469else
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11471$as_echo "no" >&6; }
11472
11473fi
11474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11476$as_echo_n "checking for kqueue... " >&6; }
11477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011478/* end confdefs.h. */
11479
11480#include <sys/types.h>
11481#include <sys/event.h>
11482
11483int
11484main ()
11485{
11486int x=kqueue()
11487 ;
11488 return 0;
11489}
11490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011491if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011492
Matthias Kloseb9621712010-04-24 17:59:49 +000011493$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011494
Matthias Kloseb159a552010-04-25 21:00:44 +000011495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011496$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011497else
Matthias Kloseb9621712010-04-24 17:59:49 +000011498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11499$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011500
11501fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11504$as_echo_n "checking for prlimit... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11506/* end confdefs.h. */
11507
11508#include <sys/time.h>
11509#include <sys/resource.h>
11510
11511int
11512main ()
11513{
11514void *x=prlimit
11515 ;
11516 return 0;
11517}
11518_ACEOF
11519if ac_fn_c_try_compile "$LINENO"; then :
11520
11521$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11522
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11524$as_echo "yes" >&6; }
11525else
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11527$as_echo "no" >&6; }
11528
11529fi
11530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11531
Martin v. Löwisd5843682002-11-21 20:41:28 +000011532# On some systems (eg. FreeBSD 5), we would find a definition of the
11533# functions ctermid_r, setgroups in the library, but no prototype
11534# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11535# address to avoid compiler warnings and potential miscompilations
11536# because of the missing prototypes.
11537
Matthias Kloseb9621712010-04-24 17:59:49 +000011538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11539$as_echo_n "checking for ctermid_r... " >&6; }
11540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011541/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011542
Martin v. Löwisd5843682002-11-21 20:41:28 +000011543#include <stdio.h>
11544
Martin v. Löwisd5843682002-11-21 20:41:28 +000011545int
11546main ()
11547{
11548void* p = ctermid_r
11549 ;
11550 return 0;
11551}
11552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011554
Matthias Kloseb9621712010-04-24 17:59:49 +000011555$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011556
Matthias Kloseb159a552010-04-25 21:00:44 +000011557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011558$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011562
11563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11565
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11567$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011568if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011569 $as_echo_n "(cached) " >&6
11570else
11571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011572/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011573#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011574int
11575main ()
11576{
11577void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011578
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011579 ;
11580 return 0;
11581}
11582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011583if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011584 ac_cv_flock_decl=yes
11585else
11586 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011587
11588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011590
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011591fi
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11593$as_echo "$ac_cv_flock_decl" >&6; }
11594if test "x${ac_cv_flock_decl}" = xyes; then
11595 for ac_func in flock
11596do :
11597 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011598if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011599 cat >>confdefs.h <<_ACEOF
11600#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011601_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011602
Antoine Pitroua3000072010-09-07 14:52:42 +000011603else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011605$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011606if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011607 $as_echo_n "(cached) " >&6
11608else
11609 ac_check_lib_save_LIBS=$LIBS
11610LIBS="-lbsd $LIBS"
11611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11612/* end confdefs.h. */
11613
11614/* Override any GCC internal prototype to avoid an error.
11615 Use char because int might match the return type of a GCC
11616 builtin and then its argument prototype would still apply. */
11617#ifdef __cplusplus
11618extern "C"
11619#endif
11620char flock ();
11621int
11622main ()
11623{
11624return flock ();
11625 ;
11626 return 0;
11627}
11628_ACEOF
11629if ac_fn_c_try_link "$LINENO"; then :
11630 ac_cv_lib_bsd_flock=yes
11631else
11632 ac_cv_lib_bsd_flock=no
11633fi
11634rm -f core conftest.err conftest.$ac_objext \
11635 conftest$ac_exeext conftest.$ac_ext
11636LIBS=$ac_check_lib_save_LIBS
11637fi
11638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11639$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011640if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011641 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011642
11643
11644$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11645
11646
11647fi
11648
11649
11650fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011651done
11652
Antoine Pitroua3000072010-09-07 14:52:42 +000011653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11656$as_echo_n "checking for getpagesize... " >&6; }
11657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011658/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011659
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011660#include <unistd.h>
11661
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011662int
11663main ()
11664{
11665void* p = getpagesize
11666 ;
11667 return 0;
11668}
11669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011670if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011671
Matthias Kloseb9621712010-04-24 17:59:49 +000011672$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011673
Matthias Kloseb159a552010-04-25 21:00:44 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011675$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11678$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011679
11680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011682
Victor Stinner984890f2011-11-24 13:53:38 +010011683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11684$as_echo_n "checking for broken unsetenv... " >&6; }
11685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11686/* end confdefs.h. */
11687
11688#include <stdlib.h>
11689
11690int
11691main ()
11692{
11693int res = unsetenv("DUMMY")
11694 ;
11695 return 0;
11696}
11697_ACEOF
11698if ac_fn_c_try_compile "$LINENO"; then :
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11700$as_echo "no" >&6; }
11701else
11702
11703$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11704
11705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11706$as_echo "yes" >&6; }
11707
11708fi
11709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11710
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011711for ac_prog in true
11712do
11713 # Extract the first word of "$ac_prog", so it can be a program name with args.
11714set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11716$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011717if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011719else
11720 if test -n "$TRUE"; then
11721 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11722else
11723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11724for as_dir in $PATH
11725do
11726 IFS=$as_save_IFS
11727 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011730 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 $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 +000011732 break 2
11733 fi
11734done
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011737
11738fi
11739fi
11740TRUE=$ac_cv_prog_TRUE
11741if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11743$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11746$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011747fi
11748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011750 test -n "$TRUE" && break
11751done
11752test -n "$TRUE" || TRUE="/bin/true"
11753
11754
Matthias Kloseb9621712010-04-24 17:59:49 +000011755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11756$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011757if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011759else
11760 ac_check_lib_save_LIBS=$LIBS
11761LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011763/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011765/* Override any GCC internal prototype to avoid an error.
11766 Use char because int might match the return type of a GCC
11767 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011768#ifdef __cplusplus
11769extern "C"
11770#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011771char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772int
11773main ()
11774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776 ;
11777 return 0;
11778}
11779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011781 ac_cv_lib_c_inet_aton=yes
11782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011785rm -f core conftest.err conftest.$ac_objext \
11786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011787LIBS=$ac_check_lib_save_LIBS
11788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11790$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011791if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011792 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11795$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011796if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798else
11799 ac_check_lib_save_LIBS=$LIBS
11800LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011804/* Override any GCC internal prototype to avoid an error.
11805 Use char because int might match the return type of a GCC
11806 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011807#ifdef __cplusplus
11808extern "C"
11809#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011810char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811int
11812main ()
11813{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011815 ;
11816 return 0;
11817}
11818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011819if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820 ac_cv_lib_resolv_inet_aton=yes
11821else
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011824rm -f core conftest.err conftest.$ac_objext \
11825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011826LIBS=$ac_check_lib_save_LIBS
11827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11829$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011830if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831 cat >>confdefs.h <<_ACEOF
11832#define HAVE_LIBRESOLV 1
11833_ACEOF
11834
11835 LIBS="-lresolv $LIBS"
11836
11837fi
11838
11839
11840fi
11841
11842
Christian Heimesd0764e22007-12-04 15:00:33 +000011843# On Tru64, chflags seems to be present, but calling it will
11844# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11846$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011847if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011851 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011852else
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011854/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011855
Christian Heimesd0764e22007-12-04 15:00:33 +000011856#include <sys/stat.h>
11857#include <unistd.h>
11858int main(int argc, char*argv[])
11859{
11860 if(chflags(argv[0], 0) != 0)
11861 return 1;
11862 return 0;
11863}
Ned Deily3eb67d52011-06-28 00:00:28 -070011864
Christian Heimesd0764e22007-12-04 15:00:33 +000011865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011866if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011867 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011868else
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011873fi
11874
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011875
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11878$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011879if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011881if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011882 ac_cv_have_chflags="yes"
11883else
11884 ac_cv_have_chflags="no"
11885fi
11886
11887fi
11888if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011891
11892fi
11893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11895$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011896if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011900 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011903/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011904
Christian Heimesd0764e22007-12-04 15:00:33 +000011905#include <sys/stat.h>
11906#include <unistd.h>
11907int main(int argc, char*argv[])
11908{
11909 if(lchflags(argv[0], 0) != 0)
11910 return 1;
11911 return 0;
11912}
Ned Deily3eb67d52011-06-28 00:00:28 -070011913
Christian Heimesd0764e22007-12-04 15:00:33 +000011914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011915if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011916 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011917else
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011922fi
11923
11924
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11927$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011928if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011930if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011931 ac_cv_have_lchflags="yes"
11932else
11933 ac_cv_have_lchflags="no"
11934fi
11935
11936fi
11937if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011938
Matthias Kloseb9621712010-04-24 17:59:49 +000011939$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011940
11941fi
11942
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011943case $ac_sys_system/$ac_sys_release in
11944Darwin/*)
11945 _CUR_CFLAGS="${CFLAGS}"
11946 _CUR_LDFLAGS="${LDFLAGS}"
11947 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11948 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11949 ;;
11950esac
11951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11953$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011954if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011956else
11957 ac_check_lib_save_LIBS=$LIBS
11958LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011960/* end confdefs.h. */
11961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962/* Override any GCC internal prototype to avoid an error.
11963 Use char because int might match the return type of a GCC
11964 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011965#ifdef __cplusplus
11966extern "C"
11967#endif
11968char inflateCopy ();
11969int
11970main ()
11971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011972return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011973 ;
11974 return 0;
11975}
11976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011977if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011978 ac_cv_lib_z_inflateCopy=yes
11979else
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011982rm -f core conftest.err conftest.$ac_objext \
11983 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011984LIBS=$ac_check_lib_save_LIBS
11985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11987$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011988if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011991
11992fi
11993
11994
11995case $ac_sys_system/$ac_sys_release in
11996Darwin/*)
11997 CFLAGS="${_CUR_CFLAGS}"
11998 LDFLAGS="${_CUR_LDFLAGS}"
11999 ;;
12000esac
12001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12003$as_echo_n "checking for hstrerror... " >&6; }
12004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012005/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012006
Martin v. Löwise9416172003-05-03 10:12:45 +000012007#include <netdb.h>
12008
Martin v. Löwise9416172003-05-03 10:12:45 +000012009int
12010main ()
12011{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012012void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012013 ;
12014 return 0;
12015}
12016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012018
Matthias Kloseb9621712010-04-24 17:59:49 +000012019$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012020
Matthias Kloseb159a552010-04-25 21:00:44 +000012021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012022$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12025$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012026
12027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012028rm -f core conftest.err conftest.$ac_objext \
12029 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012030
Matthias Kloseb9621712010-04-24 17:59:49 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12032$as_echo_n "checking for inet_aton... " >&6; }
12033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012034/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012035
Martin v. Löwis86d66262006-02-17 08:40:11 +000012036#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012037#include <sys/socket.h>
12038#include <netinet/in.h>
12039#include <arpa/inet.h>
12040
Martin v. Löwise9416172003-05-03 10:12:45 +000012041int
12042main ()
12043{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012044void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012045 ;
12046 return 0;
12047}
12048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012049if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012052
Matthias Kloseb159a552010-04-25 21:00:44 +000012053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012058
12059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012060rm -f core conftest.err conftest.$ac_objext \
12061 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12064$as_echo_n "checking for inet_pton... " >&6; }
12065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012066/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012067
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012068#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012069#include <sys/socket.h>
12070#include <netinet/in.h>
12071#include <arpa/inet.h>
12072
Martin v. Löwise9416172003-05-03 10:12:45 +000012073int
12074main ()
12075{
12076void* p = inet_pton
12077 ;
12078 return 0;
12079}
12080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012081if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012084
Matthias Kloseb159a552010-04-25 21:00:44 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012086$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012087else
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12089$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012090
12091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012093
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012094# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12096$as_echo_n "checking for setgroups... " >&6; }
12097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012098/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012099
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012100#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012101#ifdef HAVE_GRP_H
12102#include <grp.h>
12103#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012104
Martin v. Löwisd5843682002-11-21 20:41:28 +000012105int
12106main ()
12107{
12108void* p = setgroups
12109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012114
Matthias Kloseb9621712010-04-24 17:59:49 +000012115$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012116
Matthias Kloseb159a552010-04-25 21:00:44 +000012117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012118$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012119else
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12121$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012122
12123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012125
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012126# check for openpty and forkpty
12127
12128for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012129do :
12130 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012131if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012133#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012134_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012135
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012136else
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12138$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012139if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012141else
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012143LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012147/* Override any GCC internal prototype to avoid an error.
12148 Use char because int might match the return type of a GCC
12149 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012150#ifdef __cplusplus
12151extern "C"
12152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012153char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012154int
12155main ()
12156{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012157return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 ;
12159 return 0;
12160}
12161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012163 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012164else
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012167rm -f core conftest.err conftest.$ac_objext \
12168 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012169LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12172$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012173if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12178$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012179if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012181else
12182 ac_check_lib_save_LIBS=$LIBS
12183LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012185/* end confdefs.h. */
12186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187/* Override any GCC internal prototype to avoid an error.
12188 Use char because int might match the return type of a GCC
12189 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012190#ifdef __cplusplus
12191extern "C"
12192#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012193char openpty ();
12194int
12195main ()
12196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012198 ;
12199 return 0;
12200}
12201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012202if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012203 ac_cv_lib_bsd_openpty=yes
12204else
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012207rm -f core conftest.err conftest.$ac_objext \
12208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012209LIBS=$ac_check_lib_save_LIBS
12210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12212$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012213if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215 LIBS="$LIBS -lbsd"
12216fi
12217
12218
12219fi
12220
Fred Drake8cef4cf2000-06-28 16:40:38 +000012221
12222fi
12223done
12224
12225for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012226do :
12227 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012228if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012230#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012231_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233else
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12235$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012236if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012238else
Martin v. Löwis11437992002-04-12 09:54:03 +000012239 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012240LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012244/* Override any GCC internal prototype to avoid an error.
12245 Use char because int might match the return type of a GCC
12246 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012247#ifdef __cplusplus
12248extern "C"
12249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012250char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012251int
12252main ()
12253{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012254return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 ;
12256 return 0;
12257}
12258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012259if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012261else
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012264rm -f core conftest.err conftest.$ac_objext \
12265 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012266LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12269$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012270if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12275$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012276if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012278else
12279 ac_check_lib_save_LIBS=$LIBS
12280LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012282/* end confdefs.h. */
12283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284/* Override any GCC internal prototype to avoid an error.
12285 Use char because int might match the return type of a GCC
12286 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012287#ifdef __cplusplus
12288extern "C"
12289#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012290char forkpty ();
12291int
12292main ()
12293{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012295 ;
12296 return 0;
12297}
12298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012299if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012300 ac_cv_lib_bsd_forkpty=yes
12301else
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012304rm -f core conftest.err conftest.$ac_objext \
12305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012306LIBS=$ac_check_lib_save_LIBS
12307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12309$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012310if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012312 LIBS="$LIBS -lbsd"
12313fi
12314
12315
12316fi
12317
Fred Drake8cef4cf2000-06-28 16:40:38 +000012318
12319fi
12320done
12321
Jack Jansendd19cf82001-12-06 22:36:17 +000012322
Christian Heimesb186d002008-03-18 15:15:01 +000012323# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012324for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012325do :
12326 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012327if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012328 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012330_ACEOF
12331
12332fi
12333done
12334
12335
Michael W. Hudson54241132001-12-07 15:38:26 +000012336# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012337for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012338do :
12339 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12340ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012341if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012344_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012345
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012347done
12348
Michael W. Hudson54241132001-12-07 15:38:26 +000012349
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012350ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012351if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012352 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012353
Martin v. Löwis1142de32002-03-29 16:28:31 +000012354else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012356 *" dup2.$ac_objext "* ) ;;
12357 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012359esac
12360
Martin v. Löwis1142de32002-03-29 16:28:31 +000012361fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012362
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012363ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012364if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012365 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12366
12367else
12368 case " $LIBOBJS " in
12369 *" strdup.$ac_objext "* ) ;;
12370 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12371 ;;
12372esac
12373
12374fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012375
12376
12377for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012378do :
12379 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012380if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012382#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012386#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012387int
12388main ()
12389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012390getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 ;
12392 return 0;
12393}
12394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012396
Matthias Kloseb9621712010-04-24 17:59:49 +000012397$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012398
Guido van Rossum627b2d71993-12-24 10:39:16 +000012399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012401
Guido van Rossum627b2d71993-12-24 10:39:16 +000012402fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012403done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012404
Jack Jansen150753c2003-03-29 22:07:47 +000012405for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012406do :
12407 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012408if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012409 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012410#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012413/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012414#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012415int
12416main ()
12417{
12418setpgrp(0,0);
12419 ;
12420 return 0;
12421}
12422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012426
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012429
12430fi
12431done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012432
Thomas Wouters3a584202000-08-05 23:28:51 +000012433for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012434do :
12435 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012436if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012441/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012442#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012443int
12444main ()
12445{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012446gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 ;
12448 return 0;
12449}
12450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if ac_fn_c_try_compile "$LINENO"; then :
12452
Guido van Rossum627b2d71993-12-24 10:39:16 +000012453else
Skip Montanaro6dead952003-09-25 14:50:04 +000012454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
Guido van Rossum627b2d71993-12-24 10:39:16 +000012458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012460
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012461fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012462done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012463
Michael W. Hudson54241132001-12-07 15:38:26 +000012464
Victor Stinnere0be4232011-10-25 13:06:09 +020012465for ac_func in clock_gettime
12466do :
12467 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12468if test "x$ac_cv_func_clock_gettime" = xyes; then :
12469 cat >>confdefs.h <<_ACEOF
12470#define HAVE_CLOCK_GETTIME 1
12471_ACEOF
12472
12473else
12474
12475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12476$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12477if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12478 $as_echo_n "(cached) " >&6
12479else
12480 ac_check_lib_save_LIBS=$LIBS
12481LIBS="-lrt $LIBS"
12482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12483/* end confdefs.h. */
12484
12485/* Override any GCC internal prototype to avoid an error.
12486 Use char because int might match the return type of a GCC
12487 builtin and then its argument prototype would still apply. */
12488#ifdef __cplusplus
12489extern "C"
12490#endif
12491char clock_gettime ();
12492int
12493main ()
12494{
12495return clock_gettime ();
12496 ;
12497 return 0;
12498}
12499_ACEOF
12500if ac_fn_c_try_link "$LINENO"; then :
12501 ac_cv_lib_rt_clock_gettime=yes
12502else
12503 ac_cv_lib_rt_clock_gettime=no
12504fi
12505rm -f core conftest.err conftest.$ac_objext \
12506 conftest$ac_exeext conftest.$ac_ext
12507LIBS=$ac_check_lib_save_LIBS
12508fi
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12510$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12511if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12512
Victor Stinner7efb8332014-08-29 15:41:08 +020012513 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012514 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12515
12516
12517$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12518
12519
12520fi
12521
12522
12523fi
12524done
12525
12526
12527for ac_func in clock_getres
12528do :
12529 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12530if test "x$ac_cv_func_clock_getres" = xyes; then :
12531 cat >>confdefs.h <<_ACEOF
12532#define HAVE_CLOCK_GETRES 1
12533_ACEOF
12534
12535else
12536
12537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12538$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12539if ${ac_cv_lib_rt_clock_getres+:} false; then :
12540 $as_echo_n "(cached) " >&6
12541else
12542 ac_check_lib_save_LIBS=$LIBS
12543LIBS="-lrt $LIBS"
12544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12545/* end confdefs.h. */
12546
12547/* Override any GCC internal prototype to avoid an error.
12548 Use char because int might match the return type of a GCC
12549 builtin and then its argument prototype would still apply. */
12550#ifdef __cplusplus
12551extern "C"
12552#endif
12553char clock_getres ();
12554int
12555main ()
12556{
12557return clock_getres ();
12558 ;
12559 return 0;
12560}
12561_ACEOF
12562if ac_fn_c_try_link "$LINENO"; then :
12563 ac_cv_lib_rt_clock_getres=yes
12564else
12565 ac_cv_lib_rt_clock_getres=no
12566fi
12567rm -f core conftest.err conftest.$ac_objext \
12568 conftest$ac_exeext conftest.$ac_ext
12569LIBS=$ac_check_lib_save_LIBS
12570fi
12571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12572$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12573if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12574
12575 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12576
12577
12578fi
12579
12580
12581fi
12582done
12583
12584
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012585for ac_func in clock_settime
12586do :
12587 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12588if test "x$ac_cv_func_clock_settime" = xyes; then :
12589 cat >>confdefs.h <<_ACEOF
12590#define HAVE_CLOCK_SETTIME 1
12591_ACEOF
12592
12593else
12594
12595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12596$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12597if ${ac_cv_lib_rt_clock_settime+:} false; then :
12598 $as_echo_n "(cached) " >&6
12599else
12600 ac_check_lib_save_LIBS=$LIBS
12601LIBS="-lrt $LIBS"
12602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12603/* end confdefs.h. */
12604
12605/* Override any GCC internal prototype to avoid an error.
12606 Use char because int might match the return type of a GCC
12607 builtin and then its argument prototype would still apply. */
12608#ifdef __cplusplus
12609extern "C"
12610#endif
12611char clock_settime ();
12612int
12613main ()
12614{
12615return clock_settime ();
12616 ;
12617 return 0;
12618}
12619_ACEOF
12620if ac_fn_c_try_link "$LINENO"; then :
12621 ac_cv_lib_rt_clock_settime=yes
12622else
12623 ac_cv_lib_rt_clock_settime=no
12624fi
12625rm -f core conftest.err conftest.$ac_objext \
12626 conftest$ac_exeext conftest.$ac_ext
12627LIBS=$ac_check_lib_save_LIBS
12628fi
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12630$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12631if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12632
12633 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12634
12635
12636fi
12637
12638
12639fi
12640done
12641
12642
Matthias Kloseb9621712010-04-24 17:59:49 +000012643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12644$as_echo_n "checking for major... " >&6; }
12645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012647
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012648#if defined(MAJOR_IN_MKDEV)
12649#include <sys/mkdev.h>
12650#elif defined(MAJOR_IN_SYSMACROS)
12651#include <sys/sysmacros.h>
12652#else
12653#include <sys/types.h>
12654#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012655
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012656int
12657main ()
12658{
12659
12660 makedev(major(0),minor(0));
12661
12662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012667
12668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12672$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012673
12674else
Skip Montanaro6dead952003-09-25 14:50:04 +000012675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12677$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012678
12679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012680rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012682
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012683# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12684# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12686$as_echo_n "checking for if_nameindex... " >&6; }
12687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12688/* end confdefs.h. */
12689
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012690#include <stdio.h>
12691#ifdef STDC_HEADERS
12692# include <stdlib.h>
12693# include <stddef.h>
12694#else
12695# ifdef HAVE_STDLIB_H
12696# include <stdlib.h>
12697# endif
12698#endif
12699#ifdef HAVE_SYS_SOCKET_H
12700# include <sys/socket.h>
12701#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012702#ifdef HAVE_NET_IF_H
12703# include <net/if.h>
12704#endif
12705
12706int
12707main ()
12708{
12709struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12710 ;
12711 return 0;
12712}
12713_ACEOF
12714if ac_fn_c_try_link "$LINENO"; then :
12715
12716$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12717
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12719$as_echo "yes" >&6; }
12720else
12721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12722$as_echo "no" >&6; }
12723
12724fi
12725rm -f core conftest.err conftest.$ac_objext \
12726 conftest$ac_exeext conftest.$ac_ext
12727
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012728# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12729# macro is not defined in android-ndk-r13.
12730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12731$as_echo_n "checking for lockf... " >&6; }
12732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12733/* end confdefs.h. */
12734#include <unistd.h>
12735int
12736main ()
12737{
12738lockf(0, F_LOCK, 0);
12739 ;
12740 return 0;
12741}
12742_ACEOF
12743if ac_fn_c_try_link "$LINENO"; then :
12744
12745$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12746
12747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12748$as_echo "yes" >&6; }
12749else
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12751$as_echo "no" >&6; }
12752
12753fi
12754rm -f core conftest.err conftest.$ac_objext \
12755 conftest$ac_exeext conftest.$ac_ext
12756
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012757# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012758# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12760$as_echo_n "checking for getaddrinfo... " >&6; }
12761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012762/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012763
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012764#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012765#include <sys/socket.h>
12766#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012767#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012768
Martin v. Löwis11437992002-04-12 09:54:03 +000012769int
12770main ()
12771{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012772getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ;
12774 return 0;
12775}
12776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012777if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012778 have_getaddrinfo=yes
12779else
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012782rm -f core conftest.err conftest.$ac_objext \
12783 conftest$ac_exeext conftest.$ac_ext
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12785$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012786if test $have_getaddrinfo = yes
12787then
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12789$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012790 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012792else
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012794
12795if test "${enable_ipv6+set}" = set; then
12796 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12797else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012798 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012799fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012800else
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012803
Stefan Krah19c21392012-11-22 23:47:32 +010012804#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012805#include <sys/types.h>
12806#include <netdb.h>
12807#include <string.h>
12808#include <sys/socket.h>
12809#include <netinet/in.h>
12810
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012811int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012812{
12813 int passive, gaierr, inet4 = 0, inet6 = 0;
12814 struct addrinfo hints, *ai, *aitop;
12815 char straddr[INET6_ADDRSTRLEN], strport[16];
12816
12817 for (passive = 0; passive <= 1; passive++) {
12818 memset(&hints, 0, sizeof(hints));
12819 hints.ai_family = AF_UNSPEC;
12820 hints.ai_flags = passive ? AI_PASSIVE : 0;
12821 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012822 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12824 (void)gai_strerror(gaierr);
12825 goto bad;
12826 }
12827 for (ai = aitop; ai; ai = ai->ai_next) {
12828 if (ai->ai_addr == NULL ||
12829 ai->ai_addrlen == 0 ||
12830 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12831 straddr, sizeof(straddr), strport, sizeof(strport),
12832 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12833 goto bad;
12834 }
12835 switch (ai->ai_family) {
12836 case AF_INET:
12837 if (strcmp(strport, "54321") != 0) {
12838 goto bad;
12839 }
12840 if (passive) {
12841 if (strcmp(straddr, "0.0.0.0") != 0) {
12842 goto bad;
12843 }
12844 } else {
12845 if (strcmp(straddr, "127.0.0.1") != 0) {
12846 goto bad;
12847 }
12848 }
12849 inet4++;
12850 break;
12851 case AF_INET6:
12852 if (strcmp(strport, "54321") != 0) {
12853 goto bad;
12854 }
12855 if (passive) {
12856 if (strcmp(straddr, "::") != 0) {
12857 goto bad;
12858 }
12859 } else {
12860 if (strcmp(straddr, "::1") != 0) {
12861 goto bad;
12862 }
12863 }
12864 inet6++;
12865 break;
12866 case AF_UNSPEC:
12867 goto bad;
12868 break;
12869 default:
12870 /* another family support? */
12871 break;
12872 }
12873 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012874 freeaddrinfo(aitop);
12875 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012876 }
12877
12878 if (!(inet4 == 0 || inet4 == 2))
12879 goto bad;
12880 if (!(inet6 == 0 || inet6 == 2))
12881 goto bad;
12882
12883 if (aitop)
12884 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012885 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012886
12887 bad:
12888 if (aitop)
12889 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012890 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012891}
12892
Martin v. Löwis11437992002-04-12 09:54:03 +000012893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012894if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012895 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012903fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012904
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12908$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12909
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012910if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012911then
12912 if test $ipv6 = yes
12913 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012914 echo 'Fatal: You must get working getaddrinfo() function.'
12915 echo ' or you can specify "--disable-ipv6"'.
12916 exit 1
12917 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012918else
Martin v. Löwis11437992002-04-12 09:54:03 +000012919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012921
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012923
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012924for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012925do :
12926 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012927if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012929#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012930_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012931
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012932fi
12933done
12934
Michael W. Hudson54241132001-12-07 15:38:26 +000012935
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12938$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012939if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012941else
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012943/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012944#include <sys/types.h>
12945#include <sys/time.h>
12946#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
Martin v. Löwis11437992002-04-12 09:54:03 +000012948int
12949main ()
12950{
12951if ((struct tm *) 0)
12952return 0;
12953 ;
12954 return 0;
12955}
12956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012958 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12965$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012966if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012969
12970fi
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12973$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012974if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012979#include <sys/types.h>
12980#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012981
Martin v. Löwis11437992002-04-12 09:54:03 +000012982int
12983main ()
12984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985struct tm tm;
12986 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993 ac_cv_struct_tm=time.h
12994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13000$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013001if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004
13005fi
13006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007ac_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 +000013008#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010"
Victor Stinnere0be4232011-10-25 13:06:09 +020013011if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013012
13013cat >>confdefs.h <<_ACEOF
13014#define HAVE_STRUCT_TM_TM_ZONE 1
13015_ACEOF
13016
13017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013018fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013019
Martin v. Löwis11437992002-04-12 09:54:03 +000013020if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013023
13024else
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13026"
Victor Stinnere0be4232011-10-25 13:06:09 +020013027if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013029else
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031fi
13032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013033cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013034#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035_ACEOF
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13038$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013039if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041else
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 Rossum627b2d71993-12-24 10:39:16 +000013044#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013045#if !HAVE_DECL_TZNAME
13046extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049int
13050main ()
13051{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 ;
13054 return 0;
13055}
13056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013057if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013058 ac_cv_var_tzname=yes
13059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013062rm -f core conftest.err conftest.$ac_objext \
13063 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13066$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013067 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013070
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071 fi
13072fi
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074ac_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 +020013075if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013076
13077cat >>confdefs.h <<_ACEOF
13078#define HAVE_STRUCT_STAT_ST_RDEV 1
13079_ACEOF
13080
13081
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013082fi
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084ac_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 +020013085if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013086
Martin v. Löwis11437992002-04-12 09:54:03 +000013087cat >>confdefs.h <<_ACEOF
13088#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13089_ACEOF
13090
13091
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013092fi
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094ac_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 +020013095if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013096
13097cat >>confdefs.h <<_ACEOF
13098#define HAVE_STRUCT_STAT_ST_FLAGS 1
13099_ACEOF
13100
13101
13102fi
13103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104ac_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 +020013105if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013106
13107cat >>confdefs.h <<_ACEOF
13108#define HAVE_STRUCT_STAT_ST_GEN 1
13109_ACEOF
13110
13111
13112fi
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114ac_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 +020013115if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013116
13117cat >>confdefs.h <<_ACEOF
13118#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13119_ACEOF
13120
13121
13122fi
13123
Matthias Kloseb9621712010-04-24 17:59:49 +000013124ac_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 +020013125if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013126
Martin v. Löwis11437992002-04-12 09:54:03 +000013127cat >>confdefs.h <<_ACEOF
13128#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13129_ACEOF
13130
13131
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013132fi
13133
Stefan Krah267b6392016-04-26 01:09:18 +020013134ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13135 #include <sys/types.h>
13136 #include <pwd.h>
13137
13138"
13139if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13140
13141cat >>confdefs.h <<_ACEOF
13142#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13143_ACEOF
13144
13145
13146fi
13147ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13148 #include <sys/types.h>
13149 #include <pwd.h>
13150
13151"
13152if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13153
13154cat >>confdefs.h <<_ACEOF
13155#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13156_ACEOF
13157
13158
13159fi
13160
Zachary Ware6a6967e2016-10-01 00:47:27 -050013161# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13162ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13163"
13164if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13165
13166cat >>confdefs.h <<_ACEOF
13167#define HAVE_SIGINFO_T_SI_BAND 1
13168_ACEOF
13169
13170
13171fi
13172
Michael W. Hudson54241132001-12-07 15:38:26 +000013173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13175$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013176if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013178else
Matthias Kloseb159a552010-04-25 21:00:44 +000013179
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013181/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013182#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013183int
13184main ()
13185{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013186return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 ;
13188 return 0;
13189}
13190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013191if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013192 ac_cv_header_time_altzone=yes
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198fi
13199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13201$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013202if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013205
13206fi
13207
Guido van Rossumda88dad1995-01-26 00:46:29 +000013208was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13210$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013212/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013213
13214#include <sys/types.h>
13215#include <sys/select.h>
13216#include <sys/time.h>
13217
Martin v. Löwis11437992002-04-12 09:54:03 +000013218int
13219main ()
13220{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013221;
Martin v. Löwis11437992002-04-12 09:54:03 +000013222 ;
13223 return 0;
13224}
13225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013227
13228
Matthias Kloseb9621712010-04-24 17:59:49 +000013229$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013231 was_it_defined=yes
13232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13236$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13239$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013240if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242else
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013244/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013245#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013246int
13247main ()
13248{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013249struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013250 ;
13251 return 0;
13252}
13253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013254if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013255 ac_cv_struct_addrinfo=yes
13256else
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13260fi
13261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13263$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013264if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013265
Matthias Kloseb9621712010-04-24 17:59:49 +000013266$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267
13268fi
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13271$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013272if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013276/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013277
13278# include <sys/types.h>
13279# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013280int
13281main ()
13282{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013283struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 ;
13285 return 0;
13286}
13287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013289 ac_cv_struct_sockaddr_storage=yes
13290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13294fi
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13297$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013298if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301
13302fi
13303
Christian Heimesdffa3942016-09-05 23:54:41 +020013304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13305$as_echo_n "checking for sockaddr_alg... " >&6; }
13306if ${ac_cv_struct_sockaddr_alg+:} false; then :
13307 $as_echo_n "(cached) " >&6
13308else
13309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13310/* end confdefs.h. */
13311
13312# include <sys/types.h>
13313# include <sys/socket.h>
13314# include <linux/if_alg.h>
13315int
13316main ()
13317{
13318struct sockaddr_alg s
13319 ;
13320 return 0;
13321}
13322_ACEOF
13323if ac_fn_c_try_compile "$LINENO"; then :
13324 ac_cv_struct_sockaddr_alg=yes
13325else
13326 ac_cv_struct_sockaddr_alg=no
13327fi
13328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13329fi
13330
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13332$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13333if test $ac_cv_struct_sockaddr_alg = yes; then
13334
13335$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13336
13337fi
13338
Guido van Rossum627b2d71993-12-24 10:39:16 +000013339# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13342$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013343if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013345else
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013348$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013349int
13350main ()
13351{
13352static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013353test_array [0] = 0;
13354return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
13356 ;
13357 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013358}
Martin v. Löwis11437992002-04-12 09:54:03 +000013359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013361 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13368$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013369if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013371
13372fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13375$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013376if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013378else
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013380/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381
Martin v. Löwis11437992002-04-12 09:54:03 +000013382int
13383main ()
13384{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013385
Martin v. Löwis11437992002-04-12 09:54:03 +000013386#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013387 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013389 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391 char const *const *pcpcc;
13392 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 /* NEC SVR4.0.2 mips cc rejects this. */
13394 struct point {int x, y;};
13395 static struct point const zero = {0,0};
13396 /* AIX XL C 1.02.0.0 rejects this.
13397 It does not let you subtract one const X* pointer from another in
13398 an arm of an if-expression whose if-part is not a constant
13399 expression */
13400 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013401 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013402 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403 ++pcpcc;
13404 ppc = (char**) pcpcc;
13405 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013406 { /* SCO 3.2v4 cc rejects this sort of thing. */
13407 char tx;
13408 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 }
13414 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13415 int x[] = {25, 17};
13416 const int *foo = &x[0];
13417 ++foo;
13418 }
13419 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13420 typedef const int *iptr;
13421 iptr p = 0;
13422 ++p;
13423 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013424 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013426 struct s { int j; const int *ap[3]; } bx;
13427 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 }
13429 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13430 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013433 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013434#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 ;
13437 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013438}
Martin v. Löwis11437992002-04-12 09:54:03 +000013439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013440if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013441 ac_cv_c_const=yes
13442else
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13448$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452
13453fi
13454
Michael W. Hudson54241132001-12-07 15:38:26 +000013455
Guido van Rossumda88dad1995-01-26 00:46:29 +000013456works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13458$as_echo_n "checking for working volatile... " >&6; }
13459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013460/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462int
13463main ()
13464{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013471 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013472else
Skip Montanaro6dead952003-09-25 14:50:04 +000013473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013475
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013476
Guido van Rossum627b2d71993-12-24 10:39:16 +000013477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13480$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013481
Guido van Rossumda88dad1995-01-26 00:46:29 +000013482works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13484$as_echo_n "checking for working signed char... " >&6; }
13485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013486/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013487
Martin v. Löwis11437992002-04-12 09:54:03 +000013488int
13489main ()
13490{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013491signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013497 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013498else
Skip Montanaro6dead952003-09-25 14:50:04 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013501
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013502
Guido van Rossum7f43da71994-08-01 12:15:30 +000013503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13506$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013507
Guido van Rossumda88dad1995-01-26 00:46:29 +000013508have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13510$as_echo_n "checking for prototypes... " >&6; }
13511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013512/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013513int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013514int
13515main ()
13516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 ;
13519 return 0;
13520}
13521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Matthias Kloseb159a552010-04-25 21:00:44 +000013526 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13530$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531
Guido van Rossumda88dad1995-01-26 00:46:29 +000013532works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13534$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013536/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013537
13538#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013539int foo(int x, ...) {
13540 va_list va;
13541 va_start(va, x);
13542 va_arg(va, int);
13543 va_arg(va, char *);
13544 va_arg(va, double);
13545 return 0;
13546}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548int
13549main ()
13550{
Guido van Rossum90eea071996-08-30 20:58:57 +000013551return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 ;
13553 return 0;
13554}
13555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
13558
Matthias Kloseb9621712010-04-24 17:59:49 +000013559$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013560
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013561 works=yes
13562
Guido van Rossum627b2d71993-12-24 10:39:16 +000013563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13566$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013567
Martin v. Löwisd6320502004-08-12 13:45:08 +000013568# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13570$as_echo_n "checking for socketpair... " >&6; }
13571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013572/* end confdefs.h. */
13573
13574#include <sys/types.h>
13575#include <sys/socket.h>
13576
13577int
13578main ()
13579{
13580void *x=socketpair
13581 ;
13582 return 0;
13583}
13584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013588
Matthias Kloseb159a552010-04-25 21:00:44 +000013589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013590$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13593$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013594
13595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013597
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013598# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13600$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013602/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013603#include <sys/types.h>
13604#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013605int
13606main ()
13607{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013608struct sockaddr x;
13609x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 ;
13611 return 0;
13612}
13613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013614if ac_fn_c_try_compile "$LINENO"; then :
13615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13616$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619
13620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13622$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013623
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013626
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013627# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
13629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013631if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13636$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013637 OLD_CFLAGS=$CFLAGS
13638 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013640/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013641
13642# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
Martin v. Löwis11437992002-04-12 09:54:03 +000013644int
13645main ()
13646{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013647
13648 char *name;
13649 struct hostent *he, *res;
13650 char buffer[2048];
13651 int buflen = 2048;
13652 int h_errnop;
13653
13654 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013655
13656 ;
13657 return 0;
13658}
13659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013663
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13668$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013670else
Skip Montanaro6dead952003-09-25 14:50:04 +000013671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13673$as_echo "no" >&6; }
13674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13675$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013677/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013678
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013679# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013680
Martin v. Löwis11437992002-04-12 09:54:03 +000013681int
13682main ()
13683{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013684
13685 char *name;
13686 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013687 char buffer[2048];
13688 int buflen = 2048;
13689 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013690
Matthias Kloseb159a552010-04-25 21:00:44 +000013691 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
13693 ;
13694 return 0;
13695}
13696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701
Matthias Kloseb159a552010-04-25 21:00:44 +000013702$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13705$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013706
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013707else
Skip Montanaro6dead952003-09-25 14:50:04 +000013708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13710$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13712$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13714/* end confdefs.h. */
13715
13716# include <netdb.h>
13717
13718int
13719main ()
13720{
13721
13722 char *name;
13723 struct hostent *he;
13724 struct hostent_data data;
13725
13726 (void) gethostbyname_r(name, he, &data);
13727
13728 ;
13729 return 0;
13730}
13731_ACEOF
13732if ac_fn_c_try_compile "$LINENO"; then :
13733
13734 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13735
13736
13737$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13738
13739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13740$as_echo "yes" >&6; }
13741
13742else
13743
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13745$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013746
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013755 CFLAGS=$OLD_CFLAGS
13756
13757else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 for ac_func in gethostbyname
13760do :
13761 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013762if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013764#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013765_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013766
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013767fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013768done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013769
Michael W. Hudson54241132001-12-07 15:38:26 +000013770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013771fi
13772
Michael W. Hudson54241132001-12-07 15:38:26 +000013773
13774
13775
13776
13777
13778
Guido van Rossum627b2d71993-12-24 10:39:16 +000013779# checks for system services
13780# (none yet)
13781
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013783ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013784if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013785
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013786else
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13788$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013789if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791else
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013793LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797/* Override any GCC internal prototype to avoid an error.
13798 Use char because int might match the return type of a GCC
13799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013800#ifdef __cplusplus
13801extern "C"
13802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013803char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013804int
13805main ()
13806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013807return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 ;
13809 return 0;
13810}
13811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013814else
Matthias Kloseb9621712010-04-24 17:59:49 +000013815 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013817rm -f core conftest.err conftest.$ac_objext \
13818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013819LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13822$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013823if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 cat >>confdefs.h <<_ACEOF
13825#define HAVE_LIBIEEE 1
13826_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013827
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013828 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013829
Guido van Rossum627b2d71993-12-24 10:39:16 +000013830fi
13831
Michael W. Hudson54241132001-12-07 15:38:26 +000013832
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013833fi
13834
Michael W. Hudson54241132001-12-07 15:38:26 +000013835
Guido van Rossum7f253911997-05-09 02:42:48 +000013836# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13838$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013841if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013843if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013844then
13845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13849$as_echo "yes" >&6; }
13850else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13851$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013852fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013853else
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13855$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856fi
13857
Guido van Rossum7f253911997-05-09 02:42:48 +000013858
Guido van Rossum7f43da71994-08-01 12:15:30 +000013859# check for --with-libm=...
13860
Guido van Rossum563e7081996-09-10 18:20:48 +000013861case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013862Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013863*) LIBM=-lm
13864esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13866$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013868# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013869if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013871if test "$withval" = no
13872then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13874$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013875elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013876then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13878$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013879else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013880fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013881else
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13883$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884fi
13885
Guido van Rossum7f43da71994-08-01 12:15:30 +000013886
13887# check for --with-libc=...
13888
Matthias Kloseb9621712010-04-24 17:59:49 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13890$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013893if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013895if test "$withval" = no
13896then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13898$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013899elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013900then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13902$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013903else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013904fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013905else
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13907$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908fi
13909
Guido van Rossum7f43da71994-08-01 12:15:30 +000013910
Stefan Krah1919b7e2012-03-21 18:25:23 +010013911# **************************************
13912# * Check for gcc x64 inline assembler *
13913# **************************************
13914
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13916$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13918/* end confdefs.h. */
13919
13920int
13921main ()
13922{
13923
13924 __asm__ __volatile__ ("movq %rcx, %rax");
13925
13926 ;
13927 return 0;
13928}
13929_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013930if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013931 have_gcc_asm_for_x64=yes
13932else
13933 have_gcc_asm_for_x64=no
13934fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013935rm -f core conftest.err conftest.$ac_objext \
13936 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13938$as_echo "$have_gcc_asm_for_x64" >&6; }
13939if test "$have_gcc_asm_for_x64" = yes
13940then
13941
13942$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13943
13944fi
13945
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013946# **************************************************
13947# * Check for various properties of floating point *
13948# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13951$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013952if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954else
13955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013957 ac_cv_little_endian_double=no
13958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013960/* end confdefs.h. */
13961
13962#include <string.h>
13963int main() {
13964 double x = 9006104071832581.0;
13965 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13966 return 0;
13967 else
13968 return 1;
13969}
13970
13971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013972if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013973 ac_cv_little_endian_double=yes
13974else
Matthias Kloseb9621712010-04-24 17:59:49 +000013975 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013979fi
13980
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013981fi
13982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13984$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013985if test "$ac_cv_little_endian_double" = yes
13986then
13987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013989
13990fi
13991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13993$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013994if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996else
13997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013999 ac_cv_big_endian_double=no
14000else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014002/* end confdefs.h. */
14003
14004#include <string.h>
14005int main() {
14006 double x = 9006104071832581.0;
14007 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14008 return 0;
14009 else
14010 return 1;
14011}
14012
14013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014014if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014015 ac_cv_big_endian_double=yes
14016else
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14020 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014021fi
14022
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014023fi
14024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14026$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014027if test "$ac_cv_big_endian_double" = yes
14028then
14029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014031
14032fi
14033
14034# Some ARM platforms use a mixed-endian representation for doubles.
14035# While Python doesn't currently have full support for these platforms
14036# (see e.g., issue 1762561), we can at least make sure that float <-> string
14037# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14039$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014040if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014042else
14043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014045 ac_cv_mixed_endian_double=no
14046else
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014048/* end confdefs.h. */
14049
14050#include <string.h>
14051int main() {
14052 double x = 9006104071832581.0;
14053 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14054 return 0;
14055 else
14056 return 1;
14057}
14058
14059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014060if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014061 ac_cv_mixed_endian_double=yes
14062else
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14066 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014067fi
14068
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014069fi
14070
Matthias Kloseb9621712010-04-24 17:59:49 +000014071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14072$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014073if test "$ac_cv_mixed_endian_double" = yes
14074then
14075
Matthias Kloseb9621712010-04-24 17:59:49 +000014076$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014077
14078fi
14079
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014080# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014081# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014082# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014083# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014084# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014085# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014086
14087# This inline assembler syntax may also work for suncc and icc,
14088# so we try it on all platforms.
14089
Matthias Kloseb9621712010-04-24 17:59:49 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14091$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014093/* end confdefs.h. */
14094
14095int
14096main ()
14097{
14098
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014099 unsigned short cw;
14100 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14101 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014102
14103 ;
14104 return 0;
14105}
14106_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014107if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014108 have_gcc_asm_for_x87=yes
14109else
Matthias Kloseb9621712010-04-24 17:59:49 +000014110 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014111fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014112rm -f core conftest.err conftest.$ac_objext \
14113 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14115$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014116if test "$have_gcc_asm_for_x87" = yes
14117then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014120
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014122
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14124$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14126/* end confdefs.h. */
14127
14128int
14129main ()
14130{
14131
14132 unsigned int fpcr;
14133 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14134 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14135
14136 ;
14137 return 0;
14138}
14139_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014140if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014141 have_gcc_asm_for_mc68881=yes
14142else
14143 have_gcc_asm_for_mc68881=no
14144fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014145rm -f core conftest.err conftest.$ac_objext \
14146 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14148$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14149if test "$have_gcc_asm_for_mc68881" = yes
14150then
14151
14152$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14153
14154fi
14155
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014156# Detect whether system arithmetic is subject to x87-style double
14157# rounding issues. The result of this test has little meaning on non
14158# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14159# mode is round-to-nearest and double rounding issues are present, and
14160# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14162$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014163# $BASECFLAGS may affect the result
14164ac_save_cc="$CC"
14165CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014166if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014167 ac_cv_x87_double_rounding=no
14168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014170/* end confdefs.h. */
14171
14172#include <stdlib.h>
14173#include <math.h>
14174int main() {
14175 volatile double x, y, z;
14176 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14177 x = 0.99999999999999989; /* 1-2**-53 */
14178 y = 1./x;
14179 if (y != 1.)
14180 exit(0);
14181 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14182 x = 1e16;
14183 y = 2.99999;
14184 z = x + y;
14185 if (z != 1e16+4.)
14186 exit(0);
14187 /* both tests show evidence of double rounding */
14188 exit(1);
14189}
14190
14191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193 ac_cv_x87_double_rounding=no
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014199fi
14200
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014201CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14203$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014204if test "$ac_cv_x87_double_rounding" = yes
14205then
14206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014208
14209fi
14210
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014211# ************************************
14212# * Check for mathematical functions *
14213# ************************************
14214
14215LIBS_SAVE=$LIBS
14216LIBS="$LIBS $LIBM"
14217
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014218for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14219do :
14220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14221ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014222if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014223 cat >>confdefs.h <<_ACEOF
14224#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14225_ACEOF
14226
14227fi
14228done
14229
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014230for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014231do :
14232 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14233ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014234if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014235 cat >>confdefs.h <<_ACEOF
14236#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14237_ACEOF
14238
14239fi
14240done
14241
14242ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14243"
Victor Stinnere0be4232011-10-25 13:06:09 +020014244if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014245 ac_have_decl=1
14246else
14247 ac_have_decl=0
14248fi
14249
14250cat >>confdefs.h <<_ACEOF
14251#define HAVE_DECL_ISINF $ac_have_decl
14252_ACEOF
14253ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14254"
Victor Stinnere0be4232011-10-25 13:06:09 +020014255if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014256 ac_have_decl=1
14257else
14258 ac_have_decl=0
14259fi
14260
14261cat >>confdefs.h <<_ACEOF
14262#define HAVE_DECL_ISNAN $ac_have_decl
14263_ACEOF
14264ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14265"
Victor Stinnere0be4232011-10-25 13:06:09 +020014266if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014267 ac_have_decl=1
14268else
14269 ac_have_decl=0
14270fi
14271
14272cat >>confdefs.h <<_ACEOF
14273#define HAVE_DECL_ISFINITE $ac_have_decl
14274_ACEOF
14275
14276
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014277# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14278# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14280$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014281if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014283else
14284
Matthias Kloseb9621712010-04-24 17:59:49 +000014285if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014286 ac_cv_tanh_preserves_zero_sign=no
14287else
Matthias Kloseb9621712010-04-24 17:59:49 +000014288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014289/* end confdefs.h. */
14290
14291#include <math.h>
14292#include <stdlib.h>
14293int main() {
14294 /* return 0 if either negative zeros don't exist
14295 on this platform or if negative zeros exist
14296 and tanh(-0.) == -0. */
14297 if (atan2(0., -1.) == atan2(-0., -1.) ||
14298 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14299 else exit(1);
14300}
14301
14302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014303if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014304 ac_cv_tanh_preserves_zero_sign=yes
14305else
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014310fi
14311
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014312fi
14313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14315$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014316if test "$ac_cv_tanh_preserves_zero_sign" = yes
14317then
14318
Matthias Kloseb9621712010-04-24 17:59:49 +000014319$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014320
14321fi
14322
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014323if test "$ac_cv_func_log1p" = yes
14324then
14325 # On some versions of AIX, log1p(-0.) returns 0. instead of
14326 # -0. See issue #9920.
14327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14328$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014329 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014330 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014331else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014332
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014333 if test "$cross_compiling" = yes; then :
14334 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014335else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014338
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014339 #include <math.h>
14340 #include <stdlib.h>
14341 int main() {
14342 /* Fail if the signs of log1p(-0.) and -0. can be
14343 distinguished. */
14344 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14345 return 0;
14346 else
14347 return 1;
14348 }
14349
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014350_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014351if ac_fn_c_try_run "$LINENO"; then :
14352 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014353else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014354 ac_cv_log1p_drops_zero_sign=yes
14355fi
14356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014358fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014359
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014360fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014361
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14363$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14364fi
14365if test "$ac_cv_log1p_drops_zero_sign" = yes
14366then
14367
14368$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14369
14370fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014371
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014372LIBS=$LIBS_SAVE
14373
Mark Dickinsona614f042009-11-28 12:48:43 +000014374# For multiprocessing module, check that sem_open
14375# actually works. For FreeBSD versions <= 7.2,
14376# the kernel module that provides POSIX semaphores
14377# isn't loaded by default, so an attempt to call
14378# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14380$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014381if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014383else
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014385 ac_cv_posix_semaphores_enabled=yes
14386else
Matthias Kloseb9621712010-04-24 17:59:49 +000014387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014388/* end confdefs.h. */
14389
14390#include <unistd.h>
14391#include <fcntl.h>
14392#include <stdio.h>
14393#include <semaphore.h>
14394#include <sys/stat.h>
14395
14396int main(void) {
14397 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14398 if (a == SEM_FAILED) {
14399 perror("sem_open");
14400 return 1;
14401 }
14402 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014403 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014404 return 0;
14405}
14406
14407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014408if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014409 ac_cv_posix_semaphores_enabled=yes
14410else
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014415fi
14416
14417
Mark Dickinsona614f042009-11-28 12:48:43 +000014418fi
14419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14421$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014422if test $ac_cv_posix_semaphores_enabled = no
14423then
14424
Matthias Kloseb9621712010-04-24 17:59:49 +000014425$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014426
14427fi
14428
Mark Dickinson10683072009-04-18 21:18:19 +000014429# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14431$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014432if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014434else
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014436 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014439/* end confdefs.h. */
14440
14441#include <unistd.h>
14442#include <fcntl.h>
14443#include <stdio.h>
14444#include <semaphore.h>
14445#include <sys/stat.h>
14446
14447int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014448 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014449 int count;
14450 int res;
14451 if(a==SEM_FAILED){
14452 perror("sem_open");
14453 return 1;
14454
14455 }
14456 res = sem_getvalue(a, &count);
14457 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014458 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014459 return res==-1 ? 1 : 0;
14460}
14461
Mark Dickinson10683072009-04-18 21:18:19 +000014462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014463if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014464 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014465else
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14469 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014470fi
14471
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014472
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014473fi
14474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14476$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014477if test $ac_cv_broken_sem_getvalue = yes
14478then
14479
Matthias Kloseb9621712010-04-24 17:59:49 +000014480$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014481
14482fi
14483
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014484ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14485"
14486if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14487 ac_have_decl=1
14488else
14489 ac_have_decl=0
14490fi
14491
14492cat >>confdefs.h <<_ACEOF
14493#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14494_ACEOF
14495ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14496"
14497if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14498 ac_have_decl=1
14499else
14500 ac_have_decl=0
14501fi
14502
14503cat >>confdefs.h <<_ACEOF
14504#define HAVE_DECL_RTLD_NOW $ac_have_decl
14505_ACEOF
14506ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14507"
14508if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14509 ac_have_decl=1
14510else
14511 ac_have_decl=0
14512fi
14513
14514cat >>confdefs.h <<_ACEOF
14515#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14516_ACEOF
14517ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14518"
14519if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14520 ac_have_decl=1
14521else
14522 ac_have_decl=0
14523fi
14524
14525cat >>confdefs.h <<_ACEOF
14526#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14527_ACEOF
14528ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14529"
14530if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14531 ac_have_decl=1
14532else
14533 ac_have_decl=0
14534fi
14535
14536cat >>confdefs.h <<_ACEOF
14537#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14538_ACEOF
14539ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14540"
14541if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14542 ac_have_decl=1
14543else
14544 ac_have_decl=0
14545fi
14546
14547cat >>confdefs.h <<_ACEOF
14548#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14549_ACEOF
14550ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14551"
14552if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14553 ac_have_decl=1
14554else
14555 ac_have_decl=0
14556fi
14557
14558cat >>confdefs.h <<_ACEOF
14559#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14560_ACEOF
14561
14562
Mark Dickinsonbd792642009-03-18 20:06:12 +000014563# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14565$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014566# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014567if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014568 enableval=$enable_big_digits; case $enable_big_digits in
14569yes)
14570 enable_big_digits=30 ;;
14571no)
14572 enable_big_digits=15 ;;
1457315|30)
14574 ;;
14575*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014576 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 +000014577esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14579$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014580
14581cat >>confdefs.h <<_ACEOF
14582#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14583_ACEOF
14584
14585
14586else
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14588$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014589fi
14590
14591
Guido van Rossumef2255b2000-03-10 22:30:29 +000014592# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014593ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014594if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014595
14596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014598
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014599 wchar_h="yes"
14600
Guido van Rossumef2255b2000-03-10 22:30:29 +000014601else
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014603
14604fi
14605
Michael W. Hudson54241132001-12-07 15:38:26 +000014606
Martin v. Löwis11437992002-04-12 09:54:03 +000014607
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014608# determine wchar_t size
14609if test "$wchar_h" = yes
14610then
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14614# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14616$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014617if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014619else
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14621"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
Martin v. Löwis11437992002-04-12 09:54:03 +000014623else
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 if test "$ac_cv_type_wchar_t" = yes; then
14625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014627as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 else
14630 ac_cv_sizeof_wchar_t=0
14631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14636$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637
14638
14639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014641#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014642_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014643
Michael W. Hudson54241132001-12-07 15:38:26 +000014644
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014645fi
14646
Matthias Kloseb9621712010-04-24 17:59:49 +000014647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14648$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014649have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014651/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014652
14653#include <tcl.h>
14654#if TCL_UTF_MAX != 6
14655# error "NOT UCS4_TCL"
14656#endif
14657int
14658main ()
14659{
14660
14661 ;
14662 return 0;
14663}
14664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014666
14667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014669
14670 have_ucs4_tcl=yes
14671
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14675$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014676
Skip Montanaro6dead952003-09-25 14:50:04 +000014677# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014678if test "$wchar_h" = yes
14679then
14680 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14682$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014683 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014685else
14686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014688 ac_cv_wchar_t_signed=yes
14689else
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014691/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014692
14693 #include <wchar.h>
14694 int main()
14695 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014696 /* Success: exit code 0 */
14697 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014698 }
14699
14700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014701if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014702 ac_cv_wchar_t_signed=yes
14703else
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014708fi
14709
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014710fi
14711
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14713$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714fi
14715
Georg Brandl52d168a2008-01-07 18:10:24 +000014716# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014717if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014718 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014719then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014720 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014721
Matthias Kloseb9621712010-04-24 17:59:49 +000014722$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014723
Georg Brandl52d168a2008-01-07 18:10:24 +000014724else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014725 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014726fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14728$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014729
14730# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14732$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014733if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014735else
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 ac_cv_c_bigendian=unknown
14737 # See if we're dealing with a universal compiler.
14738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14739/* end confdefs.h. */
14740#ifndef __APPLE_CC__
14741 not a universal capable compiler
14742 #endif
14743 typedef int dummy;
14744
Skip Montanaro6dead952003-09-25 14:50:04 +000014745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014746if ac_fn_c_try_compile "$LINENO"; then :
14747
14748 # Check for potential -arch flags. It is not universal unless
14749 # there are at least two -arch flags with different values.
14750 ac_arch=
14751 ac_prev=
14752 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14753 if test -n "$ac_prev"; then
14754 case $ac_word in
14755 i?86 | x86_64 | ppc | ppc64)
14756 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14757 ac_arch=$ac_word
14758 else
14759 ac_cv_c_bigendian=universal
14760 break
14761 fi
14762 ;;
14763 esac
14764 ac_prev=
14765 elif test "x$ac_word" = "x-arch"; then
14766 ac_prev=arch
14767 fi
14768 done
14769fi
14770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14771 if test $ac_cv_c_bigendian = unknown; then
14772 # See if sys/param.h defines the BYTE_ORDER macro.
14773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014774/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014775#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014777
Martin v. Löwis11437992002-04-12 09:54:03 +000014778int
14779main ()
14780{
Matthias Kloseb9621712010-04-24 17:59:49 +000014781#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14782 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14783 && LITTLE_ENDIAN)
14784 bogus endian macros
14785 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
14787 ;
14788 return 0;
14789}
14790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014791if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014792 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014794/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014795#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014797
Martin v. Löwis11437992002-04-12 09:54:03 +000014798int
14799main ()
14800{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014801#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 not big endian
14803 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014804
14805 ;
14806 return 0;
14807}
14808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014809if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014810 ac_cv_c_bigendian=yes
14811else
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014815fi
14816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14817 fi
14818 if test $ac_cv_c_bigendian = unknown; then
14819 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014821/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014822#include <limits.h>
14823
Martin v. Löwis11437992002-04-12 09:54:03 +000014824int
14825main ()
14826{
Matthias Kloseb9621712010-04-24 17:59:49 +000014827#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14828 bogus endian macros
14829 #endif
14830
Martin v. Löwis11437992002-04-12 09:54:03 +000014831 ;
14832 return 0;
14833}
14834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if ac_fn_c_try_compile "$LINENO"; then :
14836 # It does; now see whether it defined to _BIG_ENDIAN or not.
14837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14838/* end confdefs.h. */
14839#include <limits.h>
14840
14841int
14842main ()
14843{
14844#ifndef _BIG_ENDIAN
14845 not big endian
14846 #endif
14847
14848 ;
14849 return 0;
14850}
14851_ACEOF
14852if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014854else
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858fi
14859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14860 fi
14861 if test $ac_cv_c_bigendian = unknown; then
14862 # Compile a test program.
14863 if test "$cross_compiling" = yes; then :
14864 # Try to guess by grepping values from an object file.
14865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14866/* end confdefs.h. */
14867short int ascii_mm[] =
14868 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14869 short int ascii_ii[] =
14870 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14871 int use_ascii (int i) {
14872 return ascii_mm[i] + ascii_ii[i];
14873 }
14874 short int ebcdic_ii[] =
14875 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14876 short int ebcdic_mm[] =
14877 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14878 int use_ebcdic (int i) {
14879 return ebcdic_mm[i] + ebcdic_ii[i];
14880 }
14881 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882
Matthias Kloseb9621712010-04-24 17:59:49 +000014883int
14884main ()
14885{
14886return use_ascii (foo) == use_ebcdic (foo);
14887 ;
14888 return 0;
14889}
14890_ACEOF
14891if ac_fn_c_try_compile "$LINENO"; then :
14892 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14893 ac_cv_c_bigendian=yes
14894 fi
14895 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14896 if test "$ac_cv_c_bigendian" = unknown; then
14897 ac_cv_c_bigendian=no
14898 else
14899 # finding both strings is unlikely to happen, but who knows?
14900 ac_cv_c_bigendian=unknown
14901 fi
14902 fi
14903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014905else
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014907/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014909int
14910main ()
14911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 /* Are we little or big endian? From Harbison&Steele. */
14914 union
14915 {
14916 long int l;
14917 char c[sizeof (long int)];
14918 } u;
14919 u.l = 1;
14920 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921
14922 ;
14923 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014924}
Martin v. Löwis11437992002-04-12 09:54:03 +000014925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014926if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014927 ac_cv_c_bigendian=no
14928else
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14938$as_echo "$ac_cv_c_bigendian" >&6; }
14939 case $ac_cv_c_bigendian in #(
14940 yes)
14941 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14942;; #(
14943 no)
14944 ;; #(
14945 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014946
Matthias Kloseb9621712010-04-24 17:59:49 +000014947$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014948
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 ;; #(
14950 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014951 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014952 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014954
Michael W. Hudson54241132001-12-07 15:38:26 +000014955
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014956# ABI version string for Python extension modules. This appears between the
14957# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14958# from the following attributes which affect the ABI of this Python build (in
14959# this order):
14960#
14961# * The Python implementation (always 'cpython-' for us)
14962# * The major and minor version numbers
14963# * --with-pydebug (adds a 'd')
14964# * --with-pymalloc (adds a 'm')
14965# * --with-wide-unicode (adds a 'u')
14966#
14967# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014968# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14969# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014970
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14972$as_echo_n "checking ABIFLAGS... " >&6; }
14973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14974$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14976$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014977SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14979$as_echo "$SOABI" >&6; }
14980
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014981
14982case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014983 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014984 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14985 *)
14986 EXT_SUFFIX=${SHLIB_SUFFIX};;
14987esac
14988
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14990$as_echo_n "checking LDVERSION... " >&6; }
14991LDVERSION='$(VERSION)$(ABIFLAGS)'
14992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14993$as_echo "$LDVERSION" >&6; }
14994
doko@python.org87421192013-01-26 11:39:31 +010014995
doko@ubuntu.com55532312016-06-14 08:55:19 +020014996if test x$PLATFORM_TRIPLET = x; then
14997 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14998else
14999 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15000fi
doko@python.org87421192013-01-26 11:39:31 +010015001
15002
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015003# Check whether right shifting a negative integer extends the sign bit
15004# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15006$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015007if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015009else
Martin v. Löwis11437992002-04-12 09:54:03 +000015010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015012 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015013else
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015015/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015016
15017int main()
15018{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015019 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015020}
15021
Martin v. Löwis11437992002-04-12 09:54:03 +000015022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015023if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015024 ac_cv_rshift_extends_sign=yes
15025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15029 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015030fi
15031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032fi
15033
Matthias Kloseb9621712010-04-24 17:59:49 +000015034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15035$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015036if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015037then
Martin v. Löwis11437992002-04-12 09:54:03 +000015038
Matthias Kloseb9621712010-04-24 17:59:49 +000015039$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015040
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015041fi
15042
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015043# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15045$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015046if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015048else
Martin v. Löwis11437992002-04-12 09:54:03 +000015049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015051/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015052#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015053int
15054main ()
15055{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015056
15057 FILE *f = fopen("/dev/null", "r");
15058 flockfile(f);
15059 getc_unlocked(f);
15060 funlockfile(f);
15061
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 ;
15063 return 0;
15064}
15065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015066if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015067 ac_cv_have_getc_unlocked=yes
15068else
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 ac_cv_have_getc_unlocked=no
15070fi
15071rm -f core conftest.err conftest.$ac_objext \
15072 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074
Matthias Kloseb9621712010-04-24 17:59:49 +000015075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15076$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015077if test "$ac_cv_have_getc_unlocked" = yes
15078then
Martin v. Löwis11437992002-04-12 09:54:03 +000015079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015081
15082fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015083
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015084# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015085# save the value of LIBS so we don't actually link Python with readline
15086LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015087
Gregory P. Smith18820942008-09-07 06:24:49 +000015088# On some systems we need to link readline to a termcap compatible
15089# library. NOTE: Keep the precedence of listed libraries synchronised
15090# with setup.py.
15091py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15093$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015094for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015095 if test -z "$py_libtermcap"; then
15096 READLINE_LIBS="-lreadline"
15097 else
15098 READLINE_LIBS="-lreadline -l$py_libtermcap"
15099 fi
15100 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015102/* end confdefs.h. */
15103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104/* 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. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015107#ifdef __cplusplus
15108extern "C"
15109#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015110char readline ();
15111int
15112main ()
15113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015115 ;
15116 return 0;
15117}
15118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015119if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015120 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015122rm -f core conftest.err conftest.$ac_objext \
15123 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015124 if test $py_cv_lib_readline = yes; then
15125 break
15126 fi
15127done
15128# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15129#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015130if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15132$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015133else
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15135$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015138
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015139fi
15140
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015141# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15143$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015144if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015146else
15147 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015148LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015150/* end confdefs.h. */
15151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152/* Override any GCC internal prototype to avoid an error.
15153 Use char because int might match the return type of a GCC
15154 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015155#ifdef __cplusplus
15156extern "C"
15157#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015158char rl_callback_handler_install ();
15159int
15160main ()
15161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015163 ;
15164 return 0;
15165}
15166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015167if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015168 ac_cv_lib_readline_rl_callback_handler_install=yes
15169else
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015172rm -f core conftest.err conftest.$ac_objext \
15173 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015174LIBS=$ac_check_lib_save_LIBS
15175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15177$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015178if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015179
Matthias Kloseb9621712010-04-24 17:59:49 +000015180$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181
15182fi
15183
15184
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015185# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015188#include <readline/readline.h>
15189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015190if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015191 have_readline=yes
15192else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015193 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015194
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015195fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015196rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015197if test $have_readline = yes
15198then
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015200/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015201#include <readline/readline.h>
15202
15203_ACEOF
15204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015208
15209fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015210rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015211
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015213/* end confdefs.h. */
15214#include <readline/readline.h>
15215
15216_ACEOF
15217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015221
15222fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015223rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015224
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015225fi
15226
Martin v. Löwis0daad592001-09-30 21:09:59 +000015227# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15229$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015230if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015232else
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015234LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238/* Override any GCC internal prototype to avoid an error.
15239 Use char because int might match the return type of a GCC
15240 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015241#ifdef __cplusplus
15242extern "C"
15243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015244char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015245int
15246main ()
15247{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 ;
15250 return 0;
15251}
15252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015253if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015254 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015255else
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015258rm -f core conftest.err conftest.$ac_objext \
15259 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015260LIBS=$ac_check_lib_save_LIBS
15261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15263$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015264if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015265
Matthias Kloseb9621712010-04-24 17:59:49 +000015266$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015267
Martin v. Löwis0daad592001-09-30 21:09:59 +000015268fi
15269
Michael W. Hudson54241132001-12-07 15:38:26 +000015270
Thomas Wouters89d996e2007-09-08 17:39:28 +000015271# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15273$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015274if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015275 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015276else
15277 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015278LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015280/* end confdefs.h. */
15281
15282/* Override any GCC internal prototype to avoid an error.
15283 Use char because int might match the return type of a GCC
15284 builtin and then its argument prototype would still apply. */
15285#ifdef __cplusplus
15286extern "C"
15287#endif
15288char rl_completion_display_matches_hook ();
15289int
15290main ()
15291{
15292return rl_completion_display_matches_hook ();
15293 ;
15294 return 0;
15295}
15296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015297if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015298 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15299else
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015302rm -f core conftest.err conftest.$ac_objext \
15303 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015304LIBS=$ac_check_lib_save_LIBS
15305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15307$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015308if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015309
Matthias Kloseb9621712010-04-24 17:59:49 +000015310$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015311
15312fi
15313
15314
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015315# also in 4.0, but not in editline
15316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15317$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15318if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15319 $as_echo_n "(cached) " >&6
15320else
15321 ac_check_lib_save_LIBS=$LIBS
15322LIBS="-lreadline $READLINE_LIBS $LIBS"
15323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15324/* end confdefs.h. */
15325
15326/* Override any GCC internal prototype to avoid an error.
15327 Use char because int might match the return type of a GCC
15328 builtin and then its argument prototype would still apply. */
15329#ifdef __cplusplus
15330extern "C"
15331#endif
15332char rl_resize_terminal ();
15333int
15334main ()
15335{
15336return rl_resize_terminal ();
15337 ;
15338 return 0;
15339}
15340_ACEOF
15341if ac_fn_c_try_link "$LINENO"; then :
15342 ac_cv_lib_readline_rl_resize_terminal=yes
15343else
15344 ac_cv_lib_readline_rl_resize_terminal=no
15345fi
15346rm -f core conftest.err conftest.$ac_objext \
15347 conftest$ac_exeext conftest.$ac_ext
15348LIBS=$ac_check_lib_save_LIBS
15349fi
15350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15351$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15352if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15353
15354$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15355
15356fi
15357
15358
Martin v. Löwis0daad592001-09-30 21:09:59 +000015359# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15361$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015364else
Martin v. Löwis11437992002-04-12 09:54:03 +000015365 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015366LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370/* Override any GCC internal prototype to avoid an error.
15371 Use char because int might match the return type of a GCC
15372 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015373#ifdef __cplusplus
15374extern "C"
15375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015376char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015377int
15378main ()
15379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 ;
15382 return 0;
15383}
15384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015385if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015387else
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015390rm -f core conftest.err conftest.$ac_objext \
15391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015392LIBS=$ac_check_lib_save_LIBS
15393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15395$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015396if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015399
Guido van Rossum353ae582001-07-10 16:45:32 +000015400fi
15401
Jack Jansendd19cf82001-12-06 22:36:17 +000015402
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015403# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015405/* end confdefs.h. */
15406#include <readline/readline.h>
15407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015408if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015409 have_readline=yes
15410else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015411 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015412
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015413fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015414rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015415if test $have_readline = yes
15416then
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015418/* end confdefs.h. */
15419#include <readline/readline.h>
15420
15421_ACEOF
15422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015424
Matthias Kloseb9621712010-04-24 17:59:49 +000015425$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015426
15427fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015428rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015429
15430fi
15431
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15433$as_echo_n "checking for append_history in -lreadline... " >&6; }
15434if ${ac_cv_lib_readline_append_history+:} false; then :
15435 $as_echo_n "(cached) " >&6
15436else
15437 ac_check_lib_save_LIBS=$LIBS
15438LIBS="-lreadline $READLINE_LIBS $LIBS"
15439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15440/* end confdefs.h. */
15441
15442/* Override any GCC internal prototype to avoid an error.
15443 Use char because int might match the return type of a GCC
15444 builtin and then its argument prototype would still apply. */
15445#ifdef __cplusplus
15446extern "C"
15447#endif
15448char append_history ();
15449int
15450main ()
15451{
15452return append_history ();
15453 ;
15454 return 0;
15455}
15456_ACEOF
15457if ac_fn_c_try_link "$LINENO"; then :
15458 ac_cv_lib_readline_append_history=yes
15459else
15460 ac_cv_lib_readline_append_history=no
15461fi
15462rm -f core conftest.err conftest.$ac_objext \
15463 conftest$ac_exeext conftest.$ac_ext
15464LIBS=$ac_check_lib_save_LIBS
15465fi
15466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15467$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15468if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15469
15470$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15471
15472fi
15473
15474
Martin v. Löwis82bca632006-02-10 20:49:30 +000015475# End of readline checks: restore LIBS
15476LIBS=$LIBS_no_readline
15477
Matthias Kloseb9621712010-04-24 17:59:49 +000015478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15479$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015480if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015482else
Martin v. Löwis11437992002-04-12 09:54:03 +000015483
Matthias Kloseb9621712010-04-24 17:59:49 +000015484if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015485 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015486else
Matthias Kloseb9621712010-04-24 17:59:49 +000015487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015488/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015489
15490int main()
15491{
15492 int val1 = nice(1);
15493 if (val1 != -1 && val1 == nice(2))
15494 exit(0);
15495 exit(1);
15496}
15497
Martin v. Löwis11437992002-04-12 09:54:03 +000015498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015499if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015500 ac_cv_broken_nice=yes
15501else
Matthias Kloseb9621712010-04-24 17:59:49 +000015502 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15505 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015506fi
15507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508fi
15509
Matthias Kloseb9621712010-04-24 17:59:49 +000015510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15511$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015512if test "$ac_cv_broken_nice" = yes
15513then
Martin v. Löwis11437992002-04-12 09:54:03 +000015514
Matthias Kloseb9621712010-04-24 17:59:49 +000015515$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015516
15517fi
15518
Matthias Kloseb9621712010-04-24 17:59:49 +000015519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15520$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015521if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015523else
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015525 ac_cv_broken_poll=no
15526else
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015528/* end confdefs.h. */
15529
15530#include <poll.h>
15531
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015532int main()
15533{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015534 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015535 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015536
15537 close (42);
15538
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015539 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015540 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015541 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015542 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015543 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015544 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015545 return 1;
15546}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015547
15548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015549if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015550 ac_cv_broken_poll=yes
15551else
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015558fi
15559
Matthias Kloseb9621712010-04-24 17:59:49 +000015560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15561$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015562if test "$ac_cv_broken_poll" = yes
15563then
15564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015566
15567fi
15568
Brett Cannon43802422005-02-10 20:48:03 +000015569# 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 +000015570# (which is not required by ISO C or UNIX spec) and/or if we support
15571# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015572ac_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 +000015573#include <$ac_cv_struct_tm>
15574
Matthias Kloseb9621712010-04-24 17:59:49 +000015575"
Victor Stinnere0be4232011-10-25 13:06:09 +020015576if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015577
15578cat >>confdefs.h <<_ACEOF
15579#define HAVE_STRUCT_TM_TM_ZONE 1
15580_ACEOF
15581
15582
15583fi
15584
15585if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015588
15589else
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15591"
Victor Stinnere0be4232011-10-25 13:06:09 +020015592if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594else
Matthias Kloseb9621712010-04-24 17:59:49 +000015595 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596fi
15597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015599#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600_ACEOF
15601
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15603$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015604if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015606else
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015608/* end confdefs.h. */
15609#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610#if !HAVE_DECL_TZNAME
15611extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015612#endif
15613
15614int
15615main ()
15616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015617return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015618 ;
15619 return 0;
15620}
15621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015622if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015623 ac_cv_var_tzname=yes
15624else
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015627rm -f core conftest.err conftest.$ac_objext \
15628 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15631$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015632 if test $ac_cv_var_tzname = yes; then
15633
Matthias Kloseb9621712010-04-24 17:59:49 +000015634$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015635
15636 fi
15637fi
15638
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015639
Martin v. Löwis1d459062005-03-14 21:23:33 +000015640# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15642$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015643if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015645else
15646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015648 ac_cv_working_tzset=no
15649else
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015651/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015652
15653#include <stdlib.h>
15654#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015655#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015656
15657#if HAVE_TZNAME
15658extern char *tzname[];
15659#endif
15660
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015661int main()
15662{
Brett Cannon18367812003-09-19 00:59:16 +000015663 /* Note that we need to ensure that not only does tzset(3)
15664 do 'something' with localtime, but it works as documented
15665 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015666 This includes making sure that tzname is set properly if
15667 tm->tm_zone does not exist since it is the alternative way
15668 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015669
15670 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015671 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015672 */
15673
Martin v. Löwis1d459062005-03-14 21:23:33 +000015674 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015675 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15676
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015677 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015678 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015679 if (localtime(&groundhogday)->tm_hour != 0)
15680 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015681#if HAVE_TZNAME
15682 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15683 if (strcmp(tzname[0], "UTC") ||
15684 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15685 exit(1);
15686#endif
Brett Cannon18367812003-09-19 00:59:16 +000015687
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015688 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015689 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015690 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015691 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015692#if HAVE_TZNAME
15693 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15694 exit(1);
15695#endif
Brett Cannon18367812003-09-19 00:59:16 +000015696
15697 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15698 tzset();
15699 if (localtime(&groundhogday)->tm_hour != 11)
15700 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015701#if HAVE_TZNAME
15702 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15703 exit(1);
15704#endif
15705
15706#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015707 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15708 exit(1);
15709 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15710 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015711#endif
Brett Cannon18367812003-09-19 00:59:16 +000015712
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015713 exit(0);
15714}
15715
15716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015717if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015718 ac_cv_working_tzset=yes
15719else
Matthias Kloseb9621712010-04-24 17:59:49 +000015720 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015724fi
15725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726fi
15727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15729$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015730if test "$ac_cv_working_tzset" = yes
15731then
15732
Matthias Kloseb9621712010-04-24 17:59:49 +000015733$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015734
15735fi
15736
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015737# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15739$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015740if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015741 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015742else
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015744/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015745#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015746int
15747main ()
15748{
15749
15750struct stat st;
15751st.st_mtim.tv_nsec = 1;
15752
15753 ;
15754 return 0;
15755}
15756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015757if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015758 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015759else
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15763fi
15764
Matthias Kloseb9621712010-04-24 17:59:49 +000015765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15766$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015767if test "$ac_cv_stat_tv_nsec" = yes
15768then
15769
Matthias Kloseb9621712010-04-24 17:59:49 +000015770$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015771
15772fi
15773
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015774# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15776$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015777if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015778 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015779else
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015781/* end confdefs.h. */
15782#include <sys/stat.h>
15783int
15784main ()
15785{
15786
15787struct stat st;
15788st.st_mtimespec.tv_nsec = 1;
15789
15790 ;
15791 return 0;
15792}
15793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015794if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015795 ac_cv_stat_tv_nsec2=yes
15796else
Matthias Kloseb9621712010-04-24 17:59:49 +000015797 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15800fi
15801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15803$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015804if test "$ac_cv_stat_tv_nsec2" = yes
15805then
15806
Matthias Kloseb9621712010-04-24 17:59:49 +000015807$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015808
15809fi
15810
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015811# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015812ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015813if test "$cross_compiling" = no; then
15814 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15815fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015816
15817for ac_header in curses.h ncurses.h
15818do :
15819 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15820ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15821if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15822 cat >>confdefs.h <<_ACEOF
15823#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15824_ACEOF
15825
15826fi
15827
15828done
15829
15830
15831# On Solaris, term.h requires curses.h
15832for ac_header in term.h
15833do :
15834 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15835#ifdef HAVE_CURSES_H
15836#include <curses.h>
15837#endif
15838
15839"
15840if test "x$ac_cv_header_term_h" = xyes; then :
15841 cat >>confdefs.h <<_ACEOF
15842#define HAVE_TERM_H 1
15843_ACEOF
15844
15845fi
15846
15847done
15848
15849
Jack Jansen666b1e72001-10-31 12:11:48 +000015850# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15852$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015853if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015855else
Matthias Kloseb9621712010-04-24 17:59:49 +000015856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015857/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015858#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015859int
15860main ()
15861{
Jack Jansen666b1e72001-10-31 12:11:48 +000015862
15863 int rtn;
15864 rtn = mvwdelch(0,0,0);
15865
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 ;
15867 return 0;
15868}
15869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015870if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015871 ac_cv_mvwdelch_is_expression=yes
15872else
Matthias Kloseb9621712010-04-24 17:59:49 +000015873 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15876fi
15877
Matthias Kloseb9621712010-04-24 17:59:49 +000015878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15879$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015880
15881if test "$ac_cv_mvwdelch_is_expression" = yes
15882then
Martin v. Löwis11437992002-04-12 09:54:03 +000015883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015885
15886fi
15887
Matthias Kloseb9621712010-04-24 17:59:49 +000015888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15889$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015890if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015891 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015892else
Matthias Kloseb9621712010-04-24 17:59:49 +000015893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015894/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015895#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015896int
15897main ()
15898{
Jack Jansen666b1e72001-10-31 12:11:48 +000015899
15900 WINDOW *w;
15901 w->_flags = 0;
15902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903 ;
15904 return 0;
15905}
15906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015907if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015908 ac_cv_window_has_flags=yes
15909else
Matthias Kloseb9621712010-04-24 17:59:49 +000015910 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15913fi
15914
Matthias Kloseb9621712010-04-24 17:59:49 +000015915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15916$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015917
Jack Jansen666b1e72001-10-31 12:11:48 +000015918
15919if test "$ac_cv_window_has_flags" = yes
15920then
Martin v. Löwis11437992002-04-12 09:54:03 +000015921
Matthias Kloseb9621712010-04-24 17:59:49 +000015922$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015923
15924fi
15925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15927$as_echo_n "checking for is_term_resized... " >&6; }
15928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015929/* end confdefs.h. */
15930#include <curses.h>
15931int
15932main ()
15933{
15934void *x=is_term_resized
15935 ;
15936 return 0;
15937}
15938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015939if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015942
Matthias Kloseb159a552010-04-25 21:00:44 +000015943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015944$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015945else
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15947$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015948
15949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15953$as_echo_n "checking for resize_term... " >&6; }
15954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015955/* end confdefs.h. */
15956#include <curses.h>
15957int
15958main ()
15959{
15960void *x=resize_term
15961 ;
15962 return 0;
15963}
15964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015965if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015968
Matthias Kloseb159a552010-04-25 21:00:44 +000015969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015970$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015971else
Matthias Kloseb9621712010-04-24 17:59:49 +000015972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15973$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015974
15975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15977
Matthias Kloseb9621712010-04-24 17:59:49 +000015978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15979$as_echo_n "checking for resizeterm... " >&6; }
15980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015981/* end confdefs.h. */
15982#include <curses.h>
15983int
15984main ()
15985{
15986void *x=resizeterm
15987 ;
15988 return 0;
15989}
15990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015991if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015994
Matthias Kloseb159a552010-04-25 21:00:44 +000015995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015996$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015997else
Matthias Kloseb9621712010-04-24 17:59:49 +000015998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15999$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016000
16001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016003# last curses configure check
16004CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16007$as_echo "$as_me: checking for device files" >&6;}
16008
16009if test "x$cross_compiling" = xyes; then
16010 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16012$as_echo_n "checking for /dev/ptmx... " >&6; }
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16014$as_echo "not set" >&6; }
16015 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16016 fi
16017 if test "${ac_cv_file__dev_ptc+set}" != set; then
16018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16019$as_echo_n "checking for /dev/ptc... " >&6; }
16020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16021$as_echo "not set" >&6; }
16022 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16023 fi
16024fi
16025
Matthias Kloseb9621712010-04-24 17:59:49 +000016026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16027$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016028if ${ac_cv_file__dev_ptmx+:} false; then :
16029 $as_echo_n "(cached) " >&6
16030else
16031 test "$cross_compiling" = yes &&
16032 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16033if test -r "/dev/ptmx"; then
16034 ac_cv_file__dev_ptmx=yes
16035else
16036 ac_cv_file__dev_ptmx=no
16037fi
16038fi
16039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16040$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16041if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016042
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016043fi
16044
16045if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016046
Matthias Kloseb9621712010-04-24 17:59:49 +000016047$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016048
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16051$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016052if ${ac_cv_file__dev_ptc+:} false; then :
16053 $as_echo_n "(cached) " >&6
16054else
16055 test "$cross_compiling" = yes &&
16056 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16057if test -r "/dev/ptc"; then
16058 ac_cv_file__dev_ptc=yes
16059else
16060 ac_cv_file__dev_ptc=no
16061fi
16062fi
16063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16064$as_echo "$ac_cv_file__dev_ptc" >&6; }
16065if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016066
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016067fi
16068
16069if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016070
Matthias Kloseb9621712010-04-24 17:59:49 +000016071$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016072
Neal Norwitz865400f2003-03-21 01:42:58 +000016073fi
16074
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016075if test $ac_sys_system = Darwin
16076then
16077 LIBS="$LIBS -framework CoreFoundation"
16078fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016079
Matthias Kloseb9621712010-04-24 17:59:49 +000016080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16081$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016082if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016083 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016084else
Matthias Kloseb9621712010-04-24 17:59:49 +000016085 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016086 ac_cv_have_size_t_format="cross -- assuming yes"
16087
Thomas Wouters477c8d52006-05-27 19:21:47 +000016088else
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016090/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016091
Thomas Wouters477c8d52006-05-27 19:21:47 +000016092#include <stdio.h>
16093#include <stddef.h>
16094#include <string.h>
16095
Christian Heimes2c181612007-12-17 20:04:13 +000016096#ifdef HAVE_SYS_TYPES_H
16097#include <sys/types.h>
16098#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016099
16100#ifdef HAVE_SSIZE_T
16101typedef ssize_t Py_ssize_t;
16102#elif SIZEOF_VOID_P == SIZEOF_LONG
16103typedef long Py_ssize_t;
16104#else
16105typedef int Py_ssize_t;
16106#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016107
Christian Heimes2c181612007-12-17 20:04:13 +000016108int main()
16109{
16110 char buffer[256];
16111
Thomas Wouters477c8d52006-05-27 19:21:47 +000016112 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16113 return 1;
16114
Thomas Wouters89f507f2006-12-13 04:49:30 +000016115 if (strcmp(buffer, "123"))
16116 return 1;
16117
16118 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16119 return 1;
16120
16121 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016122 return 1;
16123
16124 return 0;
16125}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016126
Thomas Wouters477c8d52006-05-27 19:21:47 +000016127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016128if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016129 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016130else
Matthias Kloseb9621712010-04-24 17:59:49 +000016131 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16134 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016135fi
16136
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16139$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016140if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016141
Matthias Kloseb9621712010-04-24 17:59:49 +000016142$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016143
16144fi
16145
Matthias Kloseb9621712010-04-24 17:59:49 +000016146ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016147#ifdef HAVE_SYS_TYPES_H
16148#include <sys/types.h>
16149#endif
16150#ifdef HAVE_SYS_SOCKET_H
16151#include <sys/socket.h>
16152#endif
16153
Matthias Kloseb9621712010-04-24 17:59:49 +000016154"
Victor Stinnere0be4232011-10-25 13:06:09 +020016155if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016156
Martin v. Löwis11437992002-04-12 09:54:03 +000016157else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016158
Matthias Kloseb9621712010-04-24 17:59:49 +000016159$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016160
16161fi
16162
Michael W. Hudson54241132001-12-07 15:38:26 +000016163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16165$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016166if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016167 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016168else
Matthias Kloseb9621712010-04-24 17:59:49 +000016169 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016170 ac_cv_broken_mbstowcs=no
16171else
Matthias Kloseb9621712010-04-24 17:59:49 +000016172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016173/* end confdefs.h. */
16174
Stefan Krah19c21392012-11-22 23:47:32 +010016175#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016176#include<stdlib.h>
16177int main() {
16178 size_t len = -1;
16179 const char *str = "text";
16180 len = mbstowcs(NULL, str, 0);
16181 return (len != 4);
16182}
16183
16184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016185if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016186 ac_cv_broken_mbstowcs=no
16187else
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016192fi
16193
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016194fi
16195
Matthias Kloseb9621712010-04-24 17:59:49 +000016196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16197$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016198if test "$ac_cv_broken_mbstowcs" = yes
16199then
16200
Matthias Kloseb9621712010-04-24 17:59:49 +000016201$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016202
16203fi
16204
Antoine Pitroub52ec782009-01-25 16:34:23 +000016205# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16207$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016208
16209# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016210if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016211 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016212if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016213then
16214
Matthias Kloseb9621712010-04-24 17:59:49 +000016215$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016216
Matthias Kloseb9621712010-04-24 17:59:49 +000016217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16218$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016219fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016220if test "$withval" = no
16221then
16222
16223$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16224
Matthias Kloseb9621712010-04-24 17:59:49 +000016225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16226$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016227fi
16228
Antoine Pitrou042b1282010-08-13 21:15:58 +000016229else
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16231$as_echo "no value specified" >&6; }
16232fi
16233
Antoine Pitroub52ec782009-01-25 16:34:23 +000016234
Matthias Kloseb17289e2012-03-15 19:51:34 +010016235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16236$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16237if ${ac_cv_computed_gotos+:} false; then :
16238 $as_echo_n "(cached) " >&6
16239else
16240 if test "$cross_compiling" = yes; then :
16241 if test "${with_computed_gotos+set}" = set; then
16242 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16243 else
16244 ac_cv_computed_gotos=no
16245 fi
16246else
16247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16248/* end confdefs.h. */
16249
16250int main(int argc, char **argv)
16251{
16252 static void *targets[1] = { &&LABEL1 };
16253 goto LABEL2;
16254LABEL1:
16255 return 0;
16256LABEL2:
16257 goto *targets[0];
16258 return 1;
16259}
16260
16261_ACEOF
16262if ac_fn_c_try_run "$LINENO"; then :
16263 ac_cv_computed_gotos=yes
16264else
16265 ac_cv_computed_gotos=no
16266fi
16267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16268 conftest.$ac_objext conftest.beam conftest.$ac_ext
16269fi
16270
16271fi
16272
16273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16274$as_echo "$ac_cv_computed_gotos" >&6; }
16275case "$ac_cv_computed_gotos" in yes*)
16276
16277$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16278
16279esac
16280
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016281case $ac_sys_system in
16282AIX*)
16283
16284$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16285 ;;
16286esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016287
Michael W. Hudson54241132001-12-07 15:38:26 +000016288
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016289
16290
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016291for h in `(cd $srcdir;echo Python/thread_*.h)`
16292do
16293 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16294done
16295
Michael W. Hudson54241132001-12-07 15:38:26 +000016296
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016297SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16299$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016300for dir in $SRCDIRS; do
16301 if test ! -d $dir; then
16302 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016303 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016304done
Matthias Kloseb9621712010-04-24 17:59:49 +000016305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16306$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016307
Stefan Krah1919b7e2012-03-21 18:25:23 +010016308# Availability of -O2:
16309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16310$as_echo_n "checking for -O2... " >&6; }
16311saved_cflags="$CFLAGS"
16312CFLAGS="-O2"
16313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314/* end confdefs.h. */
16315
16316int
16317main ()
16318{
16319
16320
16321 ;
16322 return 0;
16323}
16324_ACEOF
16325if ac_fn_c_try_compile "$LINENO"; then :
16326 have_O2=yes
16327else
16328 have_O2=no
16329fi
16330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16332$as_echo "$have_O2" >&6; }
16333CFLAGS="$saved_cflags"
16334
16335# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16336# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16338$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16339saved_cflags="$CFLAGS"
16340CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16341if test "$have_O2" = no; then
16342 CFLAGS=""
16343fi
16344if test "$cross_compiling" = yes; then :
16345 have_glibc_memmove_bug=undefined
16346else
16347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16348/* end confdefs.h. */
16349
16350#include <stdio.h>
16351#include <stdlib.h>
16352#include <string.h>
16353void foo(void *p, void *q) { memmove(p, q, 19); }
16354int main() {
16355 char a[32] = "123456789000000000";
16356 foo(&a[9], a);
16357 if (strcmp(a, "123456789123456789000000000") != 0)
16358 return 1;
16359 foo(a, &a[9]);
16360 if (strcmp(a, "123456789000000000") != 0)
16361 return 1;
16362 return 0;
16363}
16364
16365_ACEOF
16366if ac_fn_c_try_run "$LINENO"; then :
16367 have_glibc_memmove_bug=no
16368else
16369 have_glibc_memmove_bug=yes
16370fi
16371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16372 conftest.$ac_objext conftest.beam conftest.$ac_ext
16373fi
16374
16375CFLAGS="$saved_cflags"
16376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16377$as_echo "$have_glibc_memmove_bug" >&6; }
16378if test "$have_glibc_memmove_bug" = yes; then
16379
16380$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16381
16382fi
16383
16384if test "$have_gcc_asm_for_x87" = yes; then
16385 # Some versions of gcc miscompile inline asm:
16386 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16387 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16388 case $CC in
16389 *gcc*)
16390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16391$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16392 saved_cflags="$CFLAGS"
16393 CFLAGS="-O2"
16394 if test "$cross_compiling" = yes; then :
16395 have_ipa_pure_const_bug=undefined
16396else
16397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16398/* end confdefs.h. */
16399
16400 __attribute__((noinline)) int
16401 foo(int *p) {
16402 int r;
16403 asm ( "movl \$6, (%1)\n\t"
16404 "xorl %0, %0\n\t"
16405 : "=r" (r) : "r" (p) : "memory"
16406 );
16407 return r;
16408 }
16409 int main() {
16410 int p = 8;
16411 if ((foo(&p) ? : p) != 6)
16412 return 1;
16413 return 0;
16414 }
16415
16416_ACEOF
16417if ac_fn_c_try_run "$LINENO"; then :
16418 have_ipa_pure_const_bug=no
16419else
16420 have_ipa_pure_const_bug=yes
16421fi
16422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16423 conftest.$ac_objext conftest.beam conftest.$ac_ext
16424fi
16425
16426 CFLAGS="$saved_cflags"
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16428$as_echo "$have_ipa_pure_const_bug" >&6; }
16429 if test "$have_ipa_pure_const_bug" = yes; then
16430
16431$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16432
16433 fi
16434 ;;
16435 esac
16436fi
16437
Victor Stinner4f5366e2015-01-09 02:13:19 +010016438# Check for stdatomic.h
16439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16440$as_echo_n "checking for stdatomic.h... " >&6; }
16441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16442/* end confdefs.h. */
16443
16444
16445 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016446 atomic_int value = ATOMIC_VAR_INIT(1);
16447 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016448 int main() {
16449 int loaded_value = atomic_load(&value);
16450 return 0;
16451 }
16452
16453
16454_ACEOF
16455if ac_fn_c_try_link "$LINENO"; then :
16456 have_stdatomic_h=yes
16457else
16458 have_stdatomic_h=no
16459fi
16460rm -f core conftest.err conftest.$ac_objext \
16461 conftest$ac_exeext conftest.$ac_ext
16462
16463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16464$as_echo "$have_stdatomic_h" >&6; }
16465
16466if test "$have_stdatomic_h" = yes; then
16467
16468$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16469
16470fi
16471
16472# Check for GCC >= 4.7 __atomic builtins
16473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16474$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16476/* end confdefs.h. */
16477
16478
16479 volatile int val = 1;
16480 int main() {
16481 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16482 return 0;
16483 }
16484
16485
16486_ACEOF
16487if ac_fn_c_try_link "$LINENO"; then :
16488 have_builtin_atomic=yes
16489else
16490 have_builtin_atomic=no
16491fi
16492rm -f core conftest.err conftest.$ac_objext \
16493 conftest$ac_exeext conftest.$ac_ext
16494
16495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16496$as_echo "$have_builtin_atomic" >&6; }
16497
16498if test "$have_builtin_atomic" = yes; then
16499
16500$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16501
16502fi
16503
Ned Deily322f5ba2013-11-21 23:01:59 -080016504# ensurepip option
16505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16506$as_echo_n "checking for ensurepip... " >&6; }
16507
16508# Check whether --with-ensurepip was given.
16509if test "${with_ensurepip+set}" = set; then :
16510 withval=$with_ensurepip;
16511else
16512 with_ensurepip=upgrade
16513fi
16514
16515case $with_ensurepip in #(
16516 yes|upgrade) :
16517 ENSUREPIP=upgrade ;; #(
16518 install) :
16519 ENSUREPIP=install ;; #(
16520 no) :
16521 ENSUREPIP=no ;; #(
16522 *) :
16523 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16524esac
16525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16526$as_echo "$ENSUREPIP" >&6; }
16527
16528
Victor Stinner35a97c02015-03-08 02:59:09 +010016529# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16531$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16533/* end confdefs.h. */
16534
16535
16536 #include <dirent.h>
16537
16538 int main() {
16539 struct dirent entry;
16540 return entry.d_type == DT_UNKNOWN;
16541 }
16542
16543
16544_ACEOF
16545if ac_fn_c_try_link "$LINENO"; then :
16546 have_dirent_d_type=yes
16547else
16548 have_dirent_d_type=no
16549fi
16550rm -f core conftest.err conftest.$ac_objext \
16551 conftest$ac_exeext conftest.$ac_ext
16552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16553$as_echo "$have_dirent_d_type" >&6; }
16554
16555if test "$have_dirent_d_type" = yes; then
16556
16557$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16558
16559fi
16560
Victor Stinner9eb57c52015-03-19 22:21:49 +010016561# check if the Linux getrandom() syscall is available
16562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16563$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16565/* end confdefs.h. */
16566
16567
Victor Stinner1b80b242016-04-12 22:34:58 +020016568 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016569 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016570 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016571
16572 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016573 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016574 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016575 const int flags = GRND_NONBLOCK;
16576 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016577 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016578 return 0;
16579 }
16580
16581
16582_ACEOF
16583if ac_fn_c_try_link "$LINENO"; then :
16584 have_getrandom_syscall=yes
16585else
16586 have_getrandom_syscall=no
16587fi
16588rm -f core conftest.err conftest.$ac_objext \
16589 conftest$ac_exeext conftest.$ac_ext
16590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16591$as_echo "$have_getrandom_syscall" >&6; }
16592
16593if test "$have_getrandom_syscall" = yes; then
16594
16595$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16596
16597fi
16598
Victor Stinner3abf44e2015-09-18 15:38:37 +020016599# check if the getrandom() function is available
16600# the test was written for the Solaris function of <sys/random.h>
16601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16602$as_echo_n "checking for the getrandom() function... " >&6; }
16603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16604/* end confdefs.h. */
16605
16606
16607 #include <sys/random.h>
16608
16609 int main() {
16610 char buffer[1];
16611 const size_t buflen = sizeof(buffer);
16612 const int flags = 0;
16613 /* ignore the result, Python checks for ENOSYS at runtime */
16614 (void)getrandom(buffer, buflen, flags);
16615 return 0;
16616 }
16617
16618
16619_ACEOF
16620if ac_fn_c_try_link "$LINENO"; then :
16621 have_getrandom=yes
16622else
16623 have_getrandom=no
16624fi
16625rm -f core conftest.err conftest.$ac_objext \
16626 conftest$ac_exeext conftest.$ac_ext
16627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16628$as_echo "$have_getrandom" >&6; }
16629
16630if test "$have_getrandom" = yes; then
16631
16632$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16633
16634fi
16635
Guido van Rossum627b2d71993-12-24 10:39:16 +000016636# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016637ac_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 +000016638
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016639ac_config_files="$ac_config_files Modules/ld_so_aix"
16640
Martin v. Löwis11437992002-04-12 09:54:03 +000016641cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016642# This file is a shell script that caches the results of configure
16643# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016644# scripts and configure runs, see configure's option --config-cache.
16645# It is not useful on other systems. If it contains results you don't
16646# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016647#
Martin v. Löwis11437992002-04-12 09:54:03 +000016648# config.status only pays attention to the cache file if you give it
16649# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016650#
Skip Montanaro6dead952003-09-25 14:50:04 +000016651# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016652# loading this file, other *unset* `ac_cv_foo' will be assigned the
16653# following values.
16654
16655_ACEOF
16656
Guido van Rossumf78abae1997-01-21 22:02:36 +000016657# The following way of writing the cache mishandles newlines in values,
16658# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016660# Ultrix sh set writes to stderr and can't be redirected directly,
16661# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662(
16663 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16664 eval ac_val=\$$ac_var
16665 case $ac_val in #(
16666 *${as_nl}*)
16667 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016668 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16669$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 esac
16671 case $ac_var in #(
16672 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16674 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675 esac ;;
16676 esac
16677 done
16678
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16681 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016682 # `set' does not quote correctly, so add quotes: double-quote
16683 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016685 "s/'/'\\\\''/g;
16686 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016687 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 *)
16689 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016691 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692 esac |
16693 sort
16694) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016697 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16700 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16702 :end' >>confcache
16703if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16704 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016705 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016706 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16707$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016708 if test ! -f "$cache_file" || test -h "$cache_file"; then
16709 cat confcache >"$cache_file"
16710 else
16711 case $cache_file in #(
16712 */* | ?:*)
16713 mv -f confcache "$cache_file"$$ &&
16714 mv -f "$cache_file"$$ "$cache_file" ;; #(
16715 *)
16716 mv -f confcache "$cache_file" ;;
16717 esac
16718 fi
16719 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016720 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016721 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16722$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016723 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016724fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016725rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016727test "x$prefix" = xNONE && prefix=$ac_default_prefix
16728# Let make expand exec_prefix.
16729test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016730
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016731DEFS=-DHAVE_CONFIG_H
16732
Skip Montanaro6dead952003-09-25 14:50:04 +000016733ac_libobjs=
16734ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016735U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016736for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16737 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016740 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16741 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016742 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16743 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016744done
16745LIBOBJS=$ac_libobjs
16746
16747LTLIBOBJS=$ac_ltlibobjs
16748
16749
Martin v. Löwis11437992002-04-12 09:54:03 +000016750
Matthias Kloseb9621712010-04-24 17:59:49 +000016751
Victor Stinnere0be4232011-10-25 13:06:09 +020016752: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016753ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016754ac_clean_files_save=$ac_clean_files
16755ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016756{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16757$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16758as_write_fail=0
16759cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016760#! $SHELL
16761# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016762# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016763# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016764# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016765
Martin v. Löwis11437992002-04-12 09:54:03 +000016766debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016767ac_cs_recheck=false
16768ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016769
Matthias Kloseb9621712010-04-24 17:59:49 +000016770SHELL=\${CONFIG_SHELL-$SHELL}
16771export SHELL
16772_ASEOF
16773cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16774## -------------------- ##
16775## M4sh Initialization. ##
16776## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778# Be more Bourne compatible
16779DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016780if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016781 emulate sh
16782 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016783 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016784 # is contrary to our usage. Disable this feature.
16785 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016787else
Matthias Kloseb9621712010-04-24 17:59:49 +000016788 case `(set -o) 2>/dev/null` in #(
16789 *posix*) :
16790 set -o posix ;; #(
16791 *) :
16792 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016793esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016794fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016795
16796
Matthias Kloseb9621712010-04-24 17:59:49 +000016797as_nl='
16798'
16799export as_nl
16800# Printing a long string crashes Solaris 7 /usr/bin/printf.
16801as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16802as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16803as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16804# Prefer a ksh shell builtin over an external printf program on Solaris,
16805# but without wasting forks for bash or zsh.
16806if test -z "$BASH_VERSION$ZSH_VERSION" \
16807 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16808 as_echo='print -r --'
16809 as_echo_n='print -rn --'
16810elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16811 as_echo='printf %s\n'
16812 as_echo_n='printf %s'
16813else
16814 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16815 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16816 as_echo_n='/usr/ucb/echo -n'
16817 else
16818 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16819 as_echo_n_body='eval
16820 arg=$1;
16821 case $arg in #(
16822 *"$as_nl"*)
16823 expr "X$arg" : "X\\(.*\\)$as_nl";
16824 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16825 esac;
16826 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16827 '
16828 export as_echo_n_body
16829 as_echo_n='sh -c $as_echo_n_body as_echo'
16830 fi
16831 export as_echo_body
16832 as_echo='sh -c $as_echo_body as_echo'
16833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016834
16835# The user is always right.
16836if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016837 PATH_SEPARATOR=:
16838 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16839 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16840 PATH_SEPARATOR=';'
16841 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016844
16845# IFS
16846# We need space, tab and new line, in precisely that order. Quoting is
16847# there to prevent editors from complaining about space-tab.
16848# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16849# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850IFS=" "" $as_nl"
16851
16852# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016853as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016854case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855 *[\\/]* ) as_myself=$0 ;;
16856 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016857for as_dir in $PATH
16858do
16859 IFS=$as_save_IFS
16860 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016861 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16862 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865 ;;
16866esac
16867# We did not find ourselves, most probably we were run as `sh COMMAND'
16868# in which case we are not to be found in the path.
16869if test "x$as_myself" = x; then
16870 as_myself=$0
16871fi
16872if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016873 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16874 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875fi
16876
Matthias Kloseb9621712010-04-24 17:59:49 +000016877# Unset variables that we do not need and which cause bugs (e.g. in
16878# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16879# suppresses any "Segmentation fault" message there. '((' could
16880# trigger a bug in pdksh 5.2.14.
16881for as_var in BASH_ENV ENV MAIL MAILPATH
16882do eval test x\${$as_var+set} = xset \
16883 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016884done
16885PS1='$ '
16886PS2='> '
16887PS4='+ '
16888
16889# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016890LC_ALL=C
16891export LC_ALL
16892LANGUAGE=C
16893export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894
Matthias Kloseb9621712010-04-24 17:59:49 +000016895# CDPATH.
16896(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16897
16898
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016899# as_fn_error STATUS ERROR [LINENO LOG_FD]
16900# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016901# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16902# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016903# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016904as_fn_error ()
16905{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016906 as_status=$1; test $as_status -eq 0 && as_status=1
16907 if test "$4"; then
16908 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16909 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016910 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016911 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016912 as_fn_exit $as_status
16913} # as_fn_error
16914
16915
16916# as_fn_set_status STATUS
16917# -----------------------
16918# Set $? to STATUS, without forking.
16919as_fn_set_status ()
16920{
16921 return $1
16922} # as_fn_set_status
16923
16924# as_fn_exit STATUS
16925# -----------------
16926# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16927as_fn_exit ()
16928{
16929 set +e
16930 as_fn_set_status $1
16931 exit $1
16932} # as_fn_exit
16933
16934# as_fn_unset VAR
16935# ---------------
16936# Portably unset VAR.
16937as_fn_unset ()
16938{
16939 { eval $1=; unset $1;}
16940}
16941as_unset=as_fn_unset
16942# as_fn_append VAR VALUE
16943# ----------------------
16944# Append the text in VALUE to the end of the definition contained in VAR. Take
16945# advantage of any shell optimizations that allow amortized linear growth over
16946# repeated appends, instead of the typical quadratic growth present in naive
16947# implementations.
16948if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16949 eval 'as_fn_append ()
16950 {
16951 eval $1+=\$2
16952 }'
16953else
16954 as_fn_append ()
16955 {
16956 eval $1=\$$1\$2
16957 }
16958fi # as_fn_append
16959
16960# as_fn_arith ARG...
16961# ------------------
16962# Perform arithmetic evaluation on the ARGs, and store the result in the
16963# global $as_val. Take advantage of shells that can avoid forks. The arguments
16964# must be portable across $(()) and expr.
16965if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16966 eval 'as_fn_arith ()
16967 {
16968 as_val=$(( $* ))
16969 }'
16970else
16971 as_fn_arith ()
16972 {
16973 as_val=`expr "$@" || test $? -eq 1`
16974 }
16975fi # as_fn_arith
16976
16977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978if expr a : '\(a\)' >/dev/null 2>&1 &&
16979 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16980 as_expr=expr
16981else
16982 as_expr=false
16983fi
16984
16985if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16986 as_basename=basename
16987else
16988 as_basename=false
16989fi
16990
Matthias Kloseb9621712010-04-24 17:59:49 +000016991if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16992 as_dirname=dirname
16993else
16994 as_dirname=false
16995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997as_me=`$as_basename -- "$0" ||
16998$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16999 X"$0" : 'X\(//\)$' \| \
17000 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017001$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002 sed '/^.*\/\([^/][^/]*\)\/*$/{
17003 s//\1/
17004 q
17005 }
17006 /^X\/\(\/\/\)$/{
17007 s//\1/
17008 q
17009 }
17010 /^X\/\(\/\).*/{
17011 s//\1/
17012 q
17013 }
17014 s/.*/./; q'`
17015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016# Avoid depending upon Character Ranges.
17017as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17018as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17019as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17020as_cr_digits='0123456789'
17021as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022
17023ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017024case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017026 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017028 xy) ECHO_C='\c';;
17029 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17030 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031 esac;;
17032*)
17033 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017034esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017035
Martin v. Löwis11437992002-04-12 09:54:03 +000017036rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037if test -d conf$$.dir; then
17038 rm -f conf$$.dir/conf$$.file
17039else
17040 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017041 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017043if (echo >conf$$.file) 2>/dev/null; then
17044 if ln -s conf$$.file conf$$ 2>/dev/null; then
17045 as_ln_s='ln -s'
17046 # ... but there are two gotchas:
17047 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17048 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017049 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017050 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017051 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017052 elif ln conf$$.file conf$$ 2>/dev/null; then
17053 as_ln_s=ln
17054 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017055 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017057else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017058 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17061rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017062
Matthias Kloseb9621712010-04-24 17:59:49 +000017063
17064# as_fn_mkdir_p
17065# -------------
17066# Create "$as_dir" as a directory, including parents if necessary.
17067as_fn_mkdir_p ()
17068{
17069
17070 case $as_dir in #(
17071 -*) as_dir=./$as_dir;;
17072 esac
17073 test -d "$as_dir" || eval $as_mkdir_p || {
17074 as_dirs=
17075 while :; do
17076 case $as_dir in #(
17077 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17078 *) as_qdir=$as_dir;;
17079 esac
17080 as_dirs="'$as_qdir' $as_dirs"
17081 as_dir=`$as_dirname -- "$as_dir" ||
17082$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17083 X"$as_dir" : 'X\(//\)[^/]' \| \
17084 X"$as_dir" : 'X\(//\)$' \| \
17085 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17086$as_echo X"$as_dir" |
17087 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17088 s//\1/
17089 q
17090 }
17091 /^X\(\/\/\)[^/].*/{
17092 s//\1/
17093 q
17094 }
17095 /^X\(\/\/\)$/{
17096 s//\1/
17097 q
17098 }
17099 /^X\(\/\).*/{
17100 s//\1/
17101 q
17102 }
17103 s/.*/./; q'`
17104 test -d "$as_dir" && break
17105 done
17106 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017107 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017108
17109
17110} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017111if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017112 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017113else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017114 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017115 as_mkdir_p=false
17116fi
17117
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017118
17119# as_fn_executable_p FILE
17120# -----------------------
17121# Test if FILE is an executable regular file.
17122as_fn_executable_p ()
17123{
17124 test -f "$1" && test -x "$1"
17125} # as_fn_executable_p
17126as_test_x='test -x'
17127as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017128
17129# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130as_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 +000017131
17132# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017133as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
17135
Martin v. Löwis11437992002-04-12 09:54:03 +000017136exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017137## ----------------------------------- ##
17138## Main body of $CONFIG_STATUS script. ##
17139## ----------------------------------- ##
17140_ASEOF
17141test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017142
Matthias Kloseb9621712010-04-24 17:59:49 +000017143cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17144# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017145# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017146# values after options handling.
17147ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017148This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017149generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017150
17151 CONFIG_FILES = $CONFIG_FILES
17152 CONFIG_HEADERS = $CONFIG_HEADERS
17153 CONFIG_LINKS = $CONFIG_LINKS
17154 CONFIG_COMMANDS = $CONFIG_COMMANDS
17155 $ $0 $@
17156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157on `(hostname || uname -n) 2>/dev/null | sed 1q`
17158"
17159
Martin v. Löwis11437992002-04-12 09:54:03 +000017160_ACEOF
17161
Matthias Kloseb9621712010-04-24 17:59:49 +000017162case $ac_config_files in *"
17163"*) set x $ac_config_files; shift; ac_config_files=$*;;
17164esac
17165
17166case $ac_config_headers in *"
17167"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17168esac
17169
17170
17171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017172# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017173config_files="$ac_config_files"
17174config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017177
Matthias Kloseb9621712010-04-24 17:59:49 +000017178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017179ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017180\`$as_me' instantiates files and other configuration actions
17181from templates according to the current configuration. Unless the files
17182and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
Matthias Kloseb9621712010-04-24 17:59:49 +000017184Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017185
17186 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017188 --config print configuration, then exit
17189 -q, --quiet, --silent
17190 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 -d, --debug don't remove temporary files
17192 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017193 --file=FILE[:TEMPLATE]
17194 instantiate the configuration file FILE
17195 --header=FILE[:TEMPLATE]
17196 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017197
17198Configuration files:
17199$config_files
17200
17201Configuration headers:
17202$config_headers
17203
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017204Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017207cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17208ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017209ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017210python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017211configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017212 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017213
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017214Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017215This config.status script is free software; the Free Software Foundation
17216gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217
17218ac_pwd='$ac_pwd'
17219srcdir='$srcdir'
17220INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017221MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017222test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017223_ACEOF
17224
Matthias Kloseb9621712010-04-24 17:59:49 +000017225cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17226# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017227ac_need_defaults=:
17228while test $# != 0
17229do
17230 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017231 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17233 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017234 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017235 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017236 --*=)
17237 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17238 ac_optarg=
17239 ac_shift=:
17240 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017242 ac_option=$1
17243 ac_optarg=$2
17244 ac_shift=shift
17245 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017246 esac
17247
Skip Montanaro6dead952003-09-25 14:50:04 +000017248 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017249 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017250 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17251 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017253 $as_echo "$ac_cs_version"; exit ;;
17254 --config | --confi | --conf | --con | --co | --c )
17255 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017257 debug=: ;;
17258 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017259 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017260 case $ac_optarg in
17261 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017262 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017263 esac
17264 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 ac_need_defaults=false;;
17266 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017267 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017268 case $ac_optarg in
17269 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17270 esac
17271 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017272 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017273 --he | --h)
17274 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017275 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017276Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017278 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017279 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17280 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17281 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017282
17283 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017284 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017285Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017286
Matthias Kloseb9621712010-04-24 17:59:49 +000017287 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017289
17290 esac
17291 shift
17292done
17293
Skip Montanaro6dead952003-09-25 14:50:04 +000017294ac_configure_extra_args=
17295
17296if $ac_cs_silent; then
17297 exec 6>/dev/null
17298 ac_configure_extra_args="$ac_configure_extra_args --silent"
17299fi
17300
17301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017303if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017304 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017305 shift
17306 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17307 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017308 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017309 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017310fi
17311
Martin v. Löwis11437992002-04-12 09:54:03 +000017312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017314exec 5>>config.log
17315{
17316 echo
17317 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17318## Running $as_me. ##
17319_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017320 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017324cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017326
Matthias Kloseb9621712010-04-24 17:59:49 +000017327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328
17329# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017330for ac_config_target in $ac_config_targets
17331do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017332 case $ac_config_target in
17333 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17334 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17335 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017336 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17337 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17339 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017340 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017341 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017342 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343
Victor Stinnere0be4232011-10-25 13:06:09 +020017344 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 esac
17346done
17347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348
Martin v. Löwis11437992002-04-12 09:54:03 +000017349# If the user did not use the arguments to specify the items to instantiate,
17350# then the envvar interface is used. Set only those that are not.
17351# We use the long form for the default assignment because of an extremely
17352# bizarre bug on SunOS 4.1.3.
17353if $ac_need_defaults; then
17354 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17355 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17356fi
17357
Skip Montanaro6dead952003-09-25 14:50:04 +000017358# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017360# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361# Hook for its removal unless debugging.
17362# Note that there is a small window in which the directory will not be cleaned:
17363# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017364$debug ||
17365{
Victor Stinnere0be4232011-10-25 13:06:09 +020017366 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017368 : "${ac_tmp:=$tmp}"
17369 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017371 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017372}
Martin v. Löwis11437992002-04-12 09:54:03 +000017373# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017374
Martin v. Löwis11437992002-04-12 09:54:03 +000017375{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017377 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017378} ||
17379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 tmp=./conf$$-$RANDOM
17381 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017382} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017383ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017384
Matthias Kloseb9621712010-04-24 17:59:49 +000017385# Set up the scripts for CONFIG_FILES section.
17386# No need to generate them if there are no CONFIG_FILES.
17387# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017389
Matthias Kloseb9621712010-04-24 17:59:49 +000017390
17391ac_cr=`echo X | tr X '\015'`
17392# On cygwin, bash can eat \r inside `` if the user requested igncr.
17393# But we know of no other shell where ac_cr would be empty at this
17394# point, so we can use a bashism as a fallback.
17395if test "x$ac_cr" = x; then
17396 eval ac_cr=\$\'\\r\'
17397fi
17398ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17399if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017400 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017401else
17402 ac_cs_awk_cr=$ac_cr
17403fi
17404
Victor Stinnere0be4232011-10-25 13:06:09 +020017405echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017406_ACEOF
17407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408
Matthias Kloseb9621712010-04-24 17:59:49 +000017409{
17410 echo "cat >conf$$subs.awk <<_ACEOF" &&
17411 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17412 echo "_ACEOF"
17413} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017414 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17415ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416ac_delim='%!_!# '
17417for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017419 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420
Matthias Kloseb9621712010-04-24 17:59:49 +000017421 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17422 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423 break
17424 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017425 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 else
17427 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017428 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429done
Matthias Kloseb9621712010-04-24 17:59:49 +000017430rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431
Matthias Kloseb9621712010-04-24 17:59:49 +000017432cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017433cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017435sed -n '
17436h
17437s/^/S["/; s/!.*/"]=/
17438p
17439g
17440s/^[^!]*!//
17441:repl
17442t repl
17443s/'"$ac_delim"'$//
17444t delim
17445:nl
17446h
17447s/\(.\{148\}\)..*/\1/
17448t more1
17449s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17450p
17451n
17452b repl
17453:more1
17454s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17455p
17456g
17457s/.\{148\}//
17458t nl
17459:delim
17460h
17461s/\(.\{148\}\)..*/\1/
17462t more2
17463s/["\\]/\\&/g; s/^/"/; s/$/"/
17464p
17465b
17466:more2
17467s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17468p
17469g
17470s/.\{148\}//
17471t delim
17472' <conf$$subs.awk | sed '
17473/^[^""]/{
17474 N
17475 s/\n//
17476}
17477' >>$CONFIG_STATUS || ac_write_fail=1
17478rm -f conf$$subs.awk
17479cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17480_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017481cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017482 for (key in S) S_is_set[key] = 1
17483 FS = ""
17484
17485}
17486{
17487 line = $ 0
17488 nfields = split(line, field, "@")
17489 substed = 0
17490 len = length(field[1])
17491 for (i = 2; i < nfields; i++) {
17492 key = field[i]
17493 keylen = length(key)
17494 if (S_is_set[key]) {
17495 value = S[key]
17496 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17497 len += length(value) + length(field[++i])
17498 substed = 1
17499 } else
17500 len += 1 + keylen
17501 }
17502
17503 print line
17504}
17505
17506_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17509if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17510 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17511else
17512 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017513fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017514 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017515_ACEOF
17516
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017517# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17518# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519# trailing colons and then remove the whole line if VPATH becomes empty
17520# (actually we leave an empty line to preserve line numbers).
17521if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017522 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17523h
17524s///
17525s/^/:/
17526s/[ ]*$/:/
17527s/:\$(srcdir):/:/g
17528s/:\${srcdir}:/:/g
17529s/:@srcdir@:/:/g
17530s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017532x
17533s/\(=[ ]*\).*/\1/
17534G
17535s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536s/^[^=]*=[ ]*$//
17537}'
17538fi
17539
Matthias Kloseb9621712010-04-24 17:59:49 +000017540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017541fi # test -n "$CONFIG_FILES"
17542
Matthias Kloseb9621712010-04-24 17:59:49 +000017543# Set up the scripts for CONFIG_HEADERS section.
17544# No need to generate them if there are no CONFIG_HEADERS.
17545# This happens for instance with `./config.status Makefile'.
17546if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017547cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017548BEGIN {
17549_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550
Matthias Kloseb9621712010-04-24 17:59:49 +000017551# Transform confdefs.h into an awk script `defines.awk', embedded as
17552# here-document in config.status, that substitutes the proper values into
17553# config.h.in to produce config.h.
17554
17555# Create a delimiter string that does not exist in confdefs.h, to ease
17556# handling of long lines.
17557ac_delim='%!_!# '
17558for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017559 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17560 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017561 break
17562 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017563 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017564 else
17565 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17566 fi
17567done
17568
17569# For the awk script, D is an array of macro values keyed by name,
17570# likewise P contains macro parameters if any. Preserve backslash
17571# newline sequences.
17572
17573ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17574sed -n '
17575s/.\{148\}/&'"$ac_delim"'/g
17576t rset
17577:rset
17578s/^[ ]*#[ ]*define[ ][ ]*/ /
17579t def
17580d
17581:def
17582s/\\$//
17583t bsnl
17584s/["\\]/\\&/g
17585s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17586D["\1"]=" \3"/p
17587s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17588d
17589:bsnl
17590s/["\\]/\\&/g
17591s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17592D["\1"]=" \3\\\\\\n"\\/p
17593t cont
17594s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17595t cont
17596d
17597:cont
17598n
17599s/.\{148\}/&'"$ac_delim"'/g
17600t clear
17601:clear
17602s/\\$//
17603t bsnlc
17604s/["\\]/\\&/g; s/^/"/; s/$/"/p
17605d
17606:bsnlc
17607s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17608b cont
17609' <confdefs.h | sed '
17610s/'"$ac_delim"'/"\\\
17611"/g' >>$CONFIG_STATUS || ac_write_fail=1
17612
17613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17614 for (key in D) D_is_set[key] = 1
17615 FS = ""
17616}
17617/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17618 line = \$ 0
17619 split(line, arg, " ")
17620 if (arg[1] == "#") {
17621 defundef = arg[2]
17622 mac1 = arg[3]
17623 } else {
17624 defundef = substr(arg[1], 2)
17625 mac1 = arg[2]
17626 }
17627 split(mac1, mac2, "(") #)
17628 macro = mac2[1]
17629 prefix = substr(line, 1, index(line, defundef) - 1)
17630 if (D_is_set[macro]) {
17631 # Preserve the white space surrounding the "#".
17632 print prefix "define", macro P[macro] D[macro]
17633 next
17634 } else {
17635 # Replace #undef with comments. This is necessary, for example,
17636 # in the case of _POSIX_SOURCE, which is predefined and required
17637 # on some systems where configure will not decide to define it.
17638 if (defundef == "undef") {
17639 print "/*", prefix defundef, macro, "*/"
17640 next
17641 }
17642 }
17643}
17644{ print }
17645_ACAWK
17646_ACEOF
17647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017648 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017649fi # test -n "$CONFIG_HEADERS"
17650
17651
17652eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17653shift
17654for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655do
17656 case $ac_tag in
17657 :[FHLC]) ac_mode=$ac_tag; continue;;
17658 esac
17659 case $ac_mode$ac_tag in
17660 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017661 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662 :[FH]-) ac_tag=-:-;;
17663 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17664 esac
17665 ac_save_IFS=$IFS
17666 IFS=:
17667 set x $ac_tag
17668 IFS=$ac_save_IFS
17669 shift
17670 ac_file=$1
17671 shift
17672
17673 case $ac_mode in
17674 :L) ac_source=$1;;
17675 :[FH])
17676 ac_file_inputs=
17677 for ac_f
17678 do
17679 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017680 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681 *) # Look for the file first in the build tree, then in the source tree
17682 # (if the path is not absolute). The absolute path cannot be DOS-style,
17683 # because $ac_f cannot contain `:'.
17684 test -f "$ac_f" ||
17685 case $ac_f in
17686 [\\/$]*) false;;
17687 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17688 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017689 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017691 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17692 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693 done
17694
17695 # Let's still pretend it is `configure' which instantiates (i.e., don't
17696 # use $as_me), people would be surprised to read:
17697 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017698 configure_input='Generated from '`
17699 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17700 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701 if test x"$ac_file" != x-; then
17702 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017703 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17704$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017705 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017706 # Neutralize special characters interpreted by sed in replacement strings.
17707 case $configure_input in #(
17708 *\&* | *\|* | *\\* )
17709 ac_sed_conf_input=`$as_echo "$configure_input" |
17710 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17711 *) ac_sed_conf_input=$configure_input;;
17712 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713
17714 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017715 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17716 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 esac
17718 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 esac
17720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017722$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017723 X"$ac_file" : 'X\(//\)[^/]' \| \
17724 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017726$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17728 s//\1/
17729 q
17730 }
17731 /^X\(\/\/\)[^/].*/{
17732 s//\1/
17733 q
17734 }
17735 /^X\(\/\/\)$/{
17736 s//\1/
17737 q
17738 }
17739 /^X\(\/\).*/{
17740 s//\1/
17741 q
17742 }
17743 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017744 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 ac_builddir=.
17746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747case "$ac_dir" in
17748.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17749*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017750 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017752 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753 case $ac_top_builddir_sub in
17754 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17755 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17756 esac ;;
17757esac
17758ac_abs_top_builddir=$ac_pwd
17759ac_abs_builddir=$ac_pwd$ac_dir_suffix
17760# for backward compatibility:
17761ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017762
17763case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766 ac_top_srcdir=$ac_top_builddir_sub
17767 ac_abs_top_srcdir=$ac_pwd ;;
17768 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770 ac_top_srcdir=$srcdir
17771 ac_abs_top_srcdir=$srcdir ;;
17772 *) # Relative name.
17773 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17774 ac_top_srcdir=$ac_top_build_prefix$srcdir
17775 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017776esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017778
Martin v. Löwis11437992002-04-12 09:54:03 +000017779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780 case $ac_mode in
17781 :F)
17782 #
17783 # CONFIG_FILE
17784 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017785
17786 case $INSTALL in
17787 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017789 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017790 ac_MKDIR_P=$MKDIR_P
17791 case $MKDIR_P in
17792 [\\/$]* | ?:[\\/]* ) ;;
17793 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17794 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017795_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796
Matthias Kloseb9621712010-04-24 17:59:49 +000017797cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798# If the template does not know about datarootdir, expand it.
17799# FIXME: This hack should be removed a few years after 2.60.
17800ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017801ac_sed_dataroot='
17802/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803 p
17804 q
17805}
17806/@datadir@/p
17807/@docdir@/p
17808/@infodir@/p
17809/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017810/@mandir@/p'
17811case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812*datarootdir*) ac_datarootdir_seen=yes;;
17813*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17815$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818 ac_datarootdir_hack='
17819 s&@datadir@&$datadir&g
17820 s&@docdir@&$docdir&g
17821 s&@infodir@&$infodir&g
17822 s&@localedir@&$localedir&g
17823 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017824 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825esac
17826_ACEOF
17827
17828# Neutralize VPATH when `$srcdir' = `.'.
17829# Shell code in configure.ac might set extrasub.
17830# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017831cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17832ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017833$extrasub
17834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017835cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017836:t
17837/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017838s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017840s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017841s&@srcdir@&$ac_srcdir&;t t
17842s&@abs_srcdir@&$ac_abs_srcdir&;t t
17843s&@top_srcdir@&$ac_top_srcdir&;t t
17844s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17845s&@builddir@&$ac_builddir&;t t
17846s&@abs_builddir@&$ac_abs_builddir&;t t
17847s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17848s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017849s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017851"
Victor Stinnere0be4232011-10-25 13:06:09 +020017852eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17853 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017856 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17857 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17858 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017860which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017861$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017862which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017863
Victor Stinnere0be4232011-10-25 13:06:09 +020017864 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017865 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017866 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17867 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017868 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017869 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870 ;;
17871 :H)
17872 #
17873 # CONFIG_HEADER
17874 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017875 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017876 {
17877 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017878 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17879 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017880 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017881 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017882 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17883$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017884 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017886 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017887 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 fi
17889 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017890 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017891 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017892 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896
17897 esac
17898
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017899
17900 case $ac_file$ac_mode in
17901 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17902
17903 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904done # for ac_tag
17905
Guido van Rossum627b2d71993-12-24 10:39:16 +000017906
Matthias Kloseb9621712010-04-24 17:59:49 +000017907as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017908_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017909ac_clean_files=$ac_clean_files_save
17910
Matthias Kloseb9621712010-04-24 17:59:49 +000017911test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017912 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017913
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
17915# configure is writing to config.log, and then calls config.status.
17916# config.status does its own redirection, appending to config.log.
17917# Unfortunately, on DOS this fails, as config.log is still kept open
17918# by configure, so config.status won't be able to write to it; its
17919# output is simply discarded. So we exec the FD to /dev/null,
17920# effectively closing config.log, so it can be properly (re)opened and
17921# appended to by config.status. When coming back to configure, we
17922# need to make the FD available again.
17923if test "$no_create" != yes; then
17924 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017925 ac_config_status_args=
17926 test "$silent" = yes &&
17927 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017928 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017929 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017930 exec 5>>config.log
17931 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17932 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017933 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017934fi
17935if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17936 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17937$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017938fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017939
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017940
Christian Heimes75ed8902013-11-20 01:11:18 +010017941echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017942if test ! -f Modules/Setup
17943then
17944 cp $srcdir/Modules/Setup.dist Modules/Setup
17945fi
17946
Christian Heimes75ed8902013-11-20 01:11:18 +010017947echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017948if test ! -f Modules/Setup.local
17949then
17950 echo "# Edit this file for local setup changes" >Modules/Setup.local
17951fi
17952
Christian Heimes75ed8902013-11-20 01:11:18 +010017953echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017954$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17955 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017956 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017957mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017958
17959if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17960 echo "" >&6
17961 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017962 echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017963 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017964 echo "" >&6
17965 echo "" >&6
17966fi
17967