blob: 96dcd0dcd5fec1785bac6f6da6bc9b240b7b26b2 [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 Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
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 Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_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
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR
Miss Islington (bot)24066722019-07-22 13:17:23 -0700685PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
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
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
Miss Islington (bot)28fc1ba2020-02-13 19:27:28 -0800785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Stefan Krah4d701242020-02-29 22:16:32 +0100829with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000830enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700831with_tcltk_includes
832with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100845with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100846with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000847'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848 ac_precious_vars='build_alias
849host_alias
850target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100851MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852CC
853CFLAGS
854LDFLAGS
855LIBS
856CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800857CPP
Miss Islington (bot)24066722019-07-22 13:17:23 -0700858PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800859PKG_CONFIG
860PKG_CONFIG_PATH
861PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865ac_init_help=
866ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000867ac_unrecognized_opts=
868ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# The variables have the same names as the options, with
870# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874no_recursion=
875prefix=NONE
876program_prefix=NONE
877program_suffix=NONE
878program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883x_includes=NONE
884x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886# Installation directory options.
887# These are left unexpanded so users can "make install exec_prefix=/foo"
888# and all the variables that are supposed to be based on exec_prefix
889# by default will actually change.
890# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892bindir='${exec_prefix}/bin'
893sbindir='${exec_prefix}/sbin'
894libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895datarootdir='${prefix}/share'
896datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897sysconfdir='${prefix}/etc'
898sharedstatedir='${prefix}/com'
899localstatedir='${prefix}/var'
Miss Islington (bot)28fc1ba2020-02-13 19:27:28 -0800900runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901includedir='${prefix}/include'
902oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
904infodir='${datarootdir}/info'
905htmldir='${docdir}'
906dvidir='${docdir}'
907pdfdir='${docdir}'
908psdir='${docdir}'
909libdir='${exec_prefix}/lib'
910localedir='${datarootdir}/locale'
911mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 # If the previous option needs an argument, assign it.
918 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 ac_prev=
921 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200925 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
926 *=) ac_optarg= ;;
927 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Accept the important Cygnus configure options, so we can diagnose typos.
931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 case $ac_dashdash$ac_option in
933 --)
934 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -bindir | --bindir | --bindi | --bind | --bin | --bi)
937 ac_prev=bindir ;;
938 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940
941 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 -cache-file | --cache-file | --cache-fil | --cache-fi \
947 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
948 ac_prev=cache_file ;;
949 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
950 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 cache_file=$ac_optarg ;;
952
953 --config-cache | -C)
954 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
962 | --dataroo | --dataro | --datar)
963 ac_prev=datarootdir ;;
964 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
965 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
966 datarootdir=$ac_optarg ;;
967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983
984 -docdir | --docdir | --docdi | --doc | --do)
985 ac_prev=docdir ;;
986 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
987 docdir=$ac_optarg ;;
988
989 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
990 ac_prev=dvidir ;;
991 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
992 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200998 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000999 ac_useropt_orig=$ac_useropt
1000 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1001 case $ac_user_opts in
1002 *"
1003"enable_$ac_useropt"
1004"*) ;;
1005 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1006 ac_unrecognized_sep=', ';;
1007 esac
1008 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1011 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1012 | --exec | --exe | --ex)
1013 ac_prev=exec_prefix ;;
1014 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1015 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1016 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 # Obsolete; use --with-gas.
1021 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 -help | --help | --hel | --he | -h)
1024 ac_init_help=long ;;
1025 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1026 ac_init_help=recursive ;;
1027 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1028 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1036 ac_prev=htmldir ;;
1037 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1038 | --ht=*)
1039 htmldir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -includedir | --includedir | --includedi | --included | --include \
1042 | --includ | --inclu | --incl | --inc)
1043 ac_prev=includedir ;;
1044 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1045 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -infodir | --infodir | --infodi | --infod | --info | --inf)
1049 ac_prev=infodir ;;
1050 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libdir | --libdir | --libdi | --libd)
1054 ac_prev=libdir ;;
1055 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
1058 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1059 | --libexe | --libex | --libe)
1060 ac_prev=libexecdir ;;
1061 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1062 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 -localedir | --localedir | --localedi | --localed | --locale)
1066 ac_prev=localedir ;;
1067 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1068 localedir=$ac_optarg ;;
1069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 ac_prev=localstatedir ;;
1073 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1078 ac_prev=mandir ;;
1079 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Obsolete; use --without-fp.
1084 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 no_create=yes ;;
1089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1091 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1092 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1095 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1096 | --oldin | --oldi | --old | --ol | --o)
1097 ac_prev=oldincludedir ;;
1098 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1099 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1100 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1104 ac_prev=prefix ;;
1105 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1109 | --program-pre | --program-pr | --program-p)
1110 ac_prev=program_prefix ;;
1111 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1112 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1116 | --program-suf | --program-su | --program-s)
1117 ac_prev=program_suffix ;;
1118 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1119 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -program-transform-name | --program-transform-name \
1123 | --program-transform-nam | --program-transform-na \
1124 | --program-transform-n | --program-transform- \
1125 | --program-transform | --program-transfor \
1126 | --program-transfo | --program-transf \
1127 | --program-trans | --program-tran \
1128 | --progr-tra | --program-tr | --program-t)
1129 ac_prev=program_transform_name ;;
1130 -program-transform-name=* | --program-transform-name=* \
1131 | --program-transform-nam=* | --program-transform-na=* \
1132 | --program-transform-n=* | --program-transform-=* \
1133 | --program-transform=* | --program-transfor=* \
1134 | --program-transfo=* | --program-transf=* \
1135 | --program-trans=* | --program-tran=* \
1136 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1140 ac_prev=pdfdir ;;
1141 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1142 pdfdir=$ac_optarg ;;
1143
1144 -psdir | --psdir | --psdi | --psd | --ps)
1145 ac_prev=psdir ;;
1146 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1147 psdir=$ac_optarg ;;
1148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1150 | -silent | --silent | --silen | --sile | --sil)
1151 silent=yes ;;
1152
Miss Islington (bot)28fc1ba2020-02-13 19:27:28 -08001153 -runstatedir | --runstatedir | --runstatedi | --runstated \
1154 | --runstate | --runstat | --runsta | --runst | --runs \
1155 | --run | --ru | --r)
1156 ac_prev=runstatedir ;;
1157 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1158 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1159 | --run=* | --ru=* | --r=*)
1160 runstatedir=$ac_optarg ;;
1161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1163 ac_prev=sbindir ;;
1164 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1165 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
1168 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1169 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1170 | --sharedst | --shareds | --shared | --share | --shar \
1171 | --sha | --sh)
1172 ac_prev=sharedstatedir ;;
1173 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1174 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1175 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1176 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179 -site | --site | --sit)
1180 ac_prev=site ;;
1181 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1185 ac_prev=srcdir ;;
1186 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1190 | --syscon | --sysco | --sysc | --sys | --sy)
1191 ac_prev=sysconfdir ;;
1192 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1193 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001195
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1202 verbose=yes ;;
1203
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 -version | --version | --versio | --versi | --vers | -V)
1205 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 ac_useropt_orig=$ac_useropt
1229 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1230 case $ac_user_opts in
1231 *"
1232"with_$ac_useropt"
1233"*) ;;
1234 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1235 ac_unrecognized_sep=', ';;
1236 esac
1237 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239 --x)
1240 # Obsolete; use --with-x.
1241 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1244 | --x-incl | --x-inc | --x-in | --x-i)
1245 ac_prev=x_includes ;;
1246 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1247 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
1250 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1251 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1252 ac_prev=x_libraries ;;
1253 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1254 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1258Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ;;
1260
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 *=*)
1262 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1263 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 case $ac_envvar in #(
1265 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 export $ac_envvar ;;
1270
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001271 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001276 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 ;;
1278
1279 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280done
1281
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285fi
1286
Matthias Kloseb9621712010-04-24 17:59:49 +00001287if test -n "$ac_unrecognized_opts"; then
1288 case $enable_option_checking in
1289 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1292 esac
1293fi
1294
1295# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1297 datadir sysconfdir sharedstatedir localstatedir includedir \
1298 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Miss Islington (bot)28fc1ba2020-02-13 19:27:28 -08001299 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001302 # Remove trailing slashes.
1303 case $ac_val in
1304 */ )
1305 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1306 eval $ac_var=\$ac_val;;
1307 esac
1308 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001309 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 [\\/$]* | ?:[\\/]* ) continue;;
1311 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001313 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001314done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# There might be people who depend on the old broken behavior: `$host'
1317# used to hold the argument of --host etc.
1318# FIXME: To remove some day.
1319build=$build_alias
1320host=$host_alias
1321target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Martin v. Löwis11437992002-04-12 09:54:03 +00001323# FIXME: To remove some day.
1324if test "x$host_alias" != x; then
1325 if test "x$build_alias" = x; then
1326 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001327 elif test "x$build_alias" != "x$host_alias"; then
1328 cross_compiling=yes
1329 fi
1330fi
1331
1332ac_tool_prefix=
1333test -n "$host_alias" && ac_tool_prefix=$host_alias-
1334
1335test "$silent" = yes && exec 6>/dev/null
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338ac_pwd=`pwd` && test -n "$ac_pwd" &&
1339ac_ls_di=`ls -di .` &&
1340ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344
1345
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346# Find the source files, if location was not specified.
1347if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001348 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 ac_confdir=`$as_dirname -- "$as_myself" ||
1351$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1352 X"$as_myself" : 'X\(//\)[^/]' \| \
1353 X"$as_myself" : 'X\(//\)$' \| \
1354 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1355$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)[^/].*/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\/\)$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\).*/{
1369 s//\1/
1370 q
1371 }
1372 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001373 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375 srcdir=..
1376 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377else
1378 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380if test ! -r "$srcdir/$ac_unique_file"; then
1381 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387 pwd)`
1388# When building in place, set srcdir=.
1389if test "$ac_abs_confdir" = "$ac_pwd"; then
1390 srcdir=.
1391fi
1392# Remove unnecessary trailing slashes from srcdir.
1393# Double slashes in file names in object file debugging info
1394# mess up M-x gdb in Emacs.
1395case $srcdir in
1396*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397esac
1398for ac_var in $ac_precious_vars; do
1399 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_env_${ac_var}_value=\$${ac_var}
1401 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1402 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1403done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001404
Martin v. Löwis11437992002-04-12 09:54:03 +00001405#
1406# Report the --help message.
1407#
1408if test "$ac_init_help" = "long"; then
1409 # Omit some internal or obsolete options to make the list less imposing.
1410 # This message is too long to be a string in the A/UX 3.1 sh.
1411 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001412\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
1414Usage: $0 [OPTION]... [VAR=VALUE]...
1415
1416To assign environment variables (e.g., CC, CFLAGS...), specify them as
1417VAR=VALUE. See below for descriptions of some of the useful variables.
1418
1419Defaults for the options are specified in brackets.
1420
1421Configuration:
1422 -h, --help display this help and exit
1423 --help=short display options specific to this package
1424 --help=recursive display the short help of all the included packages
1425 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001426 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --cache-file=FILE cache test results in FILE [disabled]
1428 -C, --config-cache alias for \`--cache-file=config.cache'
1429 -n, --no-create do not create output files
1430 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432Installation directories:
1433 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438By default, \`make install' will install all the files in
1439\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1440an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1441for instance \`--prefix=\$HOME'.
1442
1443For better control, use the options below.
1444
1445Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --bindir=DIR user executables [EPREFIX/bin]
1447 --sbindir=DIR system admin executables [EPREFIX/sbin]
1448 --libexecdir=DIR program executables [EPREFIX/libexec]
1449 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1450 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1451 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Miss Islington (bot)28fc1ba2020-02-13 19:27:28 -08001452 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001453 --libdir=DIR object code libraries [EPREFIX/lib]
1454 --includedir=DIR C header files [PREFIX/include]
1455 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1456 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1457 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1458 --infodir=DIR info documentation [DATAROOTDIR/info]
1459 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1460 --mandir=DIR man documentation [DATAROOTDIR/man]
1461 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1462 --htmldir=DIR html documentation [DOCDIR]
1463 --dvidir=DIR dvi documentation [DOCDIR]
1464 --pdfdir=DIR pdf documentation [DOCDIR]
1465 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466_ACEOF
1467
1468 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001469
1470System types:
1471 --build=BUILD configure for building on BUILD [guessed]
1472 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001473_ACEOF
1474fi
1475
1476if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001478 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001479 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 cat <<\_ACEOF
1481
1482Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001483 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1485 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001486 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001487 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --enable-framework[=INSTALLDIR]
1489 Build (MacOSX|Darwin) framework
1490 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001491 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001492 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1493 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001494 --enable-loadable-sqlite-extensions
1495 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --enable-ipv6 Enable ipv6 (with ipv4) support
1497 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001498 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001499 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501Optional Packages:
1502 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1503 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001504 --with-universal-archs=ARCH
1505 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001506 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1507 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001508 --with-framework-name=FRAMEWORK
1509 specify an alternate name of the framework built
1510 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001511 --with-cxx-main=<compiler>
1512 compile main() and link python executable with C++
1513 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-suffix=.exe set executable suffix
1515 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001516 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001517 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001518 --with-lto Enable Link Time Optimization in any build. Disabled
1519 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001520 --with-hash-algorithm=[fnv|siphash24]
1521 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001522 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001523 enable AddressSanitizer (asan)
1524 --with-memory-sanitizer enable MemorySanitizer (msan)
1525 --with-undefined-behavior-sanitizer
1526 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001528 --with-system-expat build pyexpat module using an installed expat
1529 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001530 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001531 --with-system-libmpdec build _decimal module using an installed libmpdec
1532 library
Stefan Krah4d701242020-02-29 22:16:32 +01001533 --with-decimal-contextvar
1534 build _decimal module using a coroutine-local rather
1535 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001536 --with-tcltk-includes='-I...'
1537 override search for Tcl and Tk include files
1538 --with-tcltk-libs='-L...'
1539 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001540 --with-dbmliborder=db1:db2:...
1541 order to check db backends for dbm. Valid value is a
1542 colon separated string with the backend names
1543 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001544 --with(out)-doc-strings disable/enable documentation strings
1545 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001546 --with(out)-c-locale-coercion
1547 disable/enable C locale coercion to a UTF-8 based
1548 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001549 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001550 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001551 --with-libm=STRING math library
1552 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001553 --with(out)-computed-gotos
1554 Use computed gotos in evaluation loop (enabled by
1555 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001556 --with(out)-ensurepip=[=upgrade]
1557 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001558 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001559 --with-ssl-default-suites=[python|openssl|STRING]
1560 Override default cipher suites string, python: use
1561 Python's preferred selection (default), openssl:
1562 leave OpenSSL's defaults untouched, STRING: use a
1563 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001566 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 CC C compiler command
1568 CFLAGS C compiler flags
1569 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1570 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001572 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 CPP C preprocessor
Miss Islington (bot)24066722019-07-22 13:17:23 -07001575 PROFILE_TASK
1576 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001577 PKG_CONFIG path to pkg-config utility
1578 PKG_CONFIG_PATH
1579 directories to add to pkg-config's search path
1580 PKG_CONFIG_LIBDIR
1581 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001582
1583Use these variables to override the choices made by `configure' or to help
1584it to find libraries and programs with nonstandard names/locations.
1585
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001586Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001587_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001589fi
1590
1591if test "$ac_init_help" = "recursive"; then
1592 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001594 test -d "$ac_dir" ||
1595 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1596 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 ac_builddir=.
1598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599case "$ac_dir" in
1600.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1601*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001604 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 case $ac_top_builddir_sub in
1606 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1607 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1608 esac ;;
1609esac
1610ac_abs_top_builddir=$ac_pwd
1611ac_abs_builddir=$ac_pwd$ac_dir_suffix
1612# for backward compatibility:
1613ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001614
1615case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 ac_top_srcdir=$ac_top_builddir_sub
1619 ac_abs_top_srcdir=$ac_pwd ;;
1620 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622 ac_top_srcdir=$srcdir
1623 ac_abs_top_srcdir=$srcdir ;;
1624 *) # Relative name.
1625 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1626 ac_top_srcdir=$ac_top_build_prefix$srcdir
1627 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001628esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 cd "$ac_dir" || { ac_status=$?; continue; }
1632 # Check for guested configure.
1633 if test -f "$ac_srcdir/configure.gnu"; then
1634 echo &&
1635 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1636 elif test -f "$ac_srcdir/configure"; then
1637 echo &&
1638 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001640 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 fi || ac_status=$?
1642 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 done
1644fi
1645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001647if $ac_init_version; then
1648 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001649python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001650generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001651
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001652Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001653This configure script is free software; the Free Software Foundation
1654gives unlimited permission to copy, distribute and modify it.
1655_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001658
1659## ------------------------ ##
1660## Autoconf initialization. ##
1661## ------------------------ ##
1662
1663# ac_fn_c_try_compile LINENO
1664# --------------------------
1665# Try to compile conftest.$ac_ext, and return whether this succeeded.
1666ac_fn_c_try_compile ()
1667{
1668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1669 rm -f conftest.$ac_objext
1670 if { { ac_try="$ac_compile"
1671case "(($ac_try" in
1672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673 *) ac_try_echo=$ac_try;;
1674esac
1675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676$as_echo "$ac_try_echo"; } >&5
1677 (eval "$ac_compile") 2>conftest.err
1678 ac_status=$?
1679 if test -s conftest.err; then
1680 grep -v '^ *+' conftest.err >conftest.er1
1681 cat conftest.er1 >&5
1682 mv -f conftest.er1 conftest.err
1683 fi
1684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1685 test $ac_status = 0; } && {
1686 test -z "$ac_c_werror_flag" ||
1687 test ! -s conftest.err
1688 } && test -s conftest.$ac_objext; then :
1689 ac_retval=0
1690else
1691 $as_echo "$as_me: failed program was:" >&5
1692sed 's/^/| /' conftest.$ac_ext >&5
1693
1694 ac_retval=1
1695fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001697 as_fn_set_status $ac_retval
1698
1699} # ac_fn_c_try_compile
1700
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001701# ac_fn_c_try_cpp LINENO
1702# ----------------------
1703# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1704ac_fn_c_try_cpp ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1707 if { { ac_try="$ac_cpp conftest.$ac_ext"
1708case "(($ac_try" in
1709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1710 *) ac_try_echo=$ac_try;;
1711esac
1712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1713$as_echo "$ac_try_echo"; } >&5
1714 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1715 ac_status=$?
1716 if test -s conftest.err; then
1717 grep -v '^ *+' conftest.err >conftest.er1
1718 cat conftest.er1 >&5
1719 mv -f conftest.er1 conftest.err
1720 fi
1721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1722 test $ac_status = 0; } > conftest.i && {
1723 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1724 test ! -s conftest.err
1725 }; then :
1726 ac_retval=0
1727else
1728 $as_echo "$as_me: failed program was:" >&5
1729sed 's/^/| /' conftest.$ac_ext >&5
1730
1731 ac_retval=1
1732fi
1733 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1734 as_fn_set_status $ac_retval
1735
1736} # ac_fn_c_try_cpp
1737
Matthias Kloseb9621712010-04-24 17:59:49 +00001738# ac_fn_c_try_link LINENO
1739# -----------------------
1740# Try to link conftest.$ac_ext, and return whether this succeeded.
1741ac_fn_c_try_link ()
1742{
1743 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744 rm -f conftest.$ac_objext conftest$ac_exeext
1745 if { { ac_try="$ac_link"
1746case "(($ac_try" in
1747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1748 *) ac_try_echo=$ac_try;;
1749esac
1750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1751$as_echo "$ac_try_echo"; } >&5
1752 (eval "$ac_link") 2>conftest.err
1753 ac_status=$?
1754 if test -s conftest.err; then
1755 grep -v '^ *+' conftest.err >conftest.er1
1756 cat conftest.er1 >&5
1757 mv -f conftest.er1 conftest.err
1758 fi
1759 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1760 test $ac_status = 0; } && {
1761 test -z "$ac_c_werror_flag" ||
1762 test ! -s conftest.err
1763 } && test -s conftest$ac_exeext && {
1764 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001765 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001766 }; then :
1767 ac_retval=0
1768else
1769 $as_echo "$as_me: failed program was:" >&5
1770sed 's/^/| /' conftest.$ac_ext >&5
1771
1772 ac_retval=1
1773fi
1774 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1775 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1776 # interfere with the next link command; also delete a directory that is
1777 # left behind by Apple's compiler. We do this before executing the actions.
1778 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001779 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 as_fn_set_status $ac_retval
1781
1782} # ac_fn_c_try_link
1783
Matthias Kloseb9621712010-04-24 17:59:49 +00001784# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1785# -------------------------------------------------------
1786# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1787# the include files in INCLUDES and setting the cache variable VAR
1788# accordingly.
1789ac_fn_c_check_header_mongrel ()
1790{
1791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001792 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1794$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001795if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001796 $as_echo_n "(cached) " >&6
1797fi
1798eval ac_res=\$$3
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1800$as_echo "$ac_res" >&6; }
1801else
1802 # Is the header compilable?
1803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1804$as_echo_n "checking $2 usability... " >&6; }
1805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1806/* end confdefs.h. */
1807$4
1808#include <$2>
1809_ACEOF
1810if ac_fn_c_try_compile "$LINENO"; then :
1811 ac_header_compiler=yes
1812else
1813 ac_header_compiler=no
1814fi
1815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1817$as_echo "$ac_header_compiler" >&6; }
1818
1819# Is the header present?
1820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1821$as_echo_n "checking $2 presence... " >&6; }
1822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823/* end confdefs.h. */
1824#include <$2>
1825_ACEOF
1826if ac_fn_c_try_cpp "$LINENO"; then :
1827 ac_header_preproc=yes
1828else
1829 ac_header_preproc=no
1830fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001831rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1833$as_echo "$ac_header_preproc" >&6; }
1834
1835# So? What about this header?
1836case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1837 yes:no: )
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1839$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1841$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1842 ;;
1843 no:yes:* )
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1845$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1847$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1849$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1851$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1853$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001854( $as_echo "## --------------------------------------- ##
1855## Report this to https://bugs.python.org/ ##
1856## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001857 ) | sed "s/^/$as_me: WARNING: /" >&2
1858 ;;
1859esac
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1861$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001862if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001863 $as_echo_n "(cached) " >&6
1864else
1865 eval "$3=\$ac_header_compiler"
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
1870fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001872
1873} # ac_fn_c_check_header_mongrel
1874
1875# ac_fn_c_try_run LINENO
1876# ----------------------
1877# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1878# that executables *can* be run.
1879ac_fn_c_try_run ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882 if { { ac_try="$ac_link"
1883case "(($ac_try" in
1884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1885 *) ac_try_echo=$ac_try;;
1886esac
1887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1888$as_echo "$ac_try_echo"; } >&5
1889 (eval "$ac_link") 2>&5
1890 ac_status=$?
1891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1892 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1893 { { case "(($ac_try" in
1894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1895 *) ac_try_echo=$ac_try;;
1896esac
1897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1898$as_echo "$ac_try_echo"; } >&5
1899 (eval "$ac_try") 2>&5
1900 ac_status=$?
1901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1902 test $ac_status = 0; }; }; then :
1903 ac_retval=0
1904else
1905 $as_echo "$as_me: program exited with status $ac_status" >&5
1906 $as_echo "$as_me: failed program was:" >&5
1907sed 's/^/| /' conftest.$ac_ext >&5
1908
1909 ac_retval=$ac_status
1910fi
1911 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001912 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001913 as_fn_set_status $ac_retval
1914
1915} # ac_fn_c_try_run
1916
1917# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1918# -------------------------------------------------------
1919# Tests whether HEADER exists and can be compiled using the include files in
1920# INCLUDES, setting the cache variable VAR accordingly.
1921ac_fn_c_check_header_compile ()
1922{
1923 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1925$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001926if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001927 $as_echo_n "(cached) " >&6
1928else
1929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930/* end confdefs.h. */
1931$4
1932#include <$2>
1933_ACEOF
1934if ac_fn_c_try_compile "$LINENO"; then :
1935 eval "$3=yes"
1936else
1937 eval "$3=no"
1938fi
1939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1940fi
1941eval ac_res=\$$3
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1943$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001945
1946} # ac_fn_c_check_header_compile
1947
Matthias Kloseb9621712010-04-24 17:59:49 +00001948# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1949# -------------------------------------------
1950# Tests whether TYPE exists after having included INCLUDES, setting cache
1951# variable VAR accordingly.
1952ac_fn_c_check_type ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1956$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001957if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001958 $as_echo_n "(cached) " >&6
1959else
1960 eval "$3=no"
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$4
1964int
1965main ()
1966{
1967if (sizeof ($2))
1968 return 0;
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973if ac_fn_c_try_compile "$LINENO"; then :
1974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1975/* end confdefs.h. */
1976$4
1977int
1978main ()
1979{
1980if (sizeof (($2)))
1981 return 0;
1982 ;
1983 return 0;
1984}
1985_ACEOF
1986if ac_fn_c_try_compile "$LINENO"; then :
1987
1988else
1989 eval "$3=yes"
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992fi
1993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000} # ac_fn_c_check_type
2001
Matthias Kloseb9621712010-04-24 17:59:49 +00002002# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2003# --------------------------------------------
2004# Tries to find the compile-time value of EXPR in a program that includes
2005# INCLUDES, setting VAR accordingly. Returns whether the value could be
2006# computed
2007ac_fn_c_compute_int ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if test "$cross_compiling" = yes; then
2011 # Depending upon the size, compute the lo and hi bounds.
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002019test_array [0] = 0;
2020return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_lo=0 ac_mid=0
2028 while :; do
2029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h. */
2031$4
2032int
2033main ()
2034{
2035static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002036test_array [0] = 0;
2037return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044 ac_hi=$ac_mid; break
2045else
2046 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2047 if test $ac_lo -le $ac_mid; then
2048 ac_lo= ac_hi=
2049 break
2050 fi
2051 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2052fi
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054 done
2055else
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002063test_array [0] = 0;
2064return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002065
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_hi=-1 ac_mid=-1
2072 while :; do
2073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074/* end confdefs.h. */
2075$4
2076int
2077main ()
2078{
2079static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002080test_array [0] = 0;
2081return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002082
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087if ac_fn_c_try_compile "$LINENO"; then :
2088 ac_lo=$ac_mid; break
2089else
2090 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2091 if test $ac_mid -le $ac_hi; then
2092 ac_lo= ac_hi=
2093 break
2094 fi
2095 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098 done
2099else
2100 ac_lo= ac_hi=
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103fi
2104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105# Binary search between lo and hi bounds.
2106while test "x$ac_lo" != "x$ac_hi"; do
2107 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002115test_array [0] = 0;
2116return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002117
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_hi=$ac_mid
2124else
2125 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2126fi
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128done
2129case $ac_lo in #((
2130?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2131'') ac_retval=1 ;;
2132esac
2133 else
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137static long int longval () { return $2; }
2138static unsigned long int ulongval () { return $2; }
2139#include <stdio.h>
2140#include <stdlib.h>
2141int
2142main ()
2143{
2144
2145 FILE *f = fopen ("conftest.val", "w");
2146 if (! f)
2147 return 1;
2148 if (($2) < 0)
2149 {
2150 long int i = longval ();
2151 if (i != ($2))
2152 return 1;
2153 fprintf (f, "%ld", i);
2154 }
2155 else
2156 {
2157 unsigned long int i = ulongval ();
2158 if (i != ($2))
2159 return 1;
2160 fprintf (f, "%lu", i);
2161 }
2162 /* Do not output a trailing newline, as this causes \r\n confusion
2163 on some platforms. */
2164 return ferror (f) || fclose (f) != 0;
2165
2166 ;
2167 return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_run "$LINENO"; then :
2171 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2172else
2173 ac_retval=1
2174fi
2175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2176 conftest.$ac_objext conftest.beam conftest.$ac_ext
2177rm -f conftest.val
2178
2179 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002180 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 as_fn_set_status $ac_retval
2182
2183} # ac_fn_c_compute_int
2184
2185# ac_fn_c_check_func LINENO FUNC VAR
2186# ----------------------------------
2187# Tests whether FUNC exists, setting the cache variable VAR accordingly
2188ac_fn_c_check_func ()
2189{
2190 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2192$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002193if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002194 $as_echo_n "(cached) " >&6
2195else
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h. */
2198/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2199 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2200#define $2 innocuous_$2
2201
2202/* System header to define __stub macros and hopefully few prototypes,
2203 which can conflict with char $2 (); below.
2204 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2205 <limits.h> exists even on freestanding compilers. */
2206
2207#ifdef __STDC__
2208# include <limits.h>
2209#else
2210# include <assert.h>
2211#endif
2212
2213#undef $2
2214
2215/* Override any GCC internal prototype to avoid an error.
2216 Use char because int might match the return type of a GCC
2217 builtin and then its argument prototype would still apply. */
2218#ifdef __cplusplus
2219extern "C"
2220#endif
2221char $2 ();
2222/* The GNU C library defines this for functions which it implements
2223 to always fail with ENOSYS. Some functions are actually named
2224 something starting with __ and the normal name is an alias. */
2225#if defined __stub_$2 || defined __stub___$2
2226choke me
2227#endif
2228
2229int
2230main ()
2231{
2232return $2 ();
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_link "$LINENO"; then :
2238 eval "$3=yes"
2239else
2240 eval "$3=no"
2241fi
2242rm -f core conftest.err conftest.$ac_objext \
2243 conftest$ac_exeext conftest.$ac_ext
2244fi
2245eval ac_res=\$$3
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2247$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002248 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002249
2250} # ac_fn_c_check_func
2251
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002252# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2253# ---------------------------------------------
2254# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2255# accordingly.
2256ac_fn_c_check_decl ()
2257{
2258 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259 as_decl_name=`echo $2|sed 's/ *(.*//'`
2260 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2262$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2263if eval \${$3+:} false; then :
2264 $as_echo_n "(cached) " >&6
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$4
2269int
2270main ()
2271{
2272#ifndef $as_decl_name
2273#ifdef __cplusplus
2274 (void) $as_decl_use;
2275#else
2276 (void) $as_decl_name;
2277#endif
2278#endif
2279
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"; then :
2285 eval "$3=yes"
2286else
2287 eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291eval ac_res=\$$3
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293$as_echo "$ac_res" >&6; }
2294 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2295
2296} # ac_fn_c_check_decl
2297
Matthias Kloseb9621712010-04-24 17:59:49 +00002298# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2299# ----------------------------------------------------
2300# Tries to find if the field MEMBER exists in type AGGR, after including
2301# INCLUDES, setting cache variable VAR accordingly.
2302ac_fn_c_check_member ()
2303{
2304 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2306$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002307if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002308 $as_echo_n "(cached) " >&6
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$5
2313int
2314main ()
2315{
2316static $2 ac_aggr;
2317if (ac_aggr.$3)
2318return 0;
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$4=yes"
2325else
2326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h. */
2328$5
2329int
2330main ()
2331{
2332static $2 ac_aggr;
2333if (sizeof ac_aggr.$3)
2334return 0;
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_compile "$LINENO"; then :
2340 eval "$4=yes"
2341else
2342 eval "$4=no"
2343fi
2344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347fi
2348eval ac_res=\$$4
2349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002351 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002352
2353} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002354cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002355This file contains any messages produced by compilers while
2356running configure, to aid debugging if configure makes a mistake.
2357
Ned Deily5489bda2018-01-31 17:44:09 -05002358It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002359generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002360
2361 $ $0 $@
2362
2363_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002364exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002365{
2366cat <<_ASUNAME
2367## --------- ##
2368## Platform. ##
2369## --------- ##
2370
2371hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2372uname -m = `(uname -m) 2>/dev/null || echo unknown`
2373uname -r = `(uname -r) 2>/dev/null || echo unknown`
2374uname -s = `(uname -s) 2>/dev/null || echo unknown`
2375uname -v = `(uname -v) 2>/dev/null || echo unknown`
2376
2377/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2378/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2379
2380/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2381/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2382/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002384/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2385/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2386/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2387
2388_ASUNAME
2389
2390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2391for as_dir in $PATH
2392do
2393 IFS=$as_save_IFS
2394 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002395 $as_echo "PATH: $as_dir"
2396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002398
2399} >&5
2400
2401cat >&5 <<_ACEOF
2402
2403
2404## ----------- ##
2405## Core tests. ##
2406## ----------- ##
2407
2408_ACEOF
2409
2410
2411# Keep a trace of the command line.
2412# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002414# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002415# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002416ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002417ac_configure_args0=
2418ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002419ac_must_keep_next=false
2420for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002421do
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 for ac_arg
2423 do
2424 case $ac_arg in
2425 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2426 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2427 | -silent | --silent | --silen | --sile | --sil)
2428 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 esac
2432 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002437 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002439 case $ac_arg in
2440 *=* | --config-cache | -C | -disable-* | --disable-* \
2441 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2442 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2443 | -with-* | --with-* | -without-* | --without-* | --x)
2444 case "$ac_configure_args0 " in
2445 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2446 esac
2447 ;;
2448 -* ) ac_must_keep_next=true ;;
2449 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 ;;
2453 esac
2454 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002455done
Matthias Kloseb9621712010-04-24 17:59:49 +00002456{ ac_configure_args0=; unset ac_configure_args0;}
2457{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002458
2459# When interrupted or exit'd, cleanup temporary files, and complete
2460# config.log. We remove comments because anyway the quotes in there
2461# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462# WARNING: Use '\'' to represent an apostrophe within the trap.
2463# 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 +00002464trap 'exit_status=$?
2465 # Save into config.log some information that might help in debugging.
2466 {
2467 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002468
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002469 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002470## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002471## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 echo
2473 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474(
2475 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2476 eval ac_val=\$$ac_var
2477 case $ac_val in #(
2478 *${as_nl}*)
2479 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2481$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac
2483 case $ac_var in #(
2484 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002485 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2486 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 esac ;;
2488 esac
2489 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2492 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 "s/'\''/'\''\\\\'\'''\''/g;
2495 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2496 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002497 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002499 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac |
2501 sort
2502)
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002504
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002506## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_vars
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
2519 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 echo
2524 for ac_var in $ac_subst_files
2525 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 eval ac_val=\$$ac_var
2527 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 done | sort
2532 echo
2533 fi
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002537## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 echo
2542 fi
2543 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 $as_echo "$as_me: caught signal $ac_signal"
2545 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 rm -f core *.core core.conftest.* &&
2548 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002551for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002552 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002553done
2554ac_signal=0
2555
2556# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002558
Matthias Kloseb9621712010-04-24 17:59:49 +00002559$as_echo "/* confdefs.h */" > confdefs.h
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561# Predefined preprocessor variables.
2562
2563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_NAME "$PACKAGE_NAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_VERSION "$PACKAGE_VERSION"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_STRING "$PACKAGE_STRING"
2577_ACEOF
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2581_ACEOF
2582
Matthias Kloseb9621712010-04-24 17:59:49 +00002583cat >>confdefs.h <<_ACEOF
2584#define PACKAGE_URL "$PACKAGE_URL"
2585_ACEOF
2586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587
2588# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002589# Prefer an explicitly selected file to automatically selected ones.
2590ac_site_file1=NONE
2591ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002593 # We do not want a PATH search for config.site.
2594 case $CONFIG_SITE in #((
2595 -*) ac_site_file1=./$CONFIG_SITE;;
2596 */*) ac_site_file1=$CONFIG_SITE;;
2597 *) ac_site_file1=./$CONFIG_SITE;;
2598 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 ac_site_file1=$prefix/share/config.site
2601 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602else
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 ac_site_file1=$ac_default_prefix/share/config.site
2604 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002606for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607do
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 test "x$ac_site_file" = xNONE && continue
2609 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2611$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002613 . "$ac_site_file" \
2614 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2616as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002617See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618 fi
2619done
2620
2621if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 # Some versions of bash will fail to source /dev/null (special files
2623 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2624 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2626$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2629 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 esac
2631 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632else
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2634$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 >$cache_file
2636fi
2637
2638# Check that the precious variables saved in the cache have kept the same
2639# value.
2640ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2643 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2645 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 case $ac_old_set,$ac_new_set in
2647 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2649$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 +00002650 ac_cache_corrupted=: ;;
2651 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2653$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 ac_cache_corrupted=: ;;
2655 ,);;
2656 *)
2657 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 # differences in whitespace do not lead to failure.
2659 ac_old_val_w=`echo x $ac_old_val`
2660 ac_new_val_w=`echo x $ac_new_val`
2661 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2663$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2664 ac_cache_corrupted=:
2665 else
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2667$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2668 eval $ac_var=\$ac_old_val
2669 fi
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2671$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2673$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 fi;;
2675 esac
2676 # Pass precious variables to config.status.
2677 if test "$ac_new_set" = set; then
2678 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 *) ac_arg=$ac_var=$ac_new_val ;;
2681 esac
2682 case " $ac_configure_args " in
2683 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 esac
2686 fi
2687done
2688if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2692$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002693 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002695## -------------------- ##
2696## Main body of script. ##
2697## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698
Guido van Rossum7f43da71994-08-01 12:15:30 +00002699ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002701ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2702ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2703ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002704
Guido van Rossum627b2d71993-12-24 10:39:16 +00002705
Michael W. Hudson54241132001-12-07 15:38:26 +00002706
Trent Nelson4d4ec652012-10-16 08:51:24 -04002707
Christian Heimesff5be6e2018-01-20 13:19:21 +01002708
2709
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002710if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002711 # If we're building out-of-tree, we need to make sure the following
2712 # resources get picked up before their $srcdir counterparts.
2713 # Objects/ -> typeslots.inc
2714 # Include/ -> Python-ast.h, graminit.h
2715 # Python/ -> importlib.h
2716 # (A side effect of this is that these resources will automatically be
2717 # regenerated when building out-of-tree, regardless of whether or not
2718 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2719 # off.)
2720 BASECPPFLAGS="-IObjects -IInclude -IPython"
2721else
2722 BASECPPFLAGS=""
2723fi
2724
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725
2726
2727
2728
Victor Stinner9ed34a82017-05-02 22:35:58 +02002729if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731# Extract the first word of "git", so it can be a program name with args.
2732set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2734$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002735if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002736 $as_echo_n "(cached) " >&6
2737else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002738 if test -n "$HAS_GIT"; then
2739 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002740else
2741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2742for as_dir in $PATH
2743do
2744 IFS=$as_save_IFS
2745 test -z "$as_dir" && as_dir=.
2746 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2750 break 2
2751 fi
2752done
2753 done
2754IFS=$as_save_IFS
2755
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757fi
2758fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759HAS_GIT=$ac_cv_prog_HAS_GIT
2760if test -n "$HAS_GIT"; then
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2762$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763else
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2765$as_echo "no" >&6; }
2766fi
2767
2768
2769else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002772if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773then
Xiang Zhang4c855572018-08-20 22:36:19 +08002774 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2775 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2776 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002778 GITVERSION=""
2779 GITTAG=""
2780 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002781fi
2782
2783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002784ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002785
2786
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002787ac_aux_dir=
2788for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2789 if test -f "$ac_dir/install-sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install-sh -c"
2792 break
2793 elif test -f "$ac_dir/install.sh"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/install.sh -c"
2796 break
2797 elif test -f "$ac_dir/shtool"; then
2798 ac_aux_dir=$ac_dir
2799 ac_install_sh="$ac_aux_dir/shtool install -c"
2800 break
2801 fi
2802done
2803if test -z "$ac_aux_dir"; then
2804 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2805fi
2806
2807# These three variables are undocumented and unsupported,
2808# and are intended to be withdrawn in a future Autoconf release.
2809# They can cause serious problems if a builder's source tree is in a directory
2810# whose full name contains unusual characters.
2811ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2812ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2813ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2814
2815
2816# Make sure we can run config.sub.
2817$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2818 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2819
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2821$as_echo_n "checking build system type... " >&6; }
2822if ${ac_cv_build+:} false; then :
2823 $as_echo_n "(cached) " >&6
2824else
2825 ac_build_alias=$build_alias
2826test "x$ac_build_alias" = x &&
2827 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2828test "x$ac_build_alias" = x &&
2829 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2830ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2831 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2832
2833fi
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2835$as_echo "$ac_cv_build" >&6; }
2836case $ac_cv_build in
2837*-*-*) ;;
2838*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2839esac
2840build=$ac_cv_build
2841ac_save_IFS=$IFS; IFS='-'
2842set x $ac_cv_build
2843shift
2844build_cpu=$1
2845build_vendor=$2
2846shift; shift
2847# Remember, the first character of IFS is used to create $*,
2848# except with old shells:
2849build_os=$*
2850IFS=$ac_save_IFS
2851case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2852
2853
2854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2855$as_echo_n "checking host system type... " >&6; }
2856if ${ac_cv_host+:} false; then :
2857 $as_echo_n "(cached) " >&6
2858else
2859 if test "x$host_alias" = x; then
2860 ac_cv_host=$ac_cv_build
2861else
2862 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2863 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2864fi
2865
2866fi
2867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2868$as_echo "$ac_cv_host" >&6; }
2869case $ac_cv_host in
2870*-*-*) ;;
2871*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2872esac
2873host=$ac_cv_host
2874ac_save_IFS=$IFS; IFS='-'
2875set x $ac_cv_host
2876shift
2877host_cpu=$1
2878host_vendor=$2
2879shift; shift
2880# Remember, the first character of IFS is used to create $*,
2881# except with old shells:
2882host_os=$*
2883IFS=$ac_save_IFS
2884case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2885
2886
2887
doko@python.orga10e4a92013-01-25 18:45:12 +01002888
2889
Ned Deilyfcbc2462014-08-22 13:32:49 -07002890# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2891rm -f pybuilddir.txt
2892
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893for ac_prog in python$PACKAGE_VERSION python3 python
2894do
2895 # Extract the first word of "$ac_prog", so it can be a program name with args.
2896set dummy $ac_prog; ac_word=$2
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2898$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002899if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002900 $as_echo_n "(cached) " >&6
2901else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902 if test -n "$PYTHON_FOR_REGEN"; then
2903 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002904else
2905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2906for as_dir in $PATH
2907do
2908 IFS=$as_save_IFS
2909 test -z "$as_dir" && as_dir=.
2910 for ac_exec_ext in '' $ac_executable_extensions; do
2911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2914 break 2
2915 fi
2916done
2917 done
2918IFS=$as_save_IFS
2919
2920fi
2921fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002922PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2923if test -n "$PYTHON_FOR_REGEN"; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2925$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926else
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2928$as_echo "no" >&6; }
2929fi
2930
2931
Victor Stinnera5c62a82017-05-03 18:21:48 +02002932 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002933done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002934test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002935
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002936
2937
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938if test "$cross_compiling" = yes; then
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2940$as_echo_n "checking for python interpreter for cross build... " >&6; }
2941 if test -z "$PYTHON_FOR_BUILD"; then
2942 for interp in python$PACKAGE_VERSION python3 python; do
2943 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002944 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 +02002945 break
2946 fi
2947 interp=
2948 done
2949 if test x$interp = x; then
2950 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2951 fi
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2953$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002954 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 +02002955 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002956elif test "$cross_compiling" = maybe; then
2957 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002958else
2959 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2960fi
2961
2962
Martin v. Löwis11437992002-04-12 09:54:03 +00002963
Benjamin Petersond23f8222009-04-05 19:13:16 +00002964if test "$prefix" != "/"; then
2965 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2966fi
2967
2968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969
2970
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002971# We don't use PACKAGE_ variables, and they cause conflicts
2972# with other autoconf-based packages that include Python.h
2973grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2974rm confdefs.h
2975mv confdefs.h.new confdefs.h
2976
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002977
Ned Deily5489bda2018-01-31 17:44:09 -05002978VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002979
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002980# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002981
2982SOVERSION=1.0
2983
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002984# The later defininition of _XOPEN_SOURCE disables certain features
2985# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002988
2989
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002995
2996
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2999# them.
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003002
3003
Martin v. Löwisd6320502004-08-12 13:45:08 +00003004# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3006# them.
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003009
3010
3011
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003012define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003013
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003014# Arguments passed to configure.
3015
3016CONFIG_ARGS="$ac_configure_args"
3017
Matthias Kloseb9621712010-04-24 17:59:49 +00003018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3019$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003021if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023 case $enableval in
3024 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003025 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 # information
3027 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003028 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003030 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3031 if test ! -d "${enableval}"
3032 then
3033 enableval=/
3034 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036 ;;
3037 esac
3038 case $enableval in
3039 no)
3040 UNIVERSALSDK=
3041 enable_universalsdk=
3042 ;;
3043 *)
3044 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045 if test ! -d "${UNIVERSALSDK}"
3046 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003047 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049 ;;
3050 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003051
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053else
3054
3055 UNIVERSALSDK=
3056 enable_universalsdk=
3057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003059
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060if test -n "${UNIVERSALSDK}"
3061then
Matthias Kloseb9621712010-04-24 17:59:49 +00003062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3063$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064else
Matthias Kloseb9621712010-04-24 17:59:49 +00003065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3066$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003067fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003069
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003070
Ned Deily87adb6e2013-10-18 21:09:56 -07003071ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003072
Ned Deilycbfb9a52012-06-23 16:02:19 -07003073# For backward compatibility reasons we prefer to select '32-bit' if available,
3074# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003076if test "`uname -s`" = "Darwin"
3077then
3078 if test -n "${UNIVERSALSDK}"
3079 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003080 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003081 then
3082 UNIVERSAL_ARCHS="intel"
3083 fi
3084 fi
3085fi
3086
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3089$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090
3091# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094 UNIVERSAL_ARCHS="$withval"
3095
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096fi
3097
Ned Deily87adb6e2013-10-18 21:09:56 -07003098if test -n "${UNIVERSALSDK}"
3099then
3100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3101$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3102else
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3104$as_echo "no" >&6; }
3105fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003106
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003107
3108# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003109if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003110 withval=$with_framework_name;
3111 PYTHONFRAMEWORK=${withval}
3112 PYTHONFRAMEWORKDIR=${withval}.framework
3113 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3114
3115else
3116
3117 PYTHONFRAMEWORK=Python
3118 PYTHONFRAMEWORKDIR=Python.framework
3119 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3120
3121fi
3122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003124if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003126 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003127 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003128 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003129 esac
3130 case $enableval in
3131 no)
3132 PYTHONFRAMEWORK=
3133 PYTHONFRAMEWORKDIR=no-framework
3134 PYTHONFRAMEWORKPREFIX=
3135 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136 FRAMEWORKINSTALLFIRST=
3137 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003138 FRAMEWORKALTINSTALLFIRST=
3139 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003140 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 if test "x${prefix}" = "xNONE"; then
3142 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3143 else
3144 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3145 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003147 ;;
3148 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003150 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003151 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003152 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003153 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3154 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003155 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003157
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003158 if test "x${prefix}" = "xNONE" ; then
3159 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003161 else
3162 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3163 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003164
3165 case "${enableval}" in
3166 /System*)
3167 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3168 if test "${prefix}" = "NONE" ; then
3169 # See below
3170 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3171 fi
3172 ;;
3173
3174 /Library*)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177
3178 */Library/Frameworks)
3179 MDIR="`dirname "${enableval}"`"
3180 MDIR="`dirname "${MDIR}"`"
3181 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3182
3183 if test "${prefix}" = "NONE"; then
3184 # User hasn't specified the
3185 # --prefix option, but wants to install
3186 # the framework in a non-default location,
3187 # ensure that the compatibility links get
3188 # installed relative to that prefix as well
3189 # instead of in /usr/local.
3190 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3191 fi
3192 ;;
3193
3194 *)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 ;;
3197 esac
3198
Jack Jansen127e56e2001-09-11 14:41:54 +00003199 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003201 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003207 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3208
3209 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3210
Jack Jansene578a632001-08-15 01:27:14 +00003211 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Guido van Rossum563e7081996-09-10 18:20:48 +00003213else
Martin v. Löwis11437992002-04-12 09:54:03 +00003214
Jack Jansene578a632001-08-15 01:27:14 +00003215 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003216 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003217 PYTHONFRAMEWORKPREFIX=
3218 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219 FRAMEWORKINSTALLFIRST=
3220 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221 FRAMEWORKALTINSTALLFIRST=
3222 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003223 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003224 if test "x${prefix}" = "xNONE" ; then
3225 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3226 else
3227 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3228 fi
Jack Jansene578a632001-08-15 01:27:14 +00003229 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232fi
3233
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
3235
Michael W. Hudson54241132001-12-07 15:38:26 +00003236
3237
3238
3239
Jack Jansene578a632001-08-15 01:27:14 +00003240
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003241
3242
3243
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003244
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003245
Ned Deilyb8f944f2013-11-21 22:42:25 -08003246
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003247
3248cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003249#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003250_ACEOF
3251
3252
Jack Jansene578a632001-08-15 01:27:14 +00003253##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003254## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003255## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003256##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257# Set name for machine-dependent library files
3258
Matthias Kloseb9621712010-04-24 17:59:49 +00003259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3260$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261if test -z "$MACHDEP"
3262then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003263 # avoid using uname for cross builds
3264 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003265 # ac_sys_system and ac_sys_release are used for setting
3266 # a lot of different things including 'define_xopen_source'
3267 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003268 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003269 *-*-linux-android*)
3270 ac_sys_system=Linux-android
3271 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 *-*-linux*)
3273 ac_sys_system=Linux
3274 ;;
3275 *-*-cygwin*)
3276 ac_sys_system=Cygwin
3277 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003278 *-*-vxworks*)
3279 ac_sys_system=VxWorks
3280 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 *)
3282 # for now, limit cross builds to known configurations
3283 MACHDEP="unknown"
3284 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3285 esac
3286 ac_sys_release=
3287 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003288 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003289 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003290 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003291 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003292 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003293 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 fi
3296 ac_md_system=`echo $ac_sys_system |
3297 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3298 ac_md_release=`echo $ac_sys_release |
3299 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3300 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003301
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003303 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003304 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003305 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003306 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003307 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003308 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003309fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3311$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003312
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003313
3314if test "$cross_compiling" = yes; then
3315 case "$host" in
3316 *-*-linux*)
3317 case "$host_cpu" in
3318 arm*)
3319 _host_cpu=arm
3320 ;;
3321 *)
3322 _host_cpu=$host_cpu
3323 esac
3324 ;;
3325 *-*-cygwin*)
3326 _host_cpu=
3327 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003328 *-*-vxworks*)
3329 _host_cpu=$host_cpu
3330 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003331 *)
3332 # for now, limit cross builds to known configurations
3333 MACHDEP="unknown"
3334 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3335 esac
3336 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3337fi
3338
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003339# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3340# disable features if it is defined, without any means to access these
3341# features as extensions. For these systems, we skip the definition of
3342# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3343# some feature, make sure there is no alternative way to access this
3344# feature. Also, when using wildcards, make sure you have verified the
3345# need for not defining _XOPEN_SOURCE on all systems matching the
3346# wildcard, and that the wildcard does not include future systems
3347# (which may remove their limitations).
3348case $ac_sys_system/$ac_sys_release in
3349 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3350 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003351 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003352 # In addition, Stefan Krah confirms that issue #1244610 exists through
3353 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003354 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003355 define_xopen_source=no
3356 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3357 # also defined. This can be overridden by defining _BSD_SOURCE
3358 # As this has a different meaning on Linux, only define it on OpenBSD
3359
Matthias Kloseb9621712010-04-24 17:59:49 +00003360$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003361
3362 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003363 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003364 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3365 # also defined. This can be overridden by defining _BSD_SOURCE
3366 # As this has a different meaning on Linux, only define it on OpenBSD
3367
Matthias Kloseb9621712010-04-24 17:59:49 +00003368$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003369
3370 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003371 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3372 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3373 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003374 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 +00003375 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003376 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3377 # request to enable features supported by the standard as a request
3378 # to disable features not supported by the standard. The best way
3379 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3380 # entirely and define __EXTENSIONS__ instead.
3381 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003382 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003383 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3384 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003385 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003386 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003387 define_xopen_source=no;;
3388 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003389 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003390 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003391 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003392 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3393 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3394 # identifies itself as Darwin/7.*
3395 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3396 # disables platform specific features beyond repair.
3397 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3398 # has no effect, don't bother defining them
3399 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003400 define_xopen_source=no;;
Miss Islington (bot)c4a53e42020-06-25 08:15:06 -07003401 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003402 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003403 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3404 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3405 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003406 AIX/4)
3407 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003408 AIX/5)
3409 if test `uname -r` -eq 1; then
3410 define_xopen_source=no
3411 fi
3412 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003413 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3414 # defining NI_NUMERICHOST.
3415 QNX/6.3.2)
3416 define_xopen_source=no
3417 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003418 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3419 # in network headers still using system V types.
3420 VxWorks/*)
3421 define_xopen_source=no
3422 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003423
Miss Islington (bot)28fc1ba2020-02-13 19:27:28 -08003424 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3425 # chroot() and other functions
3426 hp*|HP*)
3427 define_xopen_source=no
3428 ;;
3429
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003430esac
3431
3432if test $define_xopen_source = yes
3433then
Victor Stinner14d098d2011-09-07 22:29:43 +02003434 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
Victor Stinner14d098d2011-09-07 22:29:43 +02003436$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003437
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003438
3439 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3440 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3441 # several APIs are not declared. Since this is also needed in some
3442 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003443
Matthias Kloseb9621712010-04-24 17:59:49 +00003444$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
3446
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003447
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003448$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450fi
3451
Christian Heimes647cd872013-12-07 23:39:33 +01003452# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3453case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003454 hp*|HP*)
3455 define_stdc_a1=yes;;
3456 *)
3457 define_stdc_a1=no;;
3458esac
3459
3460if test $define_stdc_a1 = yes
3461then
Christian Heimes647cd872013-12-07 23:39:33 +01003462
3463$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3464
Christian Heimesb02bcae2013-12-08 15:21:08 +01003465fi
Christian Heimes647cd872013-12-07 23:39:33 +01003466
Jack Jansen6b08a402004-06-03 12:41:45 +00003467# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3468# it may influence the way we can build extensions, so distutils
3469# needs to check it
3470
Thomas Wouters477c8d52006-05-27 19:21:47 +00003471
Jack Jansen6b08a402004-06-03 12:41:45 +00003472CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003473EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003474
Guido van Rossum627b2d71993-12-24 10:39:16 +00003475# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003476
3477# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3478# for debug/optimization stuff. BASECFLAGS is for flags that are required
3479# just to get things to compile and link. Users are free to override OPT
3480# when running configure or make. The build should not break if they do.
3481# BASECFLAGS should generally not be messed with, however.
3482
Guido van Rossum8b131c51995-03-09 14:10:13 +00003483# If the user switches compilers, we can't believe the cache
3484if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3485then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003486 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003487(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003488fi
3489
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003490# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3491# when the compiler supports them, but we don't always want -O2, and
3492# we set -g later.
3493if test -z "$CFLAGS"; then
3494 CFLAGS=
3495fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496
3497if test "$ac_sys_system" = "Darwin"
3498then
3499 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003500 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501 # information
3502 if test -z "${CC}"
3503 then
3504 found_gcc=
3505 found_clang=
3506 as_save_IFS=$IFS; IFS=:
3507 for as_dir in $PATH
3508 do
3509 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003510 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003511 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003512 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003513 fi
3514 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003515 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003516 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003517 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003518 fi
3519 fi
3520 done
3521 IFS=$as_save_IFS
3522
3523 if test -n "$found_gcc" -a -n "$found_clang"
3524 then
3525 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3526 then
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3528$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3529 CC="$found_clang"
3530 CXX="$found_clang++"
3531 fi
3532
3533
3534 elif test -z "$found_gcc" -a -n "$found_clang"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3537$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3538 CC="$found_clang"
3539 CXX="$found_clang++"
3540
3541 elif test -z "$found_gcc" -a -z "$found_clang"
3542 then
3543 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3544 if test -n "${found_clang}"
3545 then
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3547$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3548 CC="${found_clang}"
3549 CXX="`/usr/bin/xcrun -find clang++`"
3550
3551 # else: use default behaviour
3552 fi
3553 fi
3554 fi
3555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003556ac_ext=c
3557ac_cpp='$CPP $CPPFLAGS'
3558ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3559ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3560ac_compiler_gnu=$ac_cv_c_compiler_gnu
3561if test -n "$ac_tool_prefix"; then
3562 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3563set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003566if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003568else
3569 if test -n "$CC"; then
3570 ac_cv_prog_CC="$CC" # Let the user override the test.
3571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573for as_dir in $PATH
3574do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $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 +00003581 break 2
3582 fi
3583done
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003586
Jack Jansendd19cf82001-12-06 22:36:17 +00003587fi
3588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003589CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003590if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3592$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003593else
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599fi
3600if test -z "$ac_cv_prog_CC"; then
3601 ac_ct_CC=$CC
3602 # Extract the first word of "gcc", so it can be a program name with args.
3603set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003606if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003608else
3609 if test -n "$ac_ct_CC"; then
3610 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3611else
3612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613for as_dir in $PATH
3614do
3615 IFS=$as_save_IFS
3616 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003618 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $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 +00003621 break 2
3622 fi
3623done
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003626
3627fi
3628fi
3629ac_ct_CC=$ac_cv_prog_ac_ct_CC
3630if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3632$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003633else
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003636fi
3637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 if test "x$ac_ct_CC" = x; then
3639 CC=""
3640 else
3641 case $cross_compiling:$ac_tool_warned in
3642yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645ac_tool_warned=yes ;;
3646esac
3647 CC=$ac_ct_CC
3648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
3650 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003651fi
3652
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 if test -n "$ac_tool_prefix"; then
3655 # 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 +00003656set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3658$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003659if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003661else
3662 if test -n "$CC"; then
3663 ac_cv_prog_CC="$CC" # Let the user override the test.
3664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $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 +00003674 break 2
3675 fi
3676done
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003679
3680fi
3681fi
3682CC=$ac_cv_prog_CC
3683if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3685$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003686else
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3688$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003689fi
3690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693fi
3694if test -z "$CC"; then
3695 # Extract the first word of "cc", so it can be a program name with args.
3696set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003699if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
3702 if test -n "$CC"; then
3703 ac_cv_prog_CC="$CC" # Let the user override the test.
3704else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3714 ac_prog_rejected=yes
3715 continue
3716 fi
3717 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $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 +00003719 break 2
3720 fi
3721done
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725if test $ac_prog_rejected = yes; then
3726 # We found a bogon in the path, so make sure we never use it.
3727 set dummy $ac_cv_prog_CC
3728 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730 # We chose a different compiler from the bogus one.
3731 # However, it has the same basename, so the bogon will be chosen
3732 # first if we set CC to just the basename; use the full file name.
3733 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003734 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 fi
3736fi
3737fi
3738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003739CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746fi
3747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750if test -z "$CC"; then
3751 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 do
3754 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3755set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003758if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003760else
3761 if test -n "$CC"; then
3762 ac_cv_prog_CC="$CC" # Let the user override the test.
3763else
Martin v. Löwis11437992002-04-12 09:54:03 +00003764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $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 +00003773 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
3779fi
3780fi
3781CC=$ac_cv_prog_CC
3782if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3784$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003788fi
3789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 test -n "$CC" && break
3792 done
3793fi
3794if test -z "$CC"; then
3795 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797do
3798 # Extract the first word of "$ac_prog", so it can be a program name with args.
3799set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003802if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003804else
3805 if test -n "$ac_ct_CC"; then
3806 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3807else
3808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $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 +00003817 break 2
3818 fi
3819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
3824fi
3825ac_ct_CC=$ac_cv_prog_ac_ct_CC
3826if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3828$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$ac_ct_CC" && break
3836done
Michael W. Hudson54241132001-12-07 15:38:26 +00003837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838 if test "x$ac_ct_CC" = x; then
3839 CC=""
3840 else
3841 case $cross_compiling:$ac_tool_warned in
3842yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003843{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3844$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845ac_tool_warned=yes ;;
3846esac
3847 CC=$ac_ct_CC
3848 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850
3851fi
3852
3853
Matthias Kloseb9621712010-04-24 17:59:49 +00003854test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003856as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003857See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858
3859# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3861set X $ac_compile
3862ac_compiler=$2
3863for ac_option in --version -v -V -qversion; do
3864 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865case "(($ac_try" in
3866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3867 *) ac_try_echo=$ac_try;;
3868esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3870$as_echo "$ac_try_echo"; } >&5
3871 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 if test -s conftest.err; then
3874 sed '10a\
3875... rest of stderr output deleted ...
3876 10q' conftest.err >conftest.er1
3877 cat conftest.er1 >&5
3878 fi
3879 rm -f conftest.er1 conftest.err
3880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3881 test $ac_status = 0; }
3882done
Martin v. Löwis11437992002-04-12 09:54:03 +00003883
Matthias Kloseb9621712010-04-24 17:59:49 +00003884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003885/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003886
Martin v. Löwis11437992002-04-12 09:54:03 +00003887int
3888main ()
3889{
3890
3891 ;
3892 return 0;
3893}
3894_ACEOF
3895ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003896ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003897# Try to create an executable without -o first, disregard a.out.
3898# It will help us diagnose broken compilers, and finding out an intuition
3899# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3901$as_echo_n "checking whether the C compiler works... " >&6; }
3902ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3903
3904# The possible output files:
3905ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907ac_rmfiles=
3908for ac_file in $ac_files
3909do
3910 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3913 esac
3914done
3915rm -f $ac_rmfiles
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918case "(($ac_try" in
3919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3920 *) ac_try_echo=$ac_try;;
3921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3923$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003925 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3927 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3929# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3930# in a Makefile. We should not override ac_cv_exeext if it was cached,
3931# so that the user can short-circuit this test for compilers unknown to
3932# Autoconf.
3933for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003934do
3935 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003938 ;;
3939 [ab].out )
3940 # We found the default executable, but exeext='' is most
3941 # certainly right.
3942 break;;
3943 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 then :; else
3946 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3947 fi
3948 # We set ac_cv_exeext here because the later test for it is not
3949 # safe: cross compilers may not add the suffix if given an `-o'
3950 # argument, so we may need to know it at that point already.
3951 # Even if this section looks crufty: it has the advantage of
3952 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 break;;
3954 * )
3955 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003956 esac
3957done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958test "$ac_cv_exeext" = no && ac_cv_exeext=
3959
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003960else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 ac_file=''
3962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003963if test -z "$ac_file"; then :
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3965$as_echo "no" >&6; }
3966$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003967sed 's/^/| /' conftest.$ac_ext >&5
3968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003971as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003972See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003973else
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3975$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3978$as_echo_n "checking for C compiler default output file name... " >&6; }
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3980$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3986$as_echo_n "checking for suffix of executables... " >&6; }
3987if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988case "(($ac_try" in
3989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3990 *) ac_try_echo=$ac_try;;
3991esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3993$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3997 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3999# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4000# work properly (i.e., refer to `conftest.exe'), while it won't with
4001# `rm'.
4002for ac_file in conftest.exe conftest conftest.*; do
4003 test -f "$ac_file" || continue
4004 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4007 break;;
4008 * ) break;;
4009 esac
4010done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004011else
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004014as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004015See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f conftest conftest$ac_cv_exeext
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4019$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020
4021rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004022EXEEXT=$ac_cv_exeext
4023ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4025/* end confdefs.h. */
4026#include <stdio.h>
4027int
4028main ()
4029{
4030FILE *f = fopen ("conftest.out", "w");
4031 return ferror (f) || fclose (f) != 0;
4032
4033 ;
4034 return 0;
4035}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004037ac_clean_files="$ac_clean_files conftest.out"
4038# Check that the compiler produces executables we can run. If not, either
4039# the compiler is broken, or we cross compile.
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4041$as_echo_n "checking whether we are cross compiling... " >&6; }
4042if test "$cross_compiling" != yes; then
4043 { { ac_try="$ac_link"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
4048eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4049$as_echo "$ac_try_echo"; } >&5
4050 (eval "$ac_link") 2>&5
4051 ac_status=$?
4052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4053 test $ac_status = 0; }
4054 if { ac_try='./conftest$ac_cv_exeext'
4055 { { case "(($ac_try" in
4056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4057 *) ac_try_echo=$ac_try;;
4058esac
4059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4060$as_echo "$ac_try_echo"; } >&5
4061 (eval "$ac_try") 2>&5
4062 ac_status=$?
4063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4064 test $ac_status = 0; }; }; then
4065 cross_compiling=no
4066 else
4067 if test "$cross_compiling" = maybe; then
4068 cross_compiling=yes
4069 else
4070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004072as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004073If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004074See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 fi
4076 fi
4077fi
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4079$as_echo "$cross_compiling" >&6; }
4080
4081rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4082ac_clean_files=$ac_clean_files_save
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4084$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004085if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo_n "(cached) " >&6
4087else
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004089/* end confdefs.h. */
4090
4091int
4092main ()
4093{
4094
4095 ;
4096 return 0;
4097}
4098_ACEOF
4099rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004100if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111 for ac_file in conftest.o conftest.obj conftest.*; do
4112 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4116 break;;
4117 esac
4118done
4119else
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004121sed 's/^/| /' conftest.$ac_ext >&5
4122
Matthias Kloseb9621712010-04-24 17:59:49 +00004123{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004125as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004126See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004127fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004128rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4131$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132OBJEXT=$ac_cv_objext
4133ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4135$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004136if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004138else
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004141
Martin v. Löwis11437992002-04-12 09:54:03 +00004142int
4143main ()
4144{
4145#ifndef __GNUC__
4146 choke me
4147#endif
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 ac_compiler_gnu=yes
4155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_cv_c_compiler_gnu=$ac_compiler_gnu
4160
4161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4163$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4164if test $ac_compiler_gnu = yes; then
4165 GCC=yes
4166else
4167 GCC=
4168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004169ac_test_CFLAGS=${CFLAGS+set}
4170ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4172$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004173if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004175else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 ac_save_c_werror_flag=$ac_c_werror_flag
4177 ac_c_werror_flag=yes
4178 ac_cv_prog_cc_g=no
4179 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004182
Martin v. Löwis11437992002-04-12 09:54:03 +00004183int
4184main ()
4185{
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004191if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004192 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193else
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 CFLAGS=""
4195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196/* end confdefs.h. */
4197
4198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207
Matthias Kloseb9621712010-04-24 17:59:49 +00004208else
4209 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230 ac_c_werror_flag=$ac_save_c_werror_flag
4231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4233$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004234if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004236elif test $ac_cv_prog_cc_g = yes; then
4237 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004238 CFLAGS="-g -O2"
4239 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004240 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241 fi
4242else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243 if test "$GCC" = yes; then
4244 CFLAGS="-O2"
4245 else
4246 CFLAGS=
4247 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4250$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004251if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004253else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004255ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
4258#include <stdarg.h>
4259#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004260struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004261/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4262struct buf { int x; };
4263FILE * (*rcsopen) (struct buf *, struct stat *, int);
4264static char *e (p, i)
4265 char **p;
4266 int i;
4267{
4268 return p[i];
4269}
4270static char *f (char * (*g) (char **, int), char **p, ...)
4271{
4272 char *s;
4273 va_list v;
4274 va_start (v,p);
4275 s = g (p, va_arg (v,int));
4276 va_end (v);
4277 return s;
4278}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004279
4280/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4281 function prototypes and stuff, but not '\xHH' hex character constants.
4282 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4285 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4290 inside strings and character constants. */
4291#define FOO(x) 'x'
4292int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4293
Skip Montanaro6dead952003-09-25 14:50:04 +00004294int test (int i, double x);
4295struct s1 {int (*f) (int a);};
4296struct s2 {int (*f) (double a);};
4297int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4298int argc;
4299char **argv;
4300int
4301main ()
4302{
4303return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4304 ;
4305 return 0;
4306}
4307_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4309 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004310do
4311 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315rm -f core conftest.err conftest.$ac_objext
4316 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004317done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004319CC=$ac_save_CC
4320
4321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322# AC_CACHE_VAL
4323case "x$ac_cv_prog_cc_c89" in
4324 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4326$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4329$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004330 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4333$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004334esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004335if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004336
Matthias Kloseb9621712010-04-24 17:59:49 +00004337fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004338
Martin v. Löwis11437992002-04-12 09:54:03 +00004339ac_ext=c
4340ac_cpp='$CPP $CPPFLAGS'
4341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4343ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004345ac_ext=c
4346ac_cpp='$CPP $CPPFLAGS'
4347ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4348ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4349ac_compiler_gnu=$ac_cv_c_compiler_gnu
4350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4351$as_echo_n "checking how to run the C preprocessor... " >&6; }
4352# On Suns, sometimes $CPP names a directory.
4353if test -n "$CPP" && test -d "$CPP"; then
4354 CPP=
4355fi
4356if test -z "$CPP"; then
4357 if ${ac_cv_prog_CPP+:} false; then :
4358 $as_echo_n "(cached) " >&6
4359else
4360 # Double quotes because CPP needs to be expanded
4361 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4362 do
4363 ac_preproc_ok=false
4364for ac_c_preproc_warn_flag in '' yes
4365do
4366 # Use a header file that comes with gcc, so configuring glibc
4367 # with a fresh cross-compiler works.
4368 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4369 # <limits.h> exists even on freestanding compilers.
4370 # On the NeXT, cc -E runs the code through the compiler's parser,
4371 # not just through cpp. "Syntax error" is here to catch this case.
4372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4373/* end confdefs.h. */
4374#ifdef __STDC__
4375# include <limits.h>
4376#else
4377# include <assert.h>
4378#endif
4379 Syntax error
4380_ACEOF
4381if ac_fn_c_try_cpp "$LINENO"; then :
4382
4383else
4384 # Broken: fails on valid input.
4385continue
4386fi
4387rm -f conftest.err conftest.i conftest.$ac_ext
4388
4389 # OK, works on sane cases. Now check whether nonexistent headers
4390 # can be detected and how.
4391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4392/* end confdefs.h. */
4393#include <ac_nonexistent.h>
4394_ACEOF
4395if ac_fn_c_try_cpp "$LINENO"; then :
4396 # Broken: success on invalid input.
4397continue
4398else
4399 # Passes both tests.
4400ac_preproc_ok=:
4401break
4402fi
4403rm -f conftest.err conftest.i conftest.$ac_ext
4404
4405done
4406# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4407rm -f conftest.i conftest.err conftest.$ac_ext
4408if $ac_preproc_ok; then :
4409 break
4410fi
4411
4412 done
4413 ac_cv_prog_CPP=$CPP
4414
4415fi
4416 CPP=$ac_cv_prog_CPP
4417else
4418 ac_cv_prog_CPP=$CPP
4419fi
4420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4421$as_echo "$CPP" >&6; }
4422ac_preproc_ok=false
4423for ac_c_preproc_warn_flag in '' yes
4424do
4425 # Use a header file that comes with gcc, so configuring glibc
4426 # with a fresh cross-compiler works.
4427 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4428 # <limits.h> exists even on freestanding compilers.
4429 # On the NeXT, cc -E runs the code through the compiler's parser,
4430 # not just through cpp. "Syntax error" is here to catch this case.
4431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4432/* end confdefs.h. */
4433#ifdef __STDC__
4434# include <limits.h>
4435#else
4436# include <assert.h>
4437#endif
4438 Syntax error
4439_ACEOF
4440if ac_fn_c_try_cpp "$LINENO"; then :
4441
4442else
4443 # Broken: fails on valid input.
4444continue
4445fi
4446rm -f conftest.err conftest.i conftest.$ac_ext
4447
4448 # OK, works on sane cases. Now check whether nonexistent headers
4449 # can be detected and how.
4450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451/* end confdefs.h. */
4452#include <ac_nonexistent.h>
4453_ACEOF
4454if ac_fn_c_try_cpp "$LINENO"; then :
4455 # Broken: success on invalid input.
4456continue
4457else
4458 # Passes both tests.
4459ac_preproc_ok=:
4460break
4461fi
4462rm -f conftest.err conftest.i conftest.$ac_ext
4463
4464done
4465# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4466rm -f conftest.i conftest.err conftest.$ac_ext
4467if $ac_preproc_ok; then :
4468
4469else
4470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4472as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4473See \`config.log' for more details" "$LINENO" 5; }
4474fi
4475
4476ac_ext=c
4477ac_cpp='$CPP $CPPFLAGS'
4478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4480ac_compiler_gnu=$ac_cv_c_compiler_gnu
4481
4482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4483$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4484if ${ac_cv_path_GREP+:} false; then :
4485 $as_echo_n "(cached) " >&6
4486else
4487 if test -z "$GREP"; then
4488 ac_path_GREP_found=false
4489 # Loop through the user's path and test for each of PROGNAME-LIST
4490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4491for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4492do
4493 IFS=$as_save_IFS
4494 test -z "$as_dir" && as_dir=.
4495 for ac_prog in grep ggrep; do
4496 for ac_exec_ext in '' $ac_executable_extensions; do
4497 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4498 as_fn_executable_p "$ac_path_GREP" || continue
4499# Check for GNU ac_path_GREP and select it if it is found.
4500 # Check for GNU $ac_path_GREP
4501case `"$ac_path_GREP" --version 2>&1` in
4502*GNU*)
4503 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4504*)
4505 ac_count=0
4506 $as_echo_n 0123456789 >"conftest.in"
4507 while :
4508 do
4509 cat "conftest.in" "conftest.in" >"conftest.tmp"
4510 mv "conftest.tmp" "conftest.in"
4511 cp "conftest.in" "conftest.nl"
4512 $as_echo 'GREP' >> "conftest.nl"
4513 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4514 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4515 as_fn_arith $ac_count + 1 && ac_count=$as_val
4516 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4517 # Best one so far, save it but keep looking for a better one
4518 ac_cv_path_GREP="$ac_path_GREP"
4519 ac_path_GREP_max=$ac_count
4520 fi
4521 # 10*(2^10) chars as input seems more than enough
4522 test $ac_count -gt 10 && break
4523 done
4524 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4525esac
4526
4527 $ac_path_GREP_found && break 3
4528 done
4529 done
4530 done
4531IFS=$as_save_IFS
4532 if test -z "$ac_cv_path_GREP"; then
4533 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4534 fi
4535else
4536 ac_cv_path_GREP=$GREP
4537fi
4538
4539fi
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4541$as_echo "$ac_cv_path_GREP" >&6; }
4542 GREP="$ac_cv_path_GREP"
4543
4544
Łukasz Langaa785c872016-09-09 17:37:37 -07004545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4546$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4547if ${ac_cv_path_SED+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549else
4550 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4551 for ac_i in 1 2 3 4 5 6 7; do
4552 ac_script="$ac_script$as_nl$ac_script"
4553 done
4554 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4555 { ac_script=; unset ac_script;}
4556 if test -z "$SED"; then
4557 ac_path_SED_found=false
4558 # Loop through the user's path and test for each of PROGNAME-LIST
4559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4560for as_dir in $PATH
4561do
4562 IFS=$as_save_IFS
4563 test -z "$as_dir" && as_dir=.
4564 for ac_prog in sed gsed; do
4565 for ac_exec_ext in '' $ac_executable_extensions; do
4566 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4567 as_fn_executable_p "$ac_path_SED" || continue
4568# Check for GNU ac_path_SED and select it if it is found.
4569 # Check for GNU $ac_path_SED
4570case `"$ac_path_SED" --version 2>&1` in
4571*GNU*)
4572 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4573*)
4574 ac_count=0
4575 $as_echo_n 0123456789 >"conftest.in"
4576 while :
4577 do
4578 cat "conftest.in" "conftest.in" >"conftest.tmp"
4579 mv "conftest.tmp" "conftest.in"
4580 cp "conftest.in" "conftest.nl"
4581 $as_echo '' >> "conftest.nl"
4582 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4583 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4584 as_fn_arith $ac_count + 1 && ac_count=$as_val
4585 if test $ac_count -gt ${ac_path_SED_max-0}; then
4586 # Best one so far, save it but keep looking for a better one
4587 ac_cv_path_SED="$ac_path_SED"
4588 ac_path_SED_max=$ac_count
4589 fi
4590 # 10*(2^10) chars as input seems more than enough
4591 test $ac_count -gt 10 && break
4592 done
4593 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4594esac
4595
4596 $ac_path_SED_found && break 3
4597 done
4598 done
4599 done
4600IFS=$as_save_IFS
4601 if test -z "$ac_cv_path_SED"; then
4602 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4603 fi
4604else
4605 ac_cv_path_SED=$SED
4606fi
4607
4608fi
4609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4610$as_echo "$ac_cv_path_SED" >&6; }
4611 SED="$ac_cv_path_SED"
4612 rm -f conftest.sed
4613
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004614
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615
4616
Matthias Kloseb9621712010-04-24 17:59:49 +00004617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4618$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004620# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004621if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004622 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623
4624 case $withval in
4625 no) with_cxx_main=no
4626 MAINCC='$(CC)';;
4627 yes) with_cxx_main=yes
4628 MAINCC='$(CXX)';;
4629 *) with_cxx_main=yes
4630 MAINCC=$withval
4631 if test -z "$CXX"
4632 then
4633 CXX=$withval
4634 fi;;
4635 esac
4636else
4637
4638 with_cxx_main=no
4639 MAINCC='$(CC)'
4640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004641fi
4642
Matthias Kloseb9621712010-04-24 17:59:49 +00004643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4644$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
4646preset_cxx="$CXX"
4647if test -z "$CXX"
4648then
4649 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004650 gcc) if test -n "$ac_tool_prefix"; then
4651 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4652set dummy ${ac_tool_prefix}g++; ac_word=$2
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654$as_echo_n "checking for $ac_word... " >&6; }
4655if ${ac_cv_path_CXX+:} false; then :
4656 $as_echo_n "(cached) " >&6
4657else
4658 case $CXX in
4659 [\\/]* | ?:[\\/]*)
4660 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4661 ;;
4662 *)
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in notfound
4665do
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004670 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672 break 2
4673 fi
4674done
4675 done
4676IFS=$as_save_IFS
4677
4678 ;;
4679esac
4680fi
4681CXX=$ac_cv_path_CXX
4682if test -n "$CXX"; then
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4684$as_echo "$CXX" >&6; }
4685else
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687$as_echo "no" >&6; }
4688fi
4689
4690
4691fi
4692if test -z "$ac_cv_path_CXX"; then
4693 ac_pt_CXX=$CXX
4694 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004695set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698if ${ac_cv_path_ac_pt_CXX+:} false; then :
4699 $as_echo_n "(cached) " >&6
4700else
4701 case $ac_pt_CXX in
4702 [\\/]* | ?:[\\/]*)
4703 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4704 ;;
4705 *)
4706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707for as_dir in notfound
4708do
4709 IFS=$as_save_IFS
4710 test -z "$as_dir" && as_dir=.
4711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004713 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4715 break 2
4716 fi
4717done
4718 done
4719IFS=$as_save_IFS
4720
4721 ;;
4722esac
4723fi
4724ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4725if test -n "$ac_pt_CXX"; then
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4727$as_echo "$ac_pt_CXX" >&6; }
4728else
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730$as_echo "no" >&6; }
4731fi
4732
4733 if test "x$ac_pt_CXX" = x; then
4734 CXX="g++"
4735 else
4736 case $cross_compiling:$ac_tool_warned in
4737yes:)
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4739$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4740ac_tool_warned=yes ;;
4741esac
4742 CXX=$ac_pt_CXX
4743 fi
4744else
4745 CXX="$ac_cv_path_CXX"
4746fi
4747 ;;
4748 cc) if test -n "$ac_tool_prefix"; then
4749 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4750set dummy ${ac_tool_prefix}c++; ac_word=$2
4751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004753if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004755else
4756 case $CXX in
4757 [\\/]* | ?:[\\/]*)
4758 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4759 ;;
4760 *)
4761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4762for as_dir in notfound
4763do
4764 IFS=$as_save_IFS
4765 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 break 2
4771 fi
4772done
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004774IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776 ;;
4777esac
4778fi
4779CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004780if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4782$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004783else
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4785$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788
4789fi
4790if test -z "$ac_cv_path_CXX"; then
4791 ac_pt_CXX=$CXX
4792 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 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 +00004802 ;;
4803 *)
4804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4805for as_dir in notfound
4806do
4807 IFS=$as_save_IFS
4808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 break 2
4814 fi
4815done
Matthias Kloseb9621712010-04-24 17:59:49 +00004816 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004817IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819 ;;
4820esac
4821fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4823if test -n "$ac_pt_CXX"; then
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4825$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004826else
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004830
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831 if test "x$ac_pt_CXX" = x; then
4832 CXX="c++"
4833 else
4834 case $cross_compiling:$ac_tool_warned in
4835yes:)
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4838ac_tool_warned=yes ;;
4839esac
4840 CXX=$ac_pt_CXX
4841 fi
4842else
4843 CXX="$ac_cv_path_CXX"
4844fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 clang|*/clang) if test -n "$ac_tool_prefix"; then
4847 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4848set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4850$as_echo_n "checking for $ac_word... " >&6; }
4851if ${ac_cv_path_CXX+:} false; then :
4852 $as_echo_n "(cached) " >&6
4853else
4854 case $CXX in
4855 [\\/]* | ?:[\\/]*)
4856 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4857 ;;
4858 *)
4859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4860for as_dir in notfound
4861do
4862 IFS=$as_save_IFS
4863 test -z "$as_dir" && as_dir=.
4864 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004866 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4868 break 2
4869 fi
4870done
4871 done
4872IFS=$as_save_IFS
4873
Ned Deilycbfb9a52012-06-23 16:02:19 -07004874 ;;
4875esac
4876fi
4877CXX=$ac_cv_path_CXX
4878if test -n "$CXX"; then
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4880$as_echo "$CXX" >&6; }
4881else
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4883$as_echo "no" >&6; }
4884fi
4885
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004886
4887fi
4888if test -z "$ac_cv_path_CXX"; then
4889 ac_pt_CXX=$CXX
4890 # Extract the first word of "clang++", so it can be a program name with args.
4891set dummy clang++; ac_word=$2
4892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4893$as_echo_n "checking for $ac_word... " >&6; }
4894if ${ac_cv_path_ac_pt_CXX+:} false; then :
4895 $as_echo_n "(cached) " >&6
4896else
4897 case $ac_pt_CXX in
4898 [\\/]* | ?:[\\/]*)
4899 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4900 ;;
4901 *)
4902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4903for as_dir in notfound
4904do
4905 IFS=$as_save_IFS
4906 test -z "$as_dir" && as_dir=.
4907 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004909 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4911 break 2
4912 fi
4913done
4914 done
4915IFS=$as_save_IFS
4916
4917 ;;
4918esac
4919fi
4920ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4921if test -n "$ac_pt_CXX"; then
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4923$as_echo "$ac_pt_CXX" >&6; }
4924else
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4926$as_echo "no" >&6; }
4927fi
4928
4929 if test "x$ac_pt_CXX" = x; then
4930 CXX="clang++"
4931 else
4932 case $cross_compiling:$ac_tool_warned in
4933yes:)
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4935$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4936ac_tool_warned=yes ;;
4937esac
4938 CXX=$ac_pt_CXX
4939 fi
4940else
4941 CXX="$ac_cv_path_CXX"
4942fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004943 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004944 icc|*/icc) if test -n "$ac_tool_prefix"; then
4945 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4946set dummy ${ac_tool_prefix}icpc; ac_word=$2
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4948$as_echo_n "checking for $ac_word... " >&6; }
4949if ${ac_cv_path_CXX+:} false; then :
4950 $as_echo_n "(cached) " >&6
4951else
4952 case $CXX in
4953 [\\/]* | ?:[\\/]*)
4954 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4955 ;;
4956 *)
4957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958for as_dir in notfound
4959do
4960 IFS=$as_save_IFS
4961 test -z "$as_dir" && as_dir=.
4962 for ac_exec_ext in '' $ac_executable_extensions; do
4963 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4964 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4965 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4966 break 2
4967 fi
4968done
4969 done
4970IFS=$as_save_IFS
4971
4972 ;;
4973esac
4974fi
4975CXX=$ac_cv_path_CXX
4976if test -n "$CXX"; then
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4978$as_echo "$CXX" >&6; }
4979else
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981$as_echo "no" >&6; }
4982fi
4983
4984
4985fi
4986if test -z "$ac_cv_path_CXX"; then
4987 ac_pt_CXX=$CXX
4988 # Extract the first word of "icpc", so it can be a program name with args.
4989set dummy icpc; ac_word=$2
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if ${ac_cv_path_ac_pt_CXX+:} false; then :
4993 $as_echo_n "(cached) " >&6
4994else
4995 case $ac_pt_CXX in
4996 [\\/]* | ?:[\\/]*)
4997 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4998 ;;
4999 *)
5000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in notfound
5002do
5003 IFS=$as_save_IFS
5004 test -z "$as_dir" && as_dir=.
5005 for ac_exec_ext in '' $ac_executable_extensions; do
5006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5007 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009 break 2
5010 fi
5011done
5012 done
5013IFS=$as_save_IFS
5014
5015 ;;
5016esac
5017fi
5018ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5019if test -n "$ac_pt_CXX"; then
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5021$as_echo "$ac_pt_CXX" >&6; }
5022else
5023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024$as_echo "no" >&6; }
5025fi
5026
5027 if test "x$ac_pt_CXX" = x; then
5028 CXX="icpc"
5029 else
5030 case $cross_compiling:$ac_tool_warned in
5031yes:)
5032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5034ac_tool_warned=yes ;;
5035esac
5036 CXX=$ac_pt_CXX
5037 fi
5038else
5039 CXX="$ac_cv_path_CXX"
5040fi
5041 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042 esac
5043 if test "$CXX" = "notfound"
5044 then
5045 CXX=""
5046 fi
5047fi
5048if test -z "$CXX"
5049then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005050 if test -n "$ac_tool_prefix"; then
5051 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5052 do
5053 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005057if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059else
5060 if test -n "$CXX"; then
5061 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5062else
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005070 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072 break 2
5073 fi
5074done
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077
5078fi
5079fi
5080CXX=$ac_cv_prog_CXX
5081if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5083$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084else
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087fi
5088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005090 test -n "$CXX" && break
5091 done
5092fi
5093if test -z "$CXX"; then
5094 ac_ct_CXX=$CXX
5095 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5096do
5097 # Extract the first word of "$ac_prog", so it can be a program name with args.
5098set dummy $ac_prog; ac_word=$2
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100$as_echo_n "checking for $ac_word... " >&6; }
5101if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5102 $as_echo_n "(cached) " >&6
5103else
5104 if test -n "$ac_ct_CXX"; then
5105 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5106else
5107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110 IFS=$as_save_IFS
5111 test -z "$as_dir" && as_dir=.
5112 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005114 ac_cv_prog_ac_ct_CXX="$ac_prog"
5115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5116 break 2
5117 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005118done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005119 done
5120IFS=$as_save_IFS
5121
5122fi
5123fi
5124ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5125if test -n "$ac_ct_CXX"; then
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5127$as_echo "$ac_ct_CXX" >&6; }
5128else
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131fi
5132
5133
5134 test -n "$ac_ct_CXX" && break
5135done
5136
5137 if test "x$ac_ct_CXX" = x; then
5138 CXX="notfound"
5139 else
5140 case $cross_compiling:$ac_tool_warned in
5141yes:)
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5144ac_tool_warned=yes ;;
5145esac
5146 CXX=$ac_ct_CXX
5147 fi
5148fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005149
5150 if test "$CXX" = "notfound"
5151 then
5152 CXX=""
5153 fi
5154fi
5155if test "$preset_cxx" != "$CXX"
5156then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005157 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005158
5159 By default, distutils will build C++ extension modules with \"$CXX\".
5160 If this is not intended, then set CXX on the configure command line.
5161 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005162$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005163
5164 By default, distutils will build C++ extension modules with \"$CXX\".
5165 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005166 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167fi
5168
5169
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005170MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5171
5172
5173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5174$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5175cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005176#undef bfin
5177#undef cris
5178#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005179#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005180#undef hppa
5181#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005182#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005183#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005184#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005185#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005186#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005187#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005188 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005189#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005190# if defined(__x86_64__) && defined(__LP64__)
5191 x86_64-linux-gnu
5192# elif defined(__x86_64__) && defined(__ILP32__)
5193 x86_64-linux-gnux32
5194# elif defined(__i386__)
5195 i386-linux-gnu
5196# elif defined(__aarch64__) && defined(__AARCH64EL__)
5197# if defined(__ILP32__)
5198 aarch64_ilp32-linux-gnu
5199# else
5200 aarch64-linux-gnu
5201# endif
5202# elif defined(__aarch64__) && defined(__AARCH64EB__)
5203# if defined(__ILP32__)
5204 aarch64_be_ilp32-linux-gnu
5205# else
5206 aarch64_be-linux-gnu
5207# endif
5208# elif defined(__alpha__)
5209 alpha-linux-gnu
5210# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5211# if defined(__ARMEL__)
5212 arm-linux-gnueabihf
5213# else
5214 armeb-linux-gnueabihf
5215# endif
5216# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5217# if defined(__ARMEL__)
5218 arm-linux-gnueabi
5219# else
5220 armeb-linux-gnueabi
5221# endif
5222# elif defined(__hppa__)
5223 hppa-linux-gnu
5224# elif defined(__ia64__)
5225 ia64-linux-gnu
5226# elif defined(__m68k__) && !defined(__mcoldfire__)
5227 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005228# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5229# if _MIPS_SIM == _ABIO32
5230 mipsisa32r6el-linux-gnu
5231# elif _MIPS_SIM == _ABIN32
5232 mipsisa64r6el-linux-gnuabin32
5233# elif _MIPS_SIM == _ABI64
5234 mipsisa64r6el-linux-gnuabi64
5235# else
5236# error unknown platform triplet
5237# endif
5238# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5239# if _MIPS_SIM == _ABIO32
5240 mipsisa32r6-linux-gnu
5241# elif _MIPS_SIM == _ABIN32
5242 mipsisa64r6-linux-gnuabin32
5243# elif _MIPS_SIM == _ABI64
5244 mipsisa64r6-linux-gnuabi64
5245# else
5246# error unknown platform triplet
5247# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005248# elif defined(__mips_hard_float) && defined(_MIPSEL)
5249# if _MIPS_SIM == _ABIO32
5250 mipsel-linux-gnu
5251# elif _MIPS_SIM == _ABIN32
5252 mips64el-linux-gnuabin32
5253# elif _MIPS_SIM == _ABI64
5254 mips64el-linux-gnuabi64
5255# else
5256# error unknown platform triplet
5257# endif
5258# elif defined(__mips_hard_float)
5259# if _MIPS_SIM == _ABIO32
5260 mips-linux-gnu
5261# elif _MIPS_SIM == _ABIN32
5262 mips64-linux-gnuabin32
5263# elif _MIPS_SIM == _ABI64
5264 mips64-linux-gnuabi64
5265# else
5266# error unknown platform triplet
5267# endif
5268# elif defined(__or1k__)
5269 or1k-linux-gnu
5270# elif defined(__powerpc__) && defined(__SPE__)
5271 powerpc-linux-gnuspe
5272# elif defined(__powerpc64__)
5273# if defined(__LITTLE_ENDIAN__)
5274 powerpc64le-linux-gnu
5275# else
5276 powerpc64-linux-gnu
5277# endif
5278# elif defined(__powerpc__)
5279 powerpc-linux-gnu
5280# elif defined(__s390x__)
5281 s390x-linux-gnu
5282# elif defined(__s390__)
5283 s390-linux-gnu
5284# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5285 sh4-linux-gnu
5286# elif defined(__sparc__) && defined(__arch64__)
5287 sparc64-linux-gnu
5288# elif defined(__sparc__)
5289 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005290# elif defined(__riscv)
5291# if __riscv_xlen == 32
5292 riscv32-linux-gnu
5293# elif __riscv_xlen == 64
5294 riscv64-linux-gnu
5295# else
5296# error unknown platform triplet
5297# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298# else
5299# error unknown platform triplet
5300# endif
5301#elif defined(__FreeBSD_kernel__)
5302# if defined(__LP64__)
5303 x86_64-kfreebsd-gnu
5304# elif defined(__i386__)
5305 i386-kfreebsd-gnu
5306# else
5307# error unknown platform triplet
5308# endif
5309#elif defined(__gnu_hurd__)
5310 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005311#elif defined(__APPLE__)
5312 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005313#elif defined(__VXWORKS__)
5314 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315#else
5316# error unknown platform triplet
5317#endif
5318
5319EOF
5320
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005321if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5324$as_echo "$PLATFORM_TRIPLET" >&6; }
5325else
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5327$as_echo "none" >&6; }
5328fi
5329rm -f conftest.c conftest.out
5330
5331if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5332 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5333 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5334 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005335elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5336 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005337fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005338
doko@ubuntu.com55532312016-06-14 08:55:19 +02005339if test x$MULTIARCH != x; then
5340 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5341fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005342
5343
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5345$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5346save_LDFLAGS="$LDFLAGS"
5347LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005348
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5350/* end confdefs.h. */
5351
5352int
5353main ()
5354{
5355
5356 ;
5357 return 0;
5358}
5359_ACEOF
5360if ac_fn_c_try_link "$LINENO"; then :
5361 NO_AS_NEEDED="-Wl,--no-as-needed"
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5363$as_echo "yes" >&6; }
5364else
5365 NO_AS_NEEDED=""
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369rm -f core conftest.err conftest.$ac_objext \
5370 conftest$ac_exeext conftest.$ac_ext
5371LDFLAGS="$save_LDFLAGS"
5372
5373
5374
5375# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376
Matthias Kloseb9621712010-04-24 17:59:49 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5378$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005379if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381else
5382 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5383 then ac_cv_path_EGREP="$GREP -E"
5384 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 # Loop through the user's path and test for each of PROGNAME-LIST
5388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5390do
5391 IFS=$as_save_IFS
5392 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 for ac_prog in egrep; do
5394 for ac_exec_ext in '' $ac_executable_extensions; do
5395 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005396 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005397# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398 # Check for GNU $ac_path_EGREP
5399case `"$ac_path_EGREP" --version 2>&1` in
5400*GNU*)
5401 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5402*)
5403 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 while :
5406 do
5407 cat "conftest.in" "conftest.in" >"conftest.tmp"
5408 mv "conftest.tmp" "conftest.in"
5409 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5412 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5415 # Best one so far, save it but keep looking for a better one
5416 ac_cv_path_EGREP="$ac_path_EGREP"
5417 ac_path_EGREP_max=$ac_count
5418 fi
5419 # 10*(2^10) chars as input seems more than enough
5420 test $ac_count -gt 10 && break
5421 done
5422 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5423esac
5424
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 $ac_path_EGREP_found && break 3
5426 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005431 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 +00005432 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433else
5434 ac_cv_path_EGREP=$EGREP
5435fi
5436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 fi
5438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5440$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005442
5443
Matthias Kloseb9621712010-04-24 17:59:49 +00005444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5445$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005446if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $as_echo_n "(cached) " >&6
5448else
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005450/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005451#include <stdlib.h>
5452#include <stdarg.h>
5453#include <string.h>
5454#include <float.h>
5455
5456int
5457main ()
5458{
5459
5460 ;
5461 return 0;
5462}
5463_ACEOF
5464if ac_fn_c_try_compile "$LINENO"; then :
5465 ac_cv_header_stdc=yes
5466else
5467 ac_cv_header_stdc=no
5468fi
5469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5470
5471if test $ac_cv_header_stdc = yes; then
5472 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005476
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005477_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005481else
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005483fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005484rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485
Matthias Kloseb9621712010-04-24 17:59:49 +00005486fi
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491/* end confdefs.h. */
5492#include <stdlib.h>
5493
5494_ACEOF
5495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5496 $EGREP "free" >/dev/null 2>&1; then :
5497
5498else
5499 ac_cv_header_stdc=no
5500fi
5501rm -f conftest*
5502
5503fi
5504
5505if test $ac_cv_header_stdc = yes; then
5506 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5507 if test "$cross_compiling" = yes; then :
5508 :
5509else
5510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5511/* end confdefs.h. */
5512#include <ctype.h>
5513#include <stdlib.h>
5514#if ((' ' & 0x0FF) == 0x020)
5515# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5516# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5517#else
5518# define ISLOWER(c) \
5519 (('a' <= (c) && (c) <= 'i') \
5520 || ('j' <= (c) && (c) <= 'r') \
5521 || ('s' <= (c) && (c) <= 'z'))
5522# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5523#endif
5524
5525#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5526int
5527main ()
5528{
5529 int i;
5530 for (i = 0; i < 256; i++)
5531 if (XOR (islower (i), ISLOWER (i))
5532 || toupper (i) != TOUPPER (i))
5533 return 2;
5534 return 0;
5535}
5536_ACEOF
5537if ac_fn_c_try_run "$LINENO"; then :
5538
5539else
5540 ac_cv_header_stdc=no
5541fi
5542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5543 conftest.$ac_objext conftest.beam conftest.$ac_ext
5544fi
5545
5546fi
5547fi
5548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5549$as_echo "$ac_cv_header_stdc" >&6; }
5550if test $ac_cv_header_stdc = yes; then
5551
5552$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5553
5554fi
5555
5556# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5557for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5558 inttypes.h stdint.h unistd.h
5559do :
5560 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5561ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5562"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005563if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005564 cat >>confdefs.h <<_ACEOF
5565#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5566_ACEOF
5567
5568fi
5569
5570done
5571
5572
5573
5574 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 +02005575if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 MINIX=yes
5577else
5578 MINIX=
5579fi
5580
5581
5582 if test "$MINIX" = yes; then
5583
5584$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5585
5586
5587$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5588
5589
5590$as_echo "#define _MINIX 1" >>confdefs.h
5591
5592 fi
5593
5594
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5596$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005597if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005598 $as_echo_n "(cached) " >&6
5599else
5600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5601/* end confdefs.h. */
5602
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005603# define __EXTENSIONS__ 1
5604 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005605int
5606main ()
5607{
5608
5609 ;
5610 return 0;
5611}
5612_ACEOF
5613if ac_fn_c_try_compile "$LINENO"; then :
5614 ac_cv_safe_to_define___extensions__=yes
5615else
5616 ac_cv_safe_to_define___extensions__=no
5617fi
5618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5619fi
5620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5621$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5622 test $ac_cv_safe_to_define___extensions__ = yes &&
5623 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5624
5625 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5626
5627 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5628
5629 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5630
5631 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5632
5633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634
Xavier de Gaye95750b12016-07-09 11:05:42 +02005635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5636$as_echo_n "checking for the Android API level... " >&6; }
5637cat >> conftest.c <<EOF
5638#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005639android_api = __ANDROID_API__
5640arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005641#else
5642#error not Android
5643#endif
5644EOF
5645
5646if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005647 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5648 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5650$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005651 if test -z "$ANDROID_API_LEVEL"; then
5652 echo 'Fatal: you must define __ANDROID_API__'
5653 exit 1
5654 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005655
5656cat >>confdefs.h <<_ACEOF
5657#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5658_ACEOF
5659
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005660
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5662$as_echo_n "checking for the Android arm ABI... " >&6; }
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5664$as_echo "$_arm_arch" >&6; }
5665 if test "$_arm_arch" = 7; then
5666 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5667 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5668 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005669else
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5671$as_echo "not Android" >&6; }
5672fi
5673rm -f conftest.c conftest.out
5674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675# Check for unsupported systems
5676case $ac_sys_system/$ac_sys_release in
5677atheos*|Linux*/1*)
5678 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5679 echo See README for details.
5680 exit 1;;
5681esac
5682
5683
Matthias Kloseb9621712010-04-24 17:59:49 +00005684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5685$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
5687# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005688if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 withval=$with_suffix;
5690 case $withval in
5691 no) EXEEXT=;;
5692 yes) EXEEXT=.exe;;
5693 *) EXEEXT=$withval;;
5694 esac
5695fi
5696
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5698$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
5700# Test whether we're running on a non-case-sensitive system, in which
5701# case we give a warning if no ext is given
5702
Matthias Kloseb9621712010-04-24 17:59:49 +00005703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5704$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705if test ! -d CaseSensitiveTestDir; then
5706mkdir CaseSensitiveTestDir
5707fi
5708
5709if test -d casesensitivetestdir
5710then
Matthias Kloseb9621712010-04-24 17:59:49 +00005711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5712$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 BUILDEXEEXT=.exe
5714else
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5716$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 BUILDEXEEXT=$EXEEXT
5718fi
5719rmdir CaseSensitiveTestDir
5720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721case $ac_sys_system in
5722hp*|HP*)
5723 case $CC in
5724 cc|*/cc) CC="$CC -Ae";;
5725 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726esac
5727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728
Matthias Kloseb9621712010-04-24 17:59:49 +00005729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5730$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731if test -z "$LIBRARY"
5732then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005733 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5736$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737
5738# LDLIBRARY is the name of the library to link against (as opposed to the
5739# name of the library into which to insert object files). BLDLIBRARY is also
5740# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5741# is blank as the main program is not linked directly against LDLIBRARY.
5742# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5743# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5744# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5745# DLLLIBRARY is the shared (i.e., DLL) library.
5746#
5747# RUNSHARED is used to run shared python without installed libraries
5748#
5749# INSTSONAME is the name of the shared library that will be use to install
5750# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005751#
5752# LDVERSION is the shared library version number, normally the Python version
5753# with the ABI build flags appended.
5754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755
5756
5757
5758
5759
5760
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762LDLIBRARY="$LIBRARY"
5763BLDLIBRARY='$(LDLIBRARY)'
5764INSTSONAME='$(LDLIBRARY)'
5765DLLLIBRARY=''
5766LDLIBRARYDIR=''
5767RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005768LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770# LINKCC is the command that links the python executable -- default is $(CC).
5771# If CXX is set, and if it is needed to link a main function that was
5772# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5773# python might then depend on the C++ runtime
5774# This is altered for AIX in order to build the export list before
5775# linking.
5776
Matthias Kloseb9621712010-04-24 17:59:49 +00005777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5778$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779if test -z "$LINKCC"
5780then
5781 LINKCC='$(PURIFY) $(MAINCC)'
5782 case $ac_sys_system in
5783 AIX*)
5784 exp_extra="\"\""
5785 if test $ac_sys_release -ge 5 -o \
5786 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5787 exp_extra="."
5788 fi
5789 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790 QNX*)
5791 # qcc must be used because the other compilers do not
5792 # support -N.
5793 LINKCC=qcc;;
5794 esac
5795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5797$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798
5799# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5800# make sure we default having it set to "no": this is used by
5801# distutils.unixccompiler to know if it should add --enable-new-dtags
5802# to linker command lines, and failing to detect GNU ld simply results
5803# in the same bahaviour as before.
5804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5806$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807ac_prog=ld
5808if test "$GCC" = yes; then
5809 ac_prog=`$CC -print-prog-name=ld`
5810fi
5811case `"$ac_prog" -V 2>&1 < /dev/null` in
5812 *GNU*)
5813 GNULD=yes;;
5814 *)
5815 GNULD=no;;
5816esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5818$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5821$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005823if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824 enableval=$enable_shared;
5825fi
5826
5827
5828if test -z "$enable_shared"
5829then
5830 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005831 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832 enable_shared="yes";;
5833 *)
5834 enable_shared="no";;
5835 esac
5836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5838$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839
Matthias Kloseb9621712010-04-24 17:59:49 +00005840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5841$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005843if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844 enableval=$enable_profiling;
5845fi
5846
5847if test "x$enable_profiling" = xyes; then
5848 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005849 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851/* end confdefs.h. */
5852int main() { return 0; }
5853_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005854if ac_fn_c_try_link "$LINENO"; then :
5855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005857 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005859rm -f core conftest.err conftest.$ac_objext \
5860 conftest$ac_exeext conftest.$ac_ext
5861 CC="$ac_save_cc"
5862else
5863 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5866$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868if test "x$enable_profiling" = xyes; then
5869 BASECFLAGS="-pg $BASECFLAGS"
5870 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
5872
Matthias Kloseb9621712010-04-24 17:59:49 +00005873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5874$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875
5876# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5877# library that we build, but we do not want to link against it (we
5878# will find it with a -framework option). For this reason there is an
5879# extra variable BLDLIBRARY against which Python and the extension
5880# modules are linked, BLDLIBRARY. This is normally the same as
5881# LDLIBRARY, but empty for MacOSX framework builds.
5882if test "$enable_framework"
5883then
5884 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005885 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 BLDLIBRARY=''
5887else
5888 BLDLIBRARY='$(LDLIBRARY)'
5889fi
5890
5891# Other platforms follow
5892if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005893 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
5897 case $ac_sys_system in
5898 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005899 LDLIBRARY='libpython$(LDVERSION).dll.a'
5900 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
5902 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
5904 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005907 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005908 then
5909 PY3LIBRARY=libpython3.so
5910 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005912 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).so'
5914 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005915 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005917 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005918 then
5919 PY3LIBRARY=libpython3.so
5920 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
5922 hp*|HP*)
5923 case `uname -m` in
5924 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 ;;
5927 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005928 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
5930 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005932 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).dylib'
5936 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005937 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005939 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005941 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005942 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943
5944 esac
5945else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005946 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 case $ac_sys_system in
5948 CYGWIN*)
5949 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
5952 esac
5953fi
5954
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005955if test "$cross_compiling" = yes; then
5956 RUNSHARED=
5957fi
5958
Matthias Kloseb9621712010-04-24 17:59:49 +00005959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5960$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005963if test -n "$ac_tool_prefix"; then
5964 for ac_prog in ar aal
5965 do
5966 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5967set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5969$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005970if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972else
5973 if test -n "$AR"; then
5974 ac_cv_prog_AR="$AR" # Let the user override the test.
5975else
5976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977for as_dir in $PATH
5978do
5979 IFS=$as_save_IFS
5980 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005983 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 break 2
5986 fi
5987done
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989IFS=$as_save_IFS
5990
5991fi
5992fi
5993AR=$ac_cv_prog_AR
5994if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5996$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997else
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000fi
6001
6002
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006003 test -n "$AR" && break
6004 done
6005fi
6006if test -z "$AR"; then
6007 ac_ct_AR=$AR
6008 for ac_prog in ar aal
6009do
6010 # Extract the first word of "$ac_prog", so it can be a program name with args.
6011set dummy $ac_prog; ac_word=$2
6012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6013$as_echo_n "checking for $ac_word... " >&6; }
6014if ${ac_cv_prog_ac_ct_AR+:} false; then :
6015 $as_echo_n "(cached) " >&6
6016else
6017 if test -n "$ac_ct_AR"; then
6018 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6019else
6020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH
6022do
6023 IFS=$as_save_IFS
6024 test -z "$as_dir" && as_dir=.
6025 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006026 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006027 ac_cv_prog_ac_ct_AR="$ac_prog"
6028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6029 break 2
6030 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006032 done
6033IFS=$as_save_IFS
6034
6035fi
6036fi
6037ac_ct_AR=$ac_cv_prog_ac_ct_AR
6038if test -n "$ac_ct_AR"; then
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6040$as_echo "$ac_ct_AR" >&6; }
6041else
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6043$as_echo "no" >&6; }
6044fi
6045
6046
6047 test -n "$ac_ct_AR" && break
6048done
6049
6050 if test "x$ac_ct_AR" = x; then
6051 AR="ar"
6052 else
6053 case $cross_compiling:$ac_tool_warned in
6054yes:)
6055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6057ac_tool_warned=yes ;;
6058esac
6059 AR=$ac_ct_AR
6060 fi
6061fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062
6063
6064# tweak ARFLAGS only if the user didn't set it on the command line
6065
6066if test -z "$ARFLAGS"
6067then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006068 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069fi
6070
doko@ubuntu.com58844492012-06-30 18:25:32 +02006071if test -n "$ac_tool_prefix"; then
6072 for ac_prog in readelf
6073 do
6074 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6075set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6077$as_echo_n "checking for $ac_word... " >&6; }
6078if ${ac_cv_prog_READELF+:} false; then :
6079 $as_echo_n "(cached) " >&6
6080else
6081 if test -n "$READELF"; then
6082 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6083else
6084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6085for as_dir in $PATH
6086do
6087 IFS=$as_save_IFS
6088 test -z "$as_dir" && as_dir=.
6089 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006091 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6093 break 2
6094 fi
6095done
6096 done
6097IFS=$as_save_IFS
6098
6099fi
6100fi
6101READELF=$ac_cv_prog_READELF
6102if test -n "$READELF"; then
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6104$as_echo "$READELF" >&6; }
6105else
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6107$as_echo "no" >&6; }
6108fi
6109
6110
6111 test -n "$READELF" && break
6112 done
6113fi
6114if test -z "$READELF"; then
6115 ac_ct_READELF=$READELF
6116 for ac_prog in readelf
6117do
6118 # Extract the first word of "$ac_prog", so it can be a program name with args.
6119set dummy $ac_prog; ac_word=$2
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121$as_echo_n "checking for $ac_word... " >&6; }
6122if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6123 $as_echo_n "(cached) " >&6
6124else
6125 if test -n "$ac_ct_READELF"; then
6126 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6127else
6128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129for as_dir in $PATH
6130do
6131 IFS=$as_save_IFS
6132 test -z "$as_dir" && as_dir=.
6133 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006135 ac_cv_prog_ac_ct_READELF="$ac_prog"
6136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6137 break 2
6138 fi
6139done
6140 done
6141IFS=$as_save_IFS
6142
6143fi
6144fi
6145ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6146if test -n "$ac_ct_READELF"; then
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6148$as_echo "$ac_ct_READELF" >&6; }
6149else
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
6152fi
6153
6154
6155 test -n "$ac_ct_READELF" && break
6156done
6157
6158 if test "x$ac_ct_READELF" = x; then
6159 READELF=":"
6160 else
6161 case $cross_compiling:$ac_tool_warned in
6162yes:)
6163{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6164$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6165ac_tool_warned=yes ;;
6166esac
6167 READELF=$ac_ct_READELF
6168 fi
6169fi
6170
6171if test "$cross_compiling" = yes; then
6172 case "$READELF" in
6173 readelf|:)
6174 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6175 ;;
6176 esac
6177fi
6178
6179
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006182hp*|HP*)
6183 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184 if test -z "$INSTALL"
6185 then
6186 INSTALL="${srcdir}/install-sh -c"
6187 fi
6188esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189# Find a good install program. We prefer a C program (faster),
6190# so one script is as good as another. But avoid the broken or
6191# incompatible versions:
6192# SysV /etc/install, /usr/sbin/install
6193# SunOS /usr/etc/install
6194# IRIX /sbin/install
6195# AIX /bin/install
6196# AmigaOS /C/install, which installs bootblocks on floppy discs
6197# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6198# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6199# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6200# OS/2's system install, which has a completely different semantic
6201# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006202# Reject install programs that cannot install multiple files.
6203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6204$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006206if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006207 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208else
6209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212 IFS=$as_save_IFS
6213 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 # Account for people who put trailing slashes in PATH elements.
6215case $as_dir/ in #((
6216 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006218 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219 /usr/ucb/* ) ;;
6220 *)
6221 # OSF1 and SCO ODT 3.0 have their own names for install.
6222 # Don't use installbsd from OSF since it installs stuff as root
6223 # by default.
6224 for ac_prog in ginstall scoinst install; do
6225 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006226 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227 if test $ac_prog = install &&
6228 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6229 # AIX install. It has an incompatible calling convention.
6230 :
6231 elif test $ac_prog = install &&
6232 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6233 # program-specific install script used by HP pwplus--don't use.
6234 :
6235 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 rm -rf conftest.one conftest.two conftest.dir
6237 echo one > conftest.one
6238 echo two > conftest.two
6239 mkdir conftest.dir
6240 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6241 test -s conftest.one && test -s conftest.two &&
6242 test -s conftest.dir/conftest.one &&
6243 test -s conftest.dir/conftest.two
6244 then
6245 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6246 break 3
6247 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006248 fi
6249 fi
6250 done
6251 done
6252 ;;
6253esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006254
6255 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256IFS=$as_save_IFS
6257
Matthias Kloseb9621712010-04-24 17:59:49 +00006258rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006259
6260fi
6261 if test "${ac_cv_path_install+set}" = set; then
6262 INSTALL=$ac_cv_path_install
6263 else
6264 # As a last resort, use the slow shell script. Don't cache a
6265 # value for INSTALL within a source directory, because that will
6266 # break other packages using the cache if that directory is
6267 # removed, or if the value is a relative name.
6268 INSTALL=$ac_install_sh
6269 fi
6270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6272$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273
6274# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6275# It thinks the first close brace ends the variable substitution.
6276test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6277
6278test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6279
6280test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6281
Matthias Klose93a0ef12012-03-15 18:08:34 +01006282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6283$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6284if test -z "$MKDIR_P"; then
6285 if ${ac_cv_path_mkdir+:} false; then :
6286 $as_echo_n "(cached) " >&6
6287else
6288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6290do
6291 IFS=$as_save_IFS
6292 test -z "$as_dir" && as_dir=.
6293 for ac_prog in mkdir gmkdir; do
6294 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006295 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006296 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6297 'mkdir (GNU coreutils) '* | \
6298 'mkdir (coreutils) '* | \
6299 'mkdir (fileutils) '4.1*)
6300 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6301 break 3;;
6302 esac
6303 done
6304 done
6305 done
6306IFS=$as_save_IFS
6307
6308fi
6309
6310 test -d ./--version && rmdir ./--version
6311 if test "${ac_cv_path_mkdir+set}" = set; then
6312 MKDIR_P="$ac_cv_path_mkdir -p"
6313 else
6314 # As a last resort, use the slow shell script. Don't cache a
6315 # value for MKDIR_P within a source directory, because that will
6316 # break other packages using the cache if that directory is
6317 # removed, or if the value is a relative name.
6318 MKDIR_P="$ac_install_sh -d"
6319 fi
6320fi
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6322$as_echo "$MKDIR_P" >&6; }
6323
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324
6325# Not every filesystem supports hard links
6326
6327if test -z "$LN" ; then
6328 case $ac_sys_system in
6329 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 *) LN=ln;;
6331 esac
6332fi
6333
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006334# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006335
6336ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6340$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341
6342# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006343if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344 withval=$with_pydebug;
6345if test "$withval" != no
6346then
6347
Matthias Kloseb9621712010-04-24 17:59:49 +00006348$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349
Matthias Kloseb9621712010-04-24 17:59:49 +00006350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6351$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006353 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006354else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356fi
6357else
Matthias Kloseb9621712010-04-24 17:59:49 +00006358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6359$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360fi
6361
6362
Victor Stinnerf4e47032019-04-25 00:56:28 +02006363# Check for --with-trace-refs
6364# --with-trace-refs
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6366$as_echo_n "checking for --with-trace-refs... " >&6; }
6367
6368# Check whether --with-trace-refs was given.
6369if test "${with_trace_refs+set}" = set; then :
6370 withval=$with_trace_refs;
6371else
6372 with_trace_refs=no
6373fi
6374
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6376$as_echo "$with_trace_refs" >&6; }
6377
6378if test "$with_trace_refs" = "yes"
6379then
6380
6381$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6382
6383fi
6384
6385# Check for --with-assertions.
6386# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006387assertions='false'
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6389$as_echo_n "checking for --with-assertions... " >&6; }
6390
6391# Check whether --with-assertions was given.
6392if test "${with_assertions+set}" = set; then :
6393 withval=$with_assertions;
6394if test "$withval" != no
6395then
6396 assertions='true'
6397fi
6398fi
6399
6400if test "$assertions" = 'true'; then
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6402$as_echo "yes" >&6; }
6403elif test "$Py_DEBUG" = 'true'; then
6404 assertions='true'
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6406$as_echo "implied by --with-pydebug" >&6; }
6407else
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
Brett Cannon63d98bc2016-09-06 17:12:40 -07006412# Enable optimization flags
6413
6414
6415Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6417$as_echo_n "checking for --enable-optimizations... " >&6; }
6418# Check whether --enable-optimizations was given.
6419if test "${enable_optimizations+set}" = set; then :
6420 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006421if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006422then
6423 Py_OPT='true'
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6425$as_echo "yes" >&6; };
6426else
6427 Py_OPT='false'
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; };
6430fi
6431else
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433$as_echo "no" >&6; }
6434fi
6435
6436if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006437 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6438 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006439 # 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 +00006440 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006441 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006442 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006443 DEF_MAKE_RULE="build_all"
6444else
6445 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006446 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006447 DEF_MAKE_RULE="all"
6448fi
6449
Miss Islington (bot)24066722019-07-22 13:17:23 -07006450
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6452$as_echo_n "checking PROFILE_TASK... " >&6; }
6453if test -z "$PROFILE_TASK"
6454then
6455 PROFILE_TASK='-m test --pgo'
6456fi
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6458$as_echo "$PROFILE_TASK" >&6; }
6459
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006460# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6461# normal names in the default $PATH (ie: Ubuntu). They exist under the
6462# non-suffixed name in their versioned llvm directory.
6463
6464llvm_bin_dir=''
6465llvm_path="${PATH}"
6466if test "${CC}" = "clang"
6467then
6468 clang_bin=`which clang`
6469 # Some systems install clang elsewhere as a symlink to the real path
6470 # which is where the related llvm tools are located.
6471 if test -L "${clang_bin}"
6472 then
6473 clang_dir=`dirname "${clang_bin}"`
6474 clang_bin=`readlink "${clang_bin}"`
6475 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6476 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6477 fi
6478fi
6479
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006480# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6482$as_echo_n "checking for --with-lto... " >&6; }
6483
6484# Check whether --with-lto was given.
6485if test "${with_lto+set}" = set; then :
6486 withval=$with_lto;
6487if test "$withval" != no
6488then
6489 Py_LTO='true'
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6491$as_echo "yes" >&6; };
6492else
6493 Py_LTO='false'
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6495$as_echo "no" >&6; };
6496fi
6497else
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
6500fi
6501
6502if test "$Py_LTO" = 'true' ; then
6503 case $CC in
6504 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006505
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006506 if test -n "$ac_tool_prefix"; then
6507 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6508set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510$as_echo_n "checking for $ac_word... " >&6; }
6511if ${ac_cv_path_LLVM_AR+:} false; then :
6512 $as_echo_n "(cached) " >&6
6513else
6514 case $LLVM_AR in
6515 [\\/]* | ?:[\\/]*)
6516 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6517 ;;
6518 *)
6519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6520for as_dir in ${llvm_path}
6521do
6522 IFS=$as_save_IFS
6523 test -z "$as_dir" && as_dir=.
6524 for ac_exec_ext in '' $ac_executable_extensions; do
6525 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6526 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6527 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6528 break 2
6529 fi
6530done
6531 done
6532IFS=$as_save_IFS
6533
6534 ;;
6535esac
6536fi
6537LLVM_AR=$ac_cv_path_LLVM_AR
6538if test -n "$LLVM_AR"; then
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6540$as_echo "$LLVM_AR" >&6; }
6541else
6542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543$as_echo "no" >&6; }
6544fi
6545
6546
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006547fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006548if test -z "$ac_cv_path_LLVM_AR"; then
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006549 ac_pt_LLVM_AR=$LLVM_AR
6550 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006551set dummy llvm-ar; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6555 $as_echo_n "(cached) " >&6
6556else
6557 case $ac_pt_LLVM_AR in
6558 [\\/]* | ?:[\\/]*)
6559 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6560 ;;
6561 *)
6562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in ${llvm_path}
6564do
6565 IFS=$as_save_IFS
6566 test -z "$as_dir" && as_dir=.
6567 for ac_exec_ext in '' $ac_executable_extensions; do
6568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6569 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6570 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6571 break 2
6572 fi
6573done
6574 done
6575IFS=$as_save_IFS
6576
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006577 ;;
6578esac
6579fi
6580ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6581if test -n "$ac_pt_LLVM_AR"; then
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6583$as_echo "$ac_pt_LLVM_AR" >&6; }
6584else
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006589 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006590 LLVM_AR="''"
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006591 else
6592 case $cross_compiling:$ac_tool_warned in
6593yes:)
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6595$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6596ac_tool_warned=yes ;;
6597esac
6598 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006599 fi
6600else
6601 LLVM_AR="$ac_cv_path_LLVM_AR"
6602fi
6603
6604
6605 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6606 then
6607 LLVM_AR_FOUND="found"
6608 else
6609 LLVM_AR_FOUND="not-found"
6610 fi
6611 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6612 then
6613 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6614 if test -n "${found_llvm_ar}"
6615 then
6616 LLVM_AR='/usr/bin/xcrun llvm-ar'
6617 LLVM_AR_FOUND=found
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6619$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6620 fi
6621 fi
6622 if test $LLVM_AR_FOUND = not-found
6623 then
6624 LLVM_PROFR_ERR=yes
6625 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6626 else
6627 LLVM_AR_ERR=no
6628 fi
6629 AR="${LLVM_AR}"
6630 case $ac_sys_system in
6631 Darwin*)
6632 # Any changes made here should be reflected in the GCC+Darwin case below
6633 LTOFLAGS="-flto -Wl,-export_dynamic"
6634 ;;
6635 *)
6636 LTOFLAGS="-flto"
6637 ;;
6638 esac
6639 ;;
6640 *gcc*)
6641 case $ac_sys_system in
6642 Darwin*)
6643 LTOFLAGS="-flto -Wl,-export_dynamic"
6644 ;;
6645 *)
6646 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6647 ;;
6648 esac
6649 ;;
6650 esac
6651
6652 if test "$ac_cv_prog_cc_g" = "yes"
6653 then
6654 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6655 # to get debug symbols.
6656 LTOFLAGS="$LTOFLAGS -g"
6657 fi
6658
stratakisf92c7aa2018-12-04 15:54:01 +01006659 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006660 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006661fi
6662
6663# Enable PGO flags.
6664
6665
6666
6667
6668
6669
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006670if test -n "$ac_tool_prefix"; then
6671 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6672set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6674$as_echo_n "checking for $ac_word... " >&6; }
6675if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6676 $as_echo_n "(cached) " >&6
6677else
6678 case $LLVM_PROFDATA in
6679 [\\/]* | ?:[\\/]*)
6680 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6681 ;;
6682 *)
6683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6684for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006685do
6686 IFS=$as_save_IFS
6687 test -z "$as_dir" && as_dir=.
6688 for ac_exec_ext in '' $ac_executable_extensions; do
6689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006690 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6692 break 2
6693 fi
6694done
6695 done
6696IFS=$as_save_IFS
6697
Gregory P. Smith799520c2016-09-07 16:10:00 -07006698 ;;
6699esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006700fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006701LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6702if test -n "$LLVM_PROFDATA"; then
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6704$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705else
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707$as_echo "no" >&6; }
6708fi
6709
6710
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006711fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006713 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6714 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006715set dummy llvm-profdata; ac_word=$2
6716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6717$as_echo_n "checking for $ac_word... " >&6; }
6718if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6719 $as_echo_n "(cached) " >&6
6720else
6721 case $ac_pt_LLVM_PROFDATA in
6722 [\\/]* | ?:[\\/]*)
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6724 ;;
6725 *)
6726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727for as_dir in ${llvm_path}
6728do
6729 IFS=$as_save_IFS
6730 test -z "$as_dir" && as_dir=.
6731 for ac_exec_ext in '' $ac_executable_extensions; do
6732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735 break 2
6736 fi
6737done
6738 done
6739IFS=$as_save_IFS
6740
Gregory P. Smith799520c2016-09-07 16:10:00 -07006741 ;;
6742esac
6743fi
6744ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6745if test -n "$ac_pt_LLVM_PROFDATA"; then
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6747$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6748else
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750$as_echo "no" >&6; }
6751fi
6752
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006753 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006754 LLVM_PROFDATA="''"
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006755 else
6756 case $cross_compiling:$ac_tool_warned in
6757yes:)
6758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6760ac_tool_warned=yes ;;
6761esac
6762 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 fi
6764else
6765 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6766fi
6767
6768
6769if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6770then
6771 LLVM_PROF_FOUND="found"
6772else
6773 LLVM_PROF_FOUND="not-found"
6774fi
6775if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6776then
6777 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6778 if test -n "${found_llvm_profdata}"
6779 then
6780 # llvm-profdata isn't directly in $PATH in some cases.
6781 # https://apple.stackexchange.com/questions/197053/
6782 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6783 LLVM_PROF_FOUND=found
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6785$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6786 fi
6787fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006788LLVM_PROF_ERR=no
6789case $CC in
6790 *clang*)
6791 # Any changes made here should be reflected in the GCC+Darwin case below
6792 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6793 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006794 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006795 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6796 if test $LLVM_PROF_FOUND = not-found
6797 then
6798 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006799 if test "${REQUIRE_PGO}" = "yes"
6800 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006801 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 -07006802 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 fi
6804 ;;
6805 *gcc*)
6806 case $ac_sys_system in
6807 Darwin*)
6808 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6809 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006810 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006811 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006812 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813 then
6814 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006815 if test "${REQUIRE_PGO}" = "yes"
6816 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006817 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 -07006818 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819 fi
6820 ;;
6821 *)
6822 PGO_PROF_GEN_FLAG="-fprofile-generate"
6823 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6824 LLVM_PROF_MERGER="true"
6825 LLVM_PROF_FILE=""
6826 ;;
6827 esac
6828 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006829 *icc*)
6830 PGO_PROF_GEN_FLAG="-prof-gen"
6831 PGO_PROF_USE_FLAG="-prof-use"
6832 LLVM_PROF_MERGER="true"
6833 LLVM_PROF_FILE=""
6834 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006835esac
6836
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6838# merged with this chunk of code?
6839
6840# Optimizer/debugger flags
6841# ------------------------
6842# (The following bit of code is complicated enough - please keep things
6843# indented properly. Just pretend you're editing Python code. ;-)
6844
6845# There are two parallel sets of case statements below, one that checks to
6846# see if OPT was set and one that does BASECFLAGS setting based upon
6847# compiler and platform. BASECFLAGS tweaks need to be made even if the
6848# user set OPT.
6849
Victor Stinner23a683a2019-04-12 21:27:37 +02006850case $CC in
6851 *clang*)
6852 cc_is_clang=1
6853 ;;
6854 *)
6855 if $CC --version 2>&1 | grep -q clang
6856 then
6857 cc_is_clang=1
6858 else
6859 cc_is_clang=
6860 fi
6861esac
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863# tweak OPT based on compiler and platform, only if the user didn't set
6864# it on the command line
6865
Victor Stinner9ed34a82017-05-02 22:35:58 +02006866
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006867if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868then
6869 case $GCC in
6870 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6872 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6873 WRAP="-fwrapv"
6874 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006875
Victor Stinner35f3d242017-04-21 12:35:24 +02006876 if test -n "${cc_is_clang}"
6877 then
6878 # Clang also needs -fwrapv
6879 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006880 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6881 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006882 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006883 fi
6884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 case $ac_cv_prog_cc_g in
6886 yes)
6887 if test "$Py_DEBUG" = 'true' ; then
6888 # Optimization messes up debuggers, so turn it off for
6889 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006890 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006891 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006892 else
Victor Stinner28205b22017-04-21 11:24:34 +02006893 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006894 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895 else
Victor Stinner28205b22017-04-21 11:24:34 +02006896 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897 fi
6898 ;;
6899 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006900 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901 ;;
6902 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006903
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904 case $ac_sys_system in
6905 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6906 ;;
6907 esac
6908 ;;
6909
6910 *)
6911 OPT="-O"
6912 ;;
6913 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914fi
6915
6916
6917
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006918
stratakiscf10a752018-12-19 18:19:01 +01006919
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920# The -arch flags for universal builds on OSX
6921UNIVERSAL_ARCH_FLAGS=
6922
6923
6924# tweak BASECFLAGS based on compiler and platform
6925case $GCC in
6926yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006927 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006928
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6930$as_echo_n "checking for -Wextra... " >&6; }
6931 ac_save_cc="$CC"
6932 CC="$CC -Wextra -Werror"
6933 if ${ac_cv_extra_warnings+:} false; then :
6934 $as_echo_n "(cached) " >&6
6935else
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937/* end confdefs.h. */
6938
6939
6940int
6941main ()
6942{
6943
6944 ;
6945 return 0;
6946}
6947
6948_ACEOF
6949if ac_fn_c_try_compile "$LINENO"; then :
6950
6951 ac_cv_extra_warnings=yes
6952
6953else
6954
6955 ac_cv_extra_warnings=no
6956
6957fi
6958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6959fi
6960
6961 CC="$ac_save_cc"
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6963$as_echo "$ac_cv_extra_warnings" >&6; }
6964
6965 if test $ac_cv_extra_warnings = yes
6966 then
6967 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6968 fi
6969
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006970 # Python doesn't violate C99 aliasing rules, but older versions of
6971 # GCC produce warnings for legal Python code. Enable
6972 # -fno-strict-aliasing on versions of GCC that support but produce
6973 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6975$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976 ac_save_cc="$CC"
6977 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006979 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006981else
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006983/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006984
Matthias Kloseb159a552010-04-25 21:00:44 +00006985
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006986int
6987main ()
6988{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006989
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006990 ;
6991 return 0;
6992}
Matthias Kloseb159a552010-04-25 21:00:44 +00006993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006995if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006996
6997 CC="$ac_save_cc -fstrict-aliasing"
6998 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007000/* end confdefs.h. */
7001
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007002 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007003int
7004main ()
7005{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007006double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007007 ;
7008 return 0;
7009}
Matthias Kloseb159a552010-04-25 21:00:44 +00007010
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007012if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007013
7014 ac_cv_no_strict_aliasing=no
7015
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007016else
Matthias Kloseb159a552010-04-25 21:00:44 +00007017
7018 ac_cv_no_strict_aliasing=yes
7019
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007020fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007022
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023else
Matthias Kloseb159a552010-04-25 21:00:44 +00007024
7025 ac_cv_no_strict_aliasing=no
7026
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007027fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007029fi
7030
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007032 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7034$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007036 then
7037 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7038 fi
7039
Zachary Ware5af85642015-12-21 12:09:17 -06007040 # ICC doesn't recognize the option, but only emits a warning
7041 ## XXX does it emit an unused result warning and can it be disabled?
7042 case "$CC" in
7043 *icc*)
7044 ac_cv_disable_unused_result_warning=no
7045 ;;
7046 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7048$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7049 ac_save_cc="$CC"
7050 CC="$CC -Wunused-result -Werror"
7051 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007052 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007053 $as_echo_n "(cached) " >&6
7054else
7055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7056/* end confdefs.h. */
7057
7058
7059int
7060main ()
7061{
7062
7063 ;
7064 return 0;
7065}
7066
7067_ACEOF
7068if ac_fn_c_try_compile "$LINENO"; then :
7069
7070 ac_cv_disable_unused_result_warning=yes
7071
7072else
7073
7074 ac_cv_disable_unused_result_warning=no
7075
7076fi
7077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7078fi
7079
7080 CFLAGS="$save_CFLAGS"
7081 CC="$ac_save_cc"
7082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7083$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007084 ;;
7085 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007086
7087 if test $ac_cv_disable_unused_result_warning = yes
7088 then
7089 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007090 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7091 fi
7092
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7094$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7095 ac_save_cc="$CC"
7096 CC="$CC -Wunused-parameter -Werror"
7097 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7098 $as_echo_n "(cached) " >&6
7099else
7100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7101/* end confdefs.h. */
7102
7103
7104int
7105main ()
7106{
7107
7108 ;
7109 return 0;
7110}
7111
7112_ACEOF
7113if ac_fn_c_try_compile "$LINENO"; then :
7114
7115 ac_cv_disable_unused_parameter_warning=yes
7116
7117else
7118
7119 ac_cv_disable_unused_parameter_warning=no
7120
7121fi
7122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7123fi
7124
7125 CC="$ac_save_cc"
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7127$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7128
7129 if test $ac_cv_disable_unused_parameter_warning = yes
7130 then
7131 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7132 fi
7133
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7135$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7136 ac_save_cc="$CC"
7137 CC="$CC -Wmissing-field-initializers -Werror"
7138 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7139 $as_echo_n "(cached) " >&6
7140else
7141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7142/* end confdefs.h. */
7143
7144
7145int
7146main ()
7147{
7148
7149 ;
7150 return 0;
7151}
7152
7153_ACEOF
7154if ac_fn_c_try_compile "$LINENO"; then :
7155
7156 ac_cv_disable_missing_field_initializers=yes
7157
7158else
7159
7160 ac_cv_disable_missing_field_initializers=no
7161
7162fi
7163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7164fi
7165
7166 CC="$ac_save_cc"
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7168$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7169
7170 if test $ac_cv_disable_missing_field_initializers = yes
7171 then
7172 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007173 fi
7174
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7176$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7177 ac_save_cc="$CC"
7178 CC="$CC -Wsign-compare"
7179 save_CFLAGS="$CFLAGS"
7180 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7181 $as_echo_n "(cached) " >&6
7182else
7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7184/* end confdefs.h. */
7185
7186
7187int
7188main ()
7189{
7190
7191 ;
7192 return 0;
7193}
7194
7195_ACEOF
7196if ac_fn_c_try_compile "$LINENO"; then :
7197
7198 ac_cv_enable_sign_compare_warning=yes
7199
7200else
7201
7202 ac_cv_enable_sign_compare_warning=no
7203
7204fi
7205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206fi
7207
7208 CFLAGS="$save_CFLAGS"
7209 CC="$ac_save_cc"
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7211$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7212
7213 if test $ac_cv_enable_sign_compare_warning = yes
7214 then
7215 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7216 fi
7217
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7219$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7220 ac_save_cc="$CC"
7221 CC="$CC -Wunreachable-code"
7222 save_CFLAGS="$CFLAGS"
7223 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7224 $as_echo_n "(cached) " >&6
7225else
7226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7227/* end confdefs.h. */
7228
7229
7230int
7231main ()
7232{
7233
7234 ;
7235 return 0;
7236}
7237
7238_ACEOF
7239if ac_fn_c_try_compile "$LINENO"; then :
7240
7241 ac_cv_enable_unreachable_code_warning=yes
7242
7243else
7244
7245 ac_cv_enable_unreachable_code_warning=no
7246
7247fi
7248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7249fi
7250
7251 CFLAGS="$save_CFLAGS"
7252 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007253
7254 # Don't enable unreachable code warning in debug mode, since it usually
7255 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007256 # Issue #24324: Unfortunately, the unreachable code warning does not work
7257 # correctly on gcc and has been silently removed from the compiler.
7258 # It is supported on clang but on OS X systems gcc may be an alias
7259 # for clang. Try to determine if the compiler is not really gcc and,
7260 # if so, only then enable the warning.
7261 if test $ac_cv_enable_unreachable_code_warning = yes && \
7262 test "$Py_DEBUG" != "true" && \
7263 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007264 then
7265 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007266 else
7267 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007268 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7270$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007271
INADA Naokie3364842018-06-05 20:40:53 +09007272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7273$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7274 ac_save_cc="$CC"
7275 CC="$CC -Werror -Wstrict-prototypes"
7276 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7277 $as_echo_n "(cached) " >&6
7278else
7279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7280/* end confdefs.h. */
7281
7282
7283int
7284main ()
7285{
7286
7287 ;
7288 return 0;
7289}
7290
7291_ACEOF
7292if ac_fn_c_try_compile "$LINENO"; then :
7293
7294 ac_cv_enable_strict_prototypes_warning=yes
7295
7296else
7297
7298 ac_cv_enable_strict_prototypes_warning=no
7299
7300fi
7301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7302fi
7303
7304 CC="$ac_save_cc"
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7306$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7307
7308 if test $ac_cv_enable_strict_prototypes_warning = yes
7309 then
7310 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7311 fi
7312
Victor Stinner193ee0a2017-02-06 14:24:00 +01007313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7314$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7315 ac_save_cc="$CC"
7316 CC="$CC -Werror=implicit-function-declaration"
7317 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7318 $as_echo_n "(cached) " >&6
7319else
7320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7321/* end confdefs.h. */
7322
7323
7324int
7325main ()
7326{
7327
7328 ;
7329 return 0;
7330}
7331
7332_ACEOF
7333if ac_fn_c_try_compile "$LINENO"; then :
7334
7335 ac_cv_enable_implicit_function_declaration_error=yes
7336
7337else
7338
7339 ac_cv_enable_implicit_function_declaration_error=no
7340
7341fi
7342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7343fi
7344
7345 CC="$ac_save_cc"
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7347$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7348
7349 if test $ac_cv_enable_implicit_function_declaration_error = yes
7350 then
7351 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7352 fi
7353
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007354 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7355 # support. Without this, treatment of subnormals doesn't follow
7356 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007357 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358 alpha*)
7359 BASECFLAGS="$BASECFLAGS -mieee"
7360 ;;
7361 esac
7362
7363 case $ac_sys_system in
7364 SCO_SV*)
7365 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7366 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007367
Ned Deily87adb6e2013-10-18 21:09:56 -07007368 Darwin*)
7369 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7370 # used to be here, but non-Apple gcc doesn't accept them.
7371 if test "${CC}" = gcc
7372 then
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007374$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007375 case "${UNIVERSALSDK}" in
7376 */MacOSX10.4u.sdk)
7377 # Build using 10.4 SDK, force usage of gcc when the
7378 # compiler is gcc, otherwise the user will get very
7379 # confusing error messages when building on OSX 10.6
7380 CC=gcc-4.0
7381 CPP=cpp-4.0
7382 ;;
7383 esac
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007385$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007386 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387
Ned Deily87adb6e2013-10-18 21:09:56 -07007388 if test "${enable_universalsdk}"
7389 then
7390 case "$UNIVERSAL_ARCHS" in
7391 32-bit)
7392 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7393 LIPO_32BIT_FLAGS=""
7394 ARCH_RUN_32BIT=""
7395 ;;
7396 64-bit)
7397 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7398 LIPO_32BIT_FLAGS=""
7399 ARCH_RUN_32BIT="true"
7400 ;;
7401 all)
7402 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7403 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7404 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7405 ;;
7406 intel)
7407 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7408 LIPO_32BIT_FLAGS="-extract i386"
7409 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7410 ;;
7411 intel-32)
7412 UNIVERSAL_ARCH_FLAGS="-arch i386"
7413 LIPO_32BIT_FLAGS=""
7414 ARCH_RUN_32BIT=""
7415 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007416 intel-64)
7417 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7418 LIPO_32BIT_FLAGS=""
7419 ARCH_RUN_32BIT="true"
7420 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007421 3-way)
7422 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7423 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7424 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7425 ;;
7426 *)
7427 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7428 ;;
7429 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430
Ned Deily87adb6e2013-10-18 21:09:56 -07007431 if test "${UNIVERSALSDK}" != "/"
7432 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007433 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7434 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007435 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007436 else
7437 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7438 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007439 fi
7440 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441
Ned Deily87adb6e2013-10-18 21:09:56 -07007442 # Calculate an appropriate deployment target for this build:
7443 # The deployment target value is used explicitly to enable certain
7444 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007445 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007446 # component of the string returned by distutils.get_platform().
7447 #
7448 # Use the value from:
7449 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7450 # 2. the operating system version of the build machine if >= 10.6
7451 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7452 # below to pick either 10.3, 10.4, or 10.5 as the target.
7453 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454
Ned Deily87adb6e2013-10-18 21:09:56 -07007455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7456$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007457 cur_target_major=`sw_vers -productVersion | \
7458 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7459 cur_target_minor=`sw_vers -productVersion | \
7460 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7461 cur_target="${cur_target_major}.${cur_target_minor}"
7462 if test ${cur_target_major} -eq 10 && \
7463 test ${cur_target_minor} -ge 3 && \
7464 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007465 then
Ned Deily36820b62014-06-25 13:44:22 -07007466 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007467 cur_target=10.3
7468 if test ${enable_universalsdk}
7469 then
7470 case "$UNIVERSAL_ARCHS" in
7471 all|3-way|intel|64-bit)
7472 # These configurations were first supported in 10.5
7473 cur_target='10.5'
7474 ;;
7475 esac
7476 else
7477 if test `/usr/bin/arch` = "i386"
7478 then
7479 # 10.4 was the first release to support Intel archs
7480 cur_target="10.4"
7481 fi
7482 fi
7483 fi
7484 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007485
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7487 # environment with a value that is the same as what we'll use
7488 # in the Makefile to ensure that we'll get the same compiler
7489 # environment during configure and build time.
7490 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7491 export MACOSX_DEPLOYMENT_TARGET
7492 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7494$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007495
Ned Deily87adb6e2013-10-18 21:09:56 -07007496 # end of Darwin* tests
7497 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498 esac
7499 ;;
7500
7501*)
7502 case $ac_sys_system in
7503 OpenUNIX*|UnixWare*)
7504 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7505 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506 SCO_SV*)
7507 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7508 ;;
7509 esac
7510 ;;
7511esac
7512
Zachary Ware5af85642015-12-21 12:09:17 -06007513# ICC needs -fp-model strict or floats behave badly
7514case "$CC" in
7515*icc*)
7516 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7517 ;;
7518esac
7519
T. Woutersddbfa2c2017-05-23 01:30:49 +02007520if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521 :
7522else
7523 OPT="-DNDEBUG $OPT"
7524fi
7525
7526if test "$ac_arch_flags"
7527then
7528 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7529fi
7530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531# On some compilers, pthreads are available without further options
7532# (e.g. MacOS X). On some of these systems, the compiler will not
7533# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7534# So we have to see first whether pthreads are available without
7535# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7537$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007538if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540else
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542 ac_cv_pthread_is_default=no
7543else
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545/* end confdefs.h. */
7546
Stefan Krah7dba5942012-11-22 22:49:11 +01007547#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548#include <pthread.h>
7549
7550void* routine(void* p){return NULL;}
7551
7552int main(){
7553 pthread_t p;
7554 if(pthread_create(&p,NULL,routine,NULL)!=0)
7555 return 1;
7556 (void)pthread_detach(p);
7557 return 0;
7558}
7559
7560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007561if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562
7563 ac_cv_pthread_is_default=yes
7564 ac_cv_kthread=no
7565 ac_cv_pthread=no
7566
7567else
Matthias Kloseb9621712010-04-24 17:59:49 +00007568 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572fi
7573
7574
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575fi
7576
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7578$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579
7580
7581if test $ac_cv_pthread_is_default = yes
7582then
7583 ac_cv_kpthread=no
7584else
7585# -Kpthread, if available, provides the right #defines
7586# and linker options to make pthread_create available
7587# Some compilers won't report that they do not support -Kpthread,
7588# so we need to run a program to see whether it really made the
7589# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7591$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007592if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007593 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594else
7595 ac_save_cc="$CC"
7596CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007597if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598 ac_cv_kpthread=no
7599else
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601/* end confdefs.h. */
7602
Stefan Krah7dba5942012-11-22 22:49:11 +01007603#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604#include <pthread.h>
7605
7606void* routine(void* p){return NULL;}
7607
7608int main(){
7609 pthread_t p;
7610 if(pthread_create(&p,NULL,routine,NULL)!=0)
7611 return 1;
7612 (void)pthread_detach(p);
7613 return 0;
7614}
7615
7616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007617if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618 ac_cv_kpthread=yes
7619else
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7623 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624fi
7625
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626CC="$ac_save_cc"
7627fi
7628
Matthias Kloseb9621712010-04-24 17:59:49 +00007629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7630$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631fi
7632
7633if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7634then
7635# -Kthread, if available, provides the right #defines
7636# and linker options to make pthread_create available
7637# Some compilers won't report that they do not support -Kthread,
7638# so we need to run a program to see whether it really made the
7639# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7641$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007642if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644else
7645 ac_save_cc="$CC"
7646CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007647if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648 ac_cv_kthread=no
7649else
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651/* end confdefs.h. */
7652
Stefan Krah7dba5942012-11-22 22:49:11 +01007653#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654#include <pthread.h>
7655
7656void* routine(void* p){return NULL;}
7657
7658int main(){
7659 pthread_t p;
7660 if(pthread_create(&p,NULL,routine,NULL)!=0)
7661 return 1;
7662 (void)pthread_detach(p);
7663 return 0;
7664}
7665
7666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007667if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668 ac_cv_kthread=yes
7669else
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674fi
7675
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676CC="$ac_save_cc"
7677fi
7678
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7680$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681fi
7682
7683if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7684then
7685# -pthread, if available, provides the right #defines
7686# and linker options to make pthread_create available
7687# Some compilers won't report that they do not support -pthread,
7688# so we need to run a program to see whether it really made the
7689# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7691$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007692if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694else
7695 ac_save_cc="$CC"
7696CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007697if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698 ac_cv_pthread=no
7699else
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701/* end confdefs.h. */
7702
Stefan Krah7dba5942012-11-22 22:49:11 +01007703#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704#include <pthread.h>
7705
7706void* routine(void* p){return NULL;}
7707
7708int main(){
7709 pthread_t p;
7710 if(pthread_create(&p,NULL,routine,NULL)!=0)
7711 return 1;
7712 (void)pthread_detach(p);
7713 return 0;
7714}
7715
7716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007717if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718 ac_cv_pthread=yes
7719else
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724fi
7725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726CC="$ac_save_cc"
7727fi
7728
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7730$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731fi
7732
7733# If we have set a CC compiler flag for thread support then
7734# check if it works for CXX, too.
7735ac_cv_cxx_thread=no
7736if test ! -z "$CXX"
7737then
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7739$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007740ac_save_cxx="$CXX"
7741
7742if test "$ac_cv_kpthread" = "yes"
7743then
7744 CXX="$CXX -Kpthread"
7745 ac_cv_cxx_thread=yes
7746elif test "$ac_cv_kthread" = "yes"
7747then
7748 CXX="$CXX -Kthread"
7749 ac_cv_cxx_thread=yes
7750elif test "$ac_cv_pthread" = "yes"
7751then
7752 CXX="$CXX -pthread"
7753 ac_cv_cxx_thread=yes
7754fi
7755
7756if test $ac_cv_cxx_thread = yes
7757then
7758 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7759 $CXX -c conftest.$ac_ext 2>&5
7760 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7761 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7762 then
7763 ac_cv_cxx_thread=yes
7764 else
7765 ac_cv_cxx_thread=no
7766 fi
7767 rm -fr conftest*
7768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7770$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771fi
7772CXX="$ac_save_cxx"
7773
7774
7775# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7777$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007778if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780else
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782/* end confdefs.h. */
7783#include <stdlib.h>
7784#include <stdarg.h>
7785#include <string.h>
7786#include <float.h>
7787
7788int
7789main ()
7790{
7791
7792 ;
7793 return 0;
7794}
7795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007796if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007797 ac_cv_header_stdc=yes
7798else
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007800fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7802
7803if test $ac_cv_header_stdc = yes; then
7804 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007806/* end confdefs.h. */
7807#include <string.h>
7808
7809_ACEOF
7810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007811 $EGREP "memchr" >/dev/null 2>&1; then :
7812
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813else
7814 ac_cv_header_stdc=no
7815fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007816rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007817
7818fi
7819
7820if test $ac_cv_header_stdc = yes; then
7821 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823/* end confdefs.h. */
7824#include <stdlib.h>
7825
7826_ACEOF
7827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 $EGREP "free" >/dev/null 2>&1; then :
7829
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830else
7831 ac_cv_header_stdc=no
7832fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007833rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007834
7835fi
7836
7837if test $ac_cv_header_stdc = yes; then
7838 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007840 :
7841else
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843/* end confdefs.h. */
7844#include <ctype.h>
7845#include <stdlib.h>
7846#if ((' ' & 0x0FF) == 0x020)
7847# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7848# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7849#else
7850# define ISLOWER(c) \
7851 (('a' <= (c) && (c) <= 'i') \
7852 || ('j' <= (c) && (c) <= 'r') \
7853 || ('s' <= (c) && (c) <= 'z'))
7854# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7855#endif
7856
7857#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7858int
7859main ()
7860{
7861 int i;
7862 for (i = 0; i < 256; i++)
7863 if (XOR (islower (i), ISLOWER (i))
7864 || toupper (i) != TOUPPER (i))
7865 return 2;
7866 return 0;
7867}
7868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007869if ac_fn_c_try_run "$LINENO"; then :
7870
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007871else
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876fi
7877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007878fi
7879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7881$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882if test $ac_cv_header_stdc = yes; then
7883
Matthias Kloseb9621712010-04-24 17:59:49 +00007884$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885
7886fi
7887
stratakise768c862018-01-23 16:11:24 +01007888for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007889fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007890ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007891sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007892utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007893poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007894sys/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 +01007895sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007896sys/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 +01007897sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007898sys/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 -07007899libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007900linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007901sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007902do :
7903 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7904ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007905if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007906 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007907#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007908_ACEOF
7909
7910fi
7911
Guido van Rossum627b2d71993-12-24 10:39:16 +00007912done
7913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007914ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007915for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7918$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007919if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007920 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007923/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007924#include <sys/types.h>
7925#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007926
Martin v. Löwis11437992002-04-12 09:54:03 +00007927int
7928main ()
7929{
7930if ((DIR *) 0)
7931return 0;
7932 ;
7933 return 0;
7934}
7935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007938else
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943eval ac_res=\$$as_ac_Header
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7945$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007946if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007948#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007949_ACEOF
7950
7951ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007954done
7955# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7956if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7958$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007959if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007961else
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966/* Override any GCC internal prototype to avoid an error.
7967 Use char because int might match the return type of a GCC
7968 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007969#ifdef __cplusplus
7970extern "C"
7971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007972char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007973int
7974main ()
7975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 ;
7978 return 0;
7979}
7980_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981for ac_lib in '' dir; do
7982 if test -z "$ac_lib"; then
7983 ac_res="none required"
7984 else
7985 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007991rm -f core conftest.err conftest.$ac_objext \
7992 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007993 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996done
Victor Stinnere0be4232011-10-25 13:06:09 +02007997if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999else
8000 ac_cv_search_opendir=no
8001fi
8002rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008003LIBS=$ac_func_search_save_LIBS
8004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8006$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008008if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008010
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008011fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008012
Michael W. Hudson54241132001-12-07 15:38:26 +00008013else
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8015$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008016if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008018else
8019 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023/* Override any GCC internal prototype to avoid an error.
8024 Use char because int might match the return type of a GCC
8025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008026#ifdef __cplusplus
8027extern "C"
8028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008029char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008030int
8031main ()
8032{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008034 ;
8035 return 0;
8036}
8037_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038for ac_lib in '' x; do
8039 if test -z "$ac_lib"; then
8040 ac_res="none required"
8041 else
8042 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008043 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048rm -f core conftest.err conftest.$ac_objext \
8049 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008050 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053done
Victor Stinnere0be4232011-10-25 13:06:09 +02008054if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056else
8057 ac_cv_search_opendir=no
8058fi
8059rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008060LIBS=$ac_func_search_save_LIBS
8061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8063$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008065if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008068fi
8069
8070fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008071
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8073$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008074if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008076else
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008078/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008079#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008080int
8081main ()
8082{
8083return makedev(0, 0);
8084 ;
8085 return 0;
8086}
8087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008089 ac_cv_header_sys_types_h_makedev=yes
8090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093rm -f core conftest.err conftest.$ac_objext \
8094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008095
8096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8098$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008099
8100if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008101ac_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 +02008102if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008105
8106fi
8107
8108
8109
8110 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 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 +02008112if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008113
Matthias Kloseb9621712010-04-24 17:59:49 +00008114$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008115
8116fi
8117
8118
8119 fi
8120fi
8121
Michael W. Hudson54241132001-12-07 15:38:26 +00008122
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008123# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8124# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8125SAVE_CFLAGS=$CFLAGS
8126CFLAGS="-std=c99 $CFLAGS"
8127for ac_header in bluetooth/bluetooth.h
8128do :
8129 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8130if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8131 cat >>confdefs.h <<_ACEOF
8132#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8133_ACEOF
8134
8135fi
8136
8137done
8138
8139CFLAGS=$SAVE_CFLAGS
8140
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008141# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8142for ac_header in net/if.h
8143do :
8144 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8145#ifdef STDC_HEADERS
8146# include <stdlib.h>
8147# include <stddef.h>
8148#else
8149# ifdef HAVE_STDLIB_H
8150# include <stdlib.h>
8151# endif
8152#endif
8153#ifdef HAVE_SYS_SOCKET_H
8154# include <sys/socket.h>
8155#endif
8156
8157"
Victor Stinnere0be4232011-10-25 13:06:09 +02008158if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008159 cat >>confdefs.h <<_ACEOF
8160#define HAVE_NET_IF_H 1
8161_ACEOF
8162
8163fi
8164
8165done
8166
8167
Martin v. Löwis11017b12006-01-14 18:12:57 +00008168# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008169for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008170do :
8171 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 +00008172#ifdef HAVE_ASM_TYPES_H
8173#include <asm/types.h>
8174#endif
8175#ifdef HAVE_SYS_SOCKET_H
8176#include <sys/socket.h>
8177#endif
8178
Matthias Kloseb9621712010-04-24 17:59:49 +00008179"
Victor Stinnere0be4232011-10-25 13:06:09 +02008180if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008181 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008182#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008183_ACEOF
8184
8185fi
8186
8187done
8188
8189
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008190# On Linux, qrtr.h requires asm/types.h
8191for ac_header in linux/qrtr.h
8192do :
8193 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8194#ifdef HAVE_ASM_TYPES_H
8195#include <asm/types.h>
8196#endif
8197#ifdef HAVE_SYS_SOCKET_H
8198#include <sys/socket.h>
8199#endif
8200
8201"
8202if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8203 cat >>confdefs.h <<_ACEOF
8204#define HAVE_LINUX_QRTR_H 1
8205_ACEOF
8206
8207fi
8208
8209done
8210
8211
caaveryeffc12f2017-09-06 18:18:10 -04008212for ac_header in linux/vm_sockets.h
8213do :
8214 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8215#ifdef HAVE_SYS_SOCKET_H
8216#include <sys/socket.h>
8217#endif
8218
8219"
8220if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8221 cat >>confdefs.h <<_ACEOF
8222#define HAVE_LINUX_VM_SOCKETS_H 1
8223_ACEOF
8224
8225fi
8226
8227done
8228
8229
Charles-François Natali47413c12011-10-06 19:47:44 +02008230# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008231for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008232do :
8233 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8234ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8235#ifdef HAVE_SYS_SOCKET_H
8236#include <sys/socket.h>
8237#endif
8238
8239"
8240if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8241 cat >>confdefs.h <<_ACEOF
8242#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8243_ACEOF
8244
8245fi
8246
8247done
8248
8249
Guido van Rossum627b2d71993-12-24 10:39:16 +00008250# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008251was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8253$as_echo_n "checking for clock_t in time.h... " >&6; }
8254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008255/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008256#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
8258_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008259if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008261 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008262else
Martin v. Löwis11437992002-04-12 09:54:03 +00008263
8264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008266
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008267
Guido van Rossum627b2d71993-12-24 10:39:16 +00008268fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008269rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008270
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8272$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8275$as_echo_n "checking for makedev... " >&6; }
8276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008277/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008278
Jesus Cea740f53a2010-04-28 11:35:30 +00008279#if defined(MAJOR_IN_MKDEV)
8280#include <sys/mkdev.h>
8281#elif defined(MAJOR_IN_SYSMACROS)
8282#include <sys/sysmacros.h>
8283#else
8284#include <sys/types.h>
8285#endif
8286
Neal Norwitz11690112002-07-30 01:08:28 +00008287int
8288main ()
8289{
Jesus Cea740f53a2010-04-28 11:35:30 +00008290
8291 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008292 ;
8293 return 0;
8294}
Matthias Kloseb159a552010-04-25 21:00:44 +00008295
Neal Norwitz11690112002-07-30 01:08:28 +00008296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008297if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008298 ac_cv_has_makedev=yes
8299else
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302rm -f core conftest.err conftest.$ac_objext \
8303 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8305$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008306if test "$ac_cv_has_makedev" = "yes"; then
8307
Matthias Kloseb9621712010-04-24 17:59:49 +00008308$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008309
8310fi
8311
Christian Heimes985ecdc2013-11-20 11:46:18 +01008312# byte swapping
8313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8314$as_echo_n "checking for le64toh... " >&6; }
8315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8316/* end confdefs.h. */
8317
8318#ifdef HAVE_ENDIAN_H
8319#include <endian.h>
8320#elif defined(HAVE_SYS_ENDIAN_H)
8321#include <sys/endian.h>
8322#endif
8323
8324int
8325main ()
8326{
8327
8328 le64toh(1)
8329 ;
8330 return 0;
8331}
8332
8333_ACEOF
8334if ac_fn_c_try_link "$LINENO"; then :
8335 ac_cv_has_le64toh=yes
8336else
8337 ac_cv_has_le64toh=no
8338fi
8339rm -f core conftest.err conftest.$ac_objext \
8340 conftest$ac_exeext conftest.$ac_ext
8341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8342$as_echo "$ac_cv_has_le64toh" >&6; }
8343if test "$ac_cv_has_le64toh" = "yes"; then
8344
8345$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8346
8347fi
8348
Martin v. Löwis399a6892002-10-04 10:22:02 +00008349use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008350# Don't use largefile support for GNU/Hurd
8351case $ac_sys_system in GNU*)
8352 use_lfs=no
8353esac
8354
Martin v. Löwis399a6892002-10-04 10:22:02 +00008355if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008356# Two defines needed to enable largefile support on various platforms
8357# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008358case $ac_sys_system/$ac_sys_release in
8359AIX*)
8360
8361$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8362
8363 ;;
8364esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008367
8368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008370
Martin v. Löwis399a6892002-10-04 10:22:02 +00008371fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008372
Guido van Rossum84e7b241996-08-19 21:59:00 +00008373# Add some code to confdefs.h so that the test for off_t works on SCO
8374cat >> confdefs.h <<\EOF
8375#if defined(SCO_DS)
8376#undef _OFF_T
8377#endif
8378EOF
8379
Guido van Rossumef2255b2000-03-10 22:30:29 +00008380# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008381ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008382if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008384else
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
8386cat >>confdefs.h <<_ACEOF
8387#define mode_t int
8388_ACEOF
8389
8390fi
8391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008393if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008395else
Martin v. Löwis11437992002-04-12 09:54:03 +00008396
8397cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008399_ACEOF
8400
8401fi
8402
Matthias Kloseb9621712010-04-24 17:59:49 +00008403ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008404if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008405
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008406else
Martin v. Löwis11437992002-04-12 09:54:03 +00008407
8408cat >>confdefs.h <<_ACEOF
8409#define pid_t int
8410_ACEOF
8411
8412fi
8413
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008414
Martin v. Löwis11437992002-04-12 09:54:03 +00008415cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008416#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008417_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008418
Matthias Kloseb9621712010-04-24 17:59:49 +00008419ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008420if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008421
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008422else
Martin v. Löwis11437992002-04-12 09:54:03 +00008423
8424cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008426_ACEOF
8427
8428fi
8429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8431$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008432if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008434else
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008436/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008437#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
8439_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008442 ac_cv_type_uid_t=yes
8443else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008444 ac_cv_type_uid_t=no
8445fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008446rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008447
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8450$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008451if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008452
Matthias Kloseb9621712010-04-24 17:59:49 +00008453$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
8455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008457
8458fi
8459
Mark Dickinson983bc162012-12-02 12:11:38 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008462if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463
Matthias Kloseb9621712010-04-24 17:59:49 +00008464$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008465
8466fi
8467
Stefan Krah1919b7e2012-03-21 18:25:23 +01008468ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8469if test "x$ac_cv_type___uint128_t" = xyes; then :
8470
8471$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8472
8473fi
8474
Jack Jansendd19cf82001-12-06 22:36:17 +00008475
Michael W. Hudson54241132001-12-07 15:38:26 +00008476# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008477# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478# The cast to long int works around a bug in the HP C Compiler
8479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8481# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8483$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008484if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 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 +00008488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489else
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 if test "$ac_cv_type_int" = yes; then
8491 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008493as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008494See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 else
8496 ac_cv_sizeof_int=0
8497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8502$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
8504
8505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008507#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008508_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008509
8510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511# The cast to long int works around a bug in the HP C Compiler
8512# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8513# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8514# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8516$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008517if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008519else
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 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 +00008521
Martin v. Löwis11437992002-04-12 09:54:03 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 if test "$ac_cv_type_long" = yes; then
8524 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008526as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008527See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528 else
8529 ac_cv_sizeof_long=0
8530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8535$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536
8537
8538
Martin v. Löwis11437992002-04-12 09:54:03 +00008539cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008540#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008541_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008542
8543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544# The cast to long int works around a bug in the HP C Compiler
8545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8547# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8549$as_echo_n "checking size of long long... " >&6; }
8550if ${ac_cv_sizeof_long_long+:} false; then :
8551 $as_echo_n "(cached) " >&6
8552else
8553 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8554
8555else
8556 if test "$ac_cv_type_long_long" = yes; then
8557 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8559as_fn_error 77 "cannot compute sizeof (long long)
8560See \`config.log' for more details" "$LINENO" 5; }
8561 else
8562 ac_cv_sizeof_long_long=0
8563 fi
8564fi
8565
8566fi
8567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8568$as_echo "$ac_cv_sizeof_long_long" >&6; }
8569
8570
8571
8572cat >>confdefs.h <<_ACEOF
8573#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8574_ACEOF
8575
8576
8577# The cast to long int works around a bug in the HP C Compiler
8578# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8579# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8580# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8582$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008583if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 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 +00008587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 if test "$ac_cv_type_void_p" = yes; then
8590 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008592as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008593See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 else
8595 ac_cv_sizeof_void_p=0
8596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8601$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602
8603
8604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008606#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008607_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008608
8609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610# The cast to long int works around a bug in the HP C Compiler
8611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8613# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8615$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008616if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 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 +00008620
Martin v. Löwis11437992002-04-12 09:54:03 +00008621else
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 if test "$ac_cv_type_short" = yes; then
8623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008625as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008626See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 else
8628 ac_cv_sizeof_short=0
8629 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8634$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635
8636
8637
Martin v. Löwis11437992002-04-12 09:54:03 +00008638cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008639#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008640_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008641
8642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643# The cast to long int works around a bug in the HP C Compiler
8644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8646# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8648$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008649if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 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 +00008653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654else
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 if test "$ac_cv_type_float" = yes; then
8656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008658as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008659See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660 else
8661 ac_cv_sizeof_float=0
8662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8667$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668
8669
8670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008672#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008673_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008674
8675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676# The cast to long int works around a bug in the HP C Compiler
8677# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8678# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8679# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8681$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008682if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 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 +00008686
Martin v. Löwis11437992002-04-12 09:54:03 +00008687else
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 if test "$ac_cv_type_double" = yes; then
8689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008691as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008692See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693 else
8694 ac_cv_sizeof_double=0
8695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697
Martin v. Löwis11437992002-04-12 09:54:03 +00008698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8700$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701
8702
8703
Martin v. Löwis11437992002-04-12 09:54:03 +00008704cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008705#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008706_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008707
8708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709# The cast to long int works around a bug in the HP C Compiler
8710# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8711# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8712# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8714$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008715if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 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 +00008719
Martin v. Löwis11437992002-04-12 09:54:03 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 if test "$ac_cv_type_fpos_t" = yes; then
8722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008724as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008725See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008726 else
8727 ac_cv_sizeof_fpos_t=0
8728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730
Martin v. Löwis11437992002-04-12 09:54:03 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8733$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734
8735
8736
Martin v. Löwis11437992002-04-12 09:54:03 +00008737cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008738#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008739_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008740
Michael W. Hudson54241132001-12-07 15:38:26 +00008741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008742# The cast to long int works around a bug in the HP C Compiler
8743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8745# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8747$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008748if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 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 +00008752
Martin v. Löwis18e16552006-02-15 17:27:45 +00008753else
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 if test "$ac_cv_type_size_t" = yes; then
8755 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008757as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008758See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759 else
8760 ac_cv_sizeof_size_t=0
8761 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008763
Martin v. Löwis18e16552006-02-15 17:27:45 +00008764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8766$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767
8768
8769
Martin v. Löwis18e16552006-02-15 17:27:45 +00008770cat >>confdefs.h <<_ACEOF
8771#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8772_ACEOF
8773
8774
Christian Heimes400adb02008-02-01 08:12:03 +00008775# The cast to long int works around a bug in the HP C Compiler
8776# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8777# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8778# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8780$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008781if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 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 +00008785
Christian Heimes400adb02008-02-01 08:12:03 +00008786else
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 if test "$ac_cv_type_pid_t" = yes; then
8788 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8789$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008790as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008791See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008792 else
8793 ac_cv_sizeof_pid_t=0
8794 fi
8795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796
Christian Heimes400adb02008-02-01 08:12:03 +00008797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8799$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008800
8801
8802
8803cat >>confdefs.h <<_ACEOF
8804#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8805_ACEOF
8806
8807
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008808# The cast to long int works around a bug in the HP C Compiler
8809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8811# This bug is HP SR number 8606223364.
8812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8813$as_echo_n "checking size of uintptr_t... " >&6; }
8814if ${ac_cv_sizeof_uintptr_t+:} false; then :
8815 $as_echo_n "(cached) " >&6
8816else
8817 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8818
8819else
8820 if test "$ac_cv_type_uintptr_t" = yes; then
8821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8823as_fn_error 77 "cannot compute sizeof (uintptr_t)
8824See \`config.log' for more details" "$LINENO" 5; }
8825 else
8826 ac_cv_sizeof_uintptr_t=0
8827 fi
8828fi
8829
8830fi
8831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8832$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8833
8834
8835
8836cat >>confdefs.h <<_ACEOF
8837#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8838_ACEOF
8839
8840
Michael W. Hudson54241132001-12-07 15:38:26 +00008841
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008842
Eitan Adler3055c942018-05-15 22:58:09 -07008843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8844$as_echo_n "checking for long double... " >&6; }
8845if ${ac_cv_type_long_double+:} false; then :
8846 $as_echo_n "(cached) " >&6
8847else
8848 if test "$GCC" = yes; then
8849 ac_cv_type_long_double=yes
8850 else
8851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8852/* end confdefs.h. */
8853/* The Stardent Vistra knows sizeof (long double), but does
8854 not support it. */
8855 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008856int
8857main ()
8858{
Eitan Adler3055c942018-05-15 22:58:09 -07008859static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8860 sizeof (double) <= sizeof (long double))];
8861test_array [0] = 0;
8862return test_array [0];
8863
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008864 ;
8865 return 0;
8866}
8867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008868if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008869 ac_cv_type_long_double=yes
8870else
8871 ac_cv_type_long_double=no
8872fi
8873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8874 fi
8875fi
8876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8877$as_echo "$ac_cv_type_long_double" >&6; }
8878 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008879
Matthias Kloseb9621712010-04-24 17:59:49 +00008880$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008881
Eitan Adler3055c942018-05-15 22:58:09 -07008882 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008883
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008884# The cast to long int works around a bug in the HP C Compiler
8885# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8886# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8887# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8889$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008890if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008892else
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 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 +00008894
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895else
Matthias Kloseb9621712010-04-24 17:59:49 +00008896 if test "$ac_cv_type_long_double" = yes; then
8897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008899as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008900See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008901 else
8902 ac_cv_sizeof_long_double=0
8903 fi
8904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8908$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008909
8910
8911
8912cat >>confdefs.h <<_ACEOF
8913#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8914_ACEOF
8915
8916
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918# The cast to long int works around a bug in the HP C Compiler
8919# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8920# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8921# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8923$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008924if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008926else
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 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 +00008928
Thomas Woutersb2137042007-02-01 18:02:27 +00008929else
Matthias Kloseb9621712010-04-24 17:59:49 +00008930 if test "$ac_cv_type__Bool" = yes; then
8931 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008933as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008934See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008935 else
8936 ac_cv_sizeof__Bool=0
8937 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008939
Thomas Woutersb2137042007-02-01 18:02:27 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8942$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943
8944
8945
Thomas Woutersb2137042007-02-01 18:02:27 +00008946cat >>confdefs.h <<_ACEOF
8947#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8948_ACEOF
8949
8950
Thomas Woutersb2137042007-02-01 18:02:27 +00008951
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952# The cast to long int works around a bug in the HP C Compiler
8953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8955# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8957$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008958if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962#ifdef HAVE_SYS_TYPES_H
8963#include <sys/types.h>
8964#endif
8965
Matthias Kloseb9621712010-04-24 17:59:49 +00008966"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008967
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968else
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 if test "$ac_cv_type_off_t" = yes; then
8970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008972as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008973See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974 else
8975 ac_cv_sizeof_off_t=0
8976 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008978
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8981$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008982
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008983
8984
Martin v. Löwis11437992002-04-12 09:54:03 +00008985cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008986#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008987_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008988
Michael W. Hudson54241132001-12-07 15:38:26 +00008989
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008990
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8992$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008993if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008994 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008995
Matthias Kloseb9621712010-04-24 17:59:49 +00008996$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008997
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8999$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009000else
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9002$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009003fi
9004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005# The cast to long int works around a bug in the HP C Compiler
9006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9008# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9010$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009011if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013else
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015#ifdef HAVE_SYS_TYPES_H
9016#include <sys/types.h>
9017#endif
9018#ifdef HAVE_TIME_H
9019#include <time.h>
9020#endif
9021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009024else
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 if test "$ac_cv_type_time_t" = yes; then
9026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009028as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009029See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009030 else
9031 ac_cv_sizeof_time_t=0
9032 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9037$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009038
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009039
9040
Martin v. Löwis11437992002-04-12 09:54:03 +00009041cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009042#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009043_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009044
Michael W. Hudson54241132001-12-07 15:38:26 +00009045
9046
Trent Mick635f6fb2000-08-23 21:33:05 +00009047# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009048ac_save_cc="$CC"
9049if test "$ac_cv_kpthread" = "yes"
9050then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009051elif test "$ac_cv_kthread" = "yes"
9052then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009053elif test "$ac_cv_pthread" = "yes"
9054then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009055fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009056
Matthias Kloseb9621712010-04-24 17:59:49 +00009057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9058$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009059have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009061/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009062
9063 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009064int
9065main ()
9066{
Guido van Rossum12580492000-09-24 16:47:19 +00009067pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009068 ;
9069 return 0;
9070}
Matthias Kloseb159a552010-04-25 21:00:44 +00009071
Martin v. Löwis11437992002-04-12 09:54:03 +00009072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009073if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009074 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9078$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009079if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009081# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9082# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9083# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9085$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009086if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009088else
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009090#ifdef HAVE_PTHREAD_H
9091#include <pthread.h>
9092#endif
9093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009096else
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 if test "$ac_cv_type_pthread_t" = yes; then
9098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009100as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009101See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102 else
9103 ac_cv_sizeof_pthread_t=0
9104 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009106
Trent Mick635f6fb2000-08-23 21:33:05 +00009107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9109$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009110
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009111
9112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009114#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009115_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009117
Trent Mick635f6fb2000-08-23 21:33:05 +00009118fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009119
9120# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9121# This checking will be unnecessary after removing deprecated TLS API.
9122# The cast to long int works around a bug in the HP C Compiler
9123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9125# This bug is HP SR number 8606223364.
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9127$as_echo_n "checking size of pthread_key_t... " >&6; }
9128if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9129 $as_echo_n "(cached) " >&6
9130else
9131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9132"; then :
9133
9134else
9135 if test "$ac_cv_type_pthread_key_t" = yes; then
9136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9138as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9139See \`config.log' for more details" "$LINENO" 5; }
9140 else
9141 ac_cv_sizeof_pthread_key_t=0
9142 fi
9143fi
9144
9145fi
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9147$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9148
9149
9150
9151cat >>confdefs.h <<_ACEOF
9152#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9153_ACEOF
9154
9155
9156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9157$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9158if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9160/* end confdefs.h. */
9161#include <pthread.h>
9162int
9163main ()
9164{
9165pthread_key_t k; k * 1;
9166 ;
9167 return 0;
9168}
9169_ACEOF
9170if ac_fn_c_try_compile "$LINENO"; then :
9171 ac_pthread_key_t_is_arithmetic_type=yes
9172else
9173 ac_pthread_key_t_is_arithmetic_type=no
9174
9175fi
9176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9178$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9179 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9180
9181$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9182
9183 fi
9184else
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9186$as_echo "no" >&6; }
9187fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009188CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009189
Michael W. Hudson54241132001-12-07 15:38:26 +00009190
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009191case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009192 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009193 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9194 ;;
9195 Darwin/*)
9196 OTHER_LIBTOOL_OPT=""
9197 ;;
9198esac
9199
9200
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009201
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009202case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009203 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009204 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9205 if test "${enable_universalsdk}"; then
9206 :
9207 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009208 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009209 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009210 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009211 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009212 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009213 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009214 if test ${gcc_version} '<' 4.0
9215 then
9216 LIBTOOL_CRUFT="-lcc_dynamic"
9217 else
9218 LIBTOOL_CRUFT=""
9219 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009220 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009221 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009222else
Matthias Kloseb9621712010-04-24 17:59:49 +00009223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009224/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009225
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009226 #include <unistd.h>
9227 int main(int argc, char*argv[])
9228 {
9229 if (sizeof(long) == 4) {
9230 return 0;
9231 } else {
9232 return 1;
9233 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009234 }
9235
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009237if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009238 ac_osx_32bit=yes
9239else
Matthias Kloseb9621712010-04-24 17:59:49 +00009240 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009244fi
9245
9246
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009248 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009249 i386)
9250 MACOSX_DEFAULT_ARCH="i386"
9251 ;;
9252 ppc)
9253 MACOSX_DEFAULT_ARCH="ppc"
9254 ;;
9255 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009256 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009257 ;;
9258 esac
9259 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009260 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009261 i386)
9262 MACOSX_DEFAULT_ARCH="x86_64"
9263 ;;
9264 ppc)
9265 MACOSX_DEFAULT_ARCH="ppc64"
9266 ;;
9267 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009268 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269 ;;
9270 esac
9271
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009272 fi
9273
9274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009275 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009276 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009277esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9279$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009280if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009281then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009282 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009284 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009285
Matthias Kloseb9621712010-04-24 17:59:49 +00009286$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009287
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9289$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009290 if test $enable_shared = "yes"
9291 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009292 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 +00009293 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009294else
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9296$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297fi
9298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9300$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009301case $ac_sys_system/$ac_sys_release in
9302 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303
Matthias Kloseb9621712010-04-24 17:59:49 +00009304$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009305
Matthias Kloseb9621712010-04-24 17:59:49 +00009306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9307$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009308 ;;
9309 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9311$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009312 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009313esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009314
Guido van Rossum0a516c91994-09-12 10:58:40 +00009315# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316
Michael W. Hudson54241132001-12-07 15:38:26 +00009317
9318
9319
9320
Benjamin Peterson99f03762010-04-11 22:15:28 +00009321
Thomas Wouters477c8d52006-05-27 19:21:47 +00009322
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009323# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9324# -- usually .so, .sl on HP-UX, .dll on Cygwin
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9326$as_echo_n "checking the extension of shared libraries... " >&6; }
9327if test -z "$SHLIB_SUFFIX"; then
9328 case $ac_sys_system in
9329 hp*|HP*)
9330 case `uname -m` in
9331 ia64) SHLIB_SUFFIX=.so;;
9332 *) SHLIB_SUFFIX=.sl;;
9333 esac
9334 ;;
9335 CYGWIN*) SHLIB_SUFFIX=.dll;;
9336 *) SHLIB_SUFFIX=.so;;
9337 esac
9338fi
9339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9340$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009341
Guido van Rossum0a516c91994-09-12 10:58:40 +00009342# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009343# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009344# (Shared libraries in this instance are shared modules to be loaded into
9345# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9347$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009348if test -z "$LDSHARED"
9349then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009350 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009351 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009352 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009353 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009354 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009356 if test "$GCC" = "yes" ; then
9357 LDSHARED='$(CC) -shared'
9358 LDCXXSHARED='$(CXX) -shared'
9359 else
9360 LDSHARED='$(CC) -G'
9361 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009362 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009363 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009364 if test "$GCC" = "yes" ; then
9365 LDSHARED='$(CC) -shared'
9366 LDCXXSHARED='$(CXX) -shared'
9367 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009368 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009369 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009370 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009371 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009372 LDSHARED='$(CC) -bundle'
9373 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009374 if test "$enable_framework" ; then
9375 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009376 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9377 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009378 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009379 else
9380 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009381 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009382 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009383 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009384 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009385 LDSHARED='$(CC) -bundle'
9386 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009387 if test "$enable_framework" ; then
9388 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009389 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9390 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009391 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009392 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009393 # No framework, use the Python app as bundle-loader
9394 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009395 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009396 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009397 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009398 Darwin/*)
9399 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9400 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009401
Ned Deily36820b62014-06-25 13:44:22 -07009402 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9403 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9404 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9405 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9406 if test ${dep_target_major} -eq 10 && \
9407 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009408 then
Ned Deily36820b62014-06-25 13:44:22 -07009409 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009410 LDSHARED='$(CC) -bundle'
9411 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009412 if test "$enable_framework" ; then
9413 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009414 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9415 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009416 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009417 else
9418 # No framework, use the Python app as bundle-loader
9419 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9420 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009421 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009422 fi
Ned Deily36820b62014-06-25 13:44:22 -07009423 else
9424 # building for OS X 10.3 and later
9425 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9426 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9427 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009428 fi
9429 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009430 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009431 LDSHARED='$(CC) -shared'
9432 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009433 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009434 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009435 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009436 LDSHARED='$(CC) -shared'
9437 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009438 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009439 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009440 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009441 OpenBSD*)
9442 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9443 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009444 LDSHARED='$(CC) -shared $(CCSHARED)'
9445 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009446 else
9447 case `uname -r` in
9448 [01].* | 2.[0-7] | 2.[0-7].*)
9449 LDSHARED="ld -Bshareable ${LDFLAGS}"
9450 ;;
9451 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009452 LDSHARED='$(CC) -shared $(CCSHARED)'
9453 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009454 ;;
9455 esac
9456 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009457 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009458 LDSHARED='$(CC) -shared'
9459 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009460 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009461 if test "$GCC" = "yes" ; then
9462 LDSHARED='$(CC) -shared'
9463 LDCXXSHARED='$(CXX) -shared'
9464 else
9465 LDSHARED='$(CC) -G'
9466 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009467 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009468 SCO_SV*)
9469 LDSHARED='$(CC) -Wl,-G,-Bexport'
9470 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9471 CYGWIN*)
9472 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9473 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474 *) LDSHARED="ld";;
9475 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9478$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009479LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009480BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009481# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009482# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9484$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009485if test -z "$CCSHARED"
9486then
Guido van Rossum07397971997-04-29 21:49:50 +00009487 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009488 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009489 then CCSHARED="-fPIC";
9490 elif test `uname -p` = sparc;
9491 then CCSHARED="-xcode=pic32";
9492 else CCSHARED="-Kpic";
9493 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009494 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009495 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009496 else CCSHARED="+z";
9497 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009498 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009499 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009500 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009501 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009502 if test "$GCC" = "yes"
9503 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009504 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009505 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009506 SCO_SV*)
9507 if test "$GCC" = "yes"
9508 then CCSHARED="-fPIC"
9509 else CCSHARED="-Kpic -belf"
9510 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009511 VxWorks*)
9512 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009513 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9516$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009518# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9520$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009521if test -z "$LINKFORSHARED"
9522then
Guido van Rossum07397971997-04-29 21:49:50 +00009523 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009524 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009525 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009526 LINKFORSHARED="-Wl,-E -Wl,+s";;
9527# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009528 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009529 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009530 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009532 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Miss Islington (bot)bd92b942019-07-02 00:31:07 -07009533
9534 # Issue #18075: the default maximum stack size (8MBytes) is too
9535 # small for the default recursion limit. Increase the stack size
9536 # to ensure that tests don't crash
Miss Islington (bot)83996412019-08-01 07:38:57 -07009537 # Note: This matches the value of THREAD_STACK_SIZE in
9538 # thread_pthread.h
Miss Islington (bot)bd92b942019-07-02 00:31:07 -07009539 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9540
Jack Jansene578a632001-08-15 01:27:14 +00009541 if test "$enable_framework"
9542 then
Jack Jansenda49e192005-01-07 13:08:22 +00009543 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009544 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009545 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009546 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009547 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009548 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009549 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009550 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9551 then
9552 LINKFORSHARED="-Wl,--export-dynamic"
9553 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009554 SunOS/5*) case $CC in
9555 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009556 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009557 then
9558 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009559 fi;;
9560 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009561 CYGWIN*)
9562 if test $enable_shared = "no"
9563 then
9564 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9565 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009566 QNX*)
9567 # -Wl,-E causes the symbols to be added to the dynamic
9568 # symbol table so that they can be found when a module
9569 # is loaded. -N 2048K causes the stack size to be set
9570 # to 2048 kilobytes so that the stack doesn't overflow
9571 # when running test_compile.py.
9572 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009573 VxWorks*)
9574 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009575 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9578$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009579
Michael W. Hudson54241132001-12-07 15:38:26 +00009580
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009581
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9583$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009584if test ! "$LIBRARY" = "$LDLIBRARY"
9585then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009586 case $ac_sys_system in
9587 CYGWIN*)
9588 # Cygwin needs CCSHARED when building extension DLLs
9589 # but not when building the interpreter DLL.
9590 CFLAGSFORSHARED='';;
9591 *)
9592 CFLAGSFORSHARED='$(CCSHARED)'
9593 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9596$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009597
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009598# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9599# library (with --enable-shared).
9600# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009601# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9602# if it is not required, since it creates a dependency of the shared library
9603# to LIBS. This, in turn, means that applications linking the shared libpython
9604# don't need to link LIBS explicitly. The default should be only changed
9605# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009606
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9608$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009609case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009610 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009611 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009612esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9614$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009615
9616
Guido van Rossum627b2d71993-12-24 10:39:16 +00009617# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9619$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009620if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009621 $as_echo_n "(cached) " >&6
9622else
9623 ac_check_lib_save_LIBS=$LIBS
9624LIBS="-lsendfile $LIBS"
9625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626/* end confdefs.h. */
9627
9628/* Override any GCC internal prototype to avoid an error.
9629 Use char because int might match the return type of a GCC
9630 builtin and then its argument prototype would still apply. */
9631#ifdef __cplusplus
9632extern "C"
9633#endif
9634char sendfile ();
9635int
9636main ()
9637{
9638return sendfile ();
9639 ;
9640 return 0;
9641}
9642_ACEOF
9643if ac_fn_c_try_link "$LINENO"; then :
9644 ac_cv_lib_sendfile_sendfile=yes
9645else
9646 ac_cv_lib_sendfile_sendfile=no
9647fi
9648rm -f core conftest.err conftest.$ac_objext \
9649 conftest$ac_exeext conftest.$ac_ext
9650LIBS=$ac_check_lib_save_LIBS
9651fi
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9653$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009654if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009655 cat >>confdefs.h <<_ACEOF
9656#define HAVE_LIBSENDFILE 1
9657_ACEOF
9658
9659 LIBS="-lsendfile $LIBS"
9660
9661fi
9662
Matthias Kloseb9621712010-04-24 17:59:49 +00009663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9664$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009665if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009667else
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009669LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673/* Override any GCC internal prototype to avoid an error.
9674 Use char because int might match the return type of a GCC
9675 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676#ifdef __cplusplus
9677extern "C"
9678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009679char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009680int
9681main ()
9682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ;
9685 return 0;
9686}
9687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009690else
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693rm -f core conftest.err conftest.$ac_objext \
9694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009695LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9698$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009699if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 cat >>confdefs.h <<_ACEOF
9701#define HAVE_LIBDL 1
9702_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009704 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009705
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009706fi
9707 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9709$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009710if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009712else
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009714LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718/* Override any GCC internal prototype to avoid an error.
9719 Use char because int might match the return type of a GCC
9720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721#ifdef __cplusplus
9722extern "C"
9723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009724char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ;
9730 return 0;
9731}
9732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009735else
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009738rm -f core conftest.err conftest.$ac_objext \
9739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009740LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9743$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009744if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 cat >>confdefs.h <<_ACEOF
9746#define HAVE_LIBDLD 1
9747_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009748
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009749 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009751fi
9752 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009753
Michael Felt0d3ccb42017-12-30 22:39:20 +01009754# checks for uuid.h location
9755for ac_header in uuid/uuid.h uuid.h
9756do :
9757 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9758ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9759if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9760 cat >>confdefs.h <<_ACEOF
9761#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9762_ACEOF
9763
9764fi
9765
9766done
9767
9768
Berker Peksag9a10ff42017-11-08 23:09:16 +03009769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9770$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9772/* end confdefs.h. */
9773#include <uuid/uuid.h>
9774int
9775main ()
9776{
9777
9778#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009779void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009780#endif
9781
9782 ;
9783 return 0;
9784}
9785_ACEOF
9786if ac_fn_c_try_compile "$LINENO"; then :
9787
9788$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9789
9790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9791$as_echo "yes" >&6; }
9792else
9793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9794$as_echo "no" >&6; }
9795
9796fi
9797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9798
Michael Felt0d3ccb42017-12-30 22:39:20 +01009799# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009800# FreeBSD and OpenBSD provides support as well
9801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9802$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9804/* end confdefs.h. */
9805#include <uuid.h>
9806int
9807main ()
9808{
9809
9810#ifndef uuid_create
9811void *x = uuid_create
9812#endif
9813
9814 ;
9815 return 0;
9816}
9817_ACEOF
9818if ac_fn_c_try_compile "$LINENO"; then :
9819
9820$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9821
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9823$as_echo "yes" >&6; }
9824else
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9826$as_echo "no" >&6; }
9827
9828fi
9829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9830
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009831# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9832# stream in big-endian byte-order
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9834$as_echo_n "checking for uuid_enc_be... " >&6; }
9835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9836/* end confdefs.h. */
9837#include <uuid.h>
9838int
9839main ()
9840{
9841
9842#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009843void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009844#endif
9845
9846 ;
9847 return 0;
9848}
9849_ACEOF
9850if ac_fn_c_try_compile "$LINENO"; then :
9851
9852$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9853
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9855$as_echo "yes" >&6; }
9856else
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9858$as_echo "no" >&6; }
9859
9860fi
9861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9862
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009863# 'Real Time' functions on Solaris
9864# posix4 on Solaris 2.6
9865# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009867$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009868if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009870else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009871 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875/* Override any GCC internal prototype to avoid an error.
9876 Use char because int might match the return type of a GCC
9877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009878#ifdef __cplusplus
9879extern "C"
9880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009881char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009882int
9883main ()
9884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 ;
9887 return 0;
9888}
9889_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890for ac_lib in '' pthread rt posix4; do
9891 if test -z "$ac_lib"; then
9892 ac_res="none required"
9893 else
9894 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009895 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900rm -f core conftest.err conftest.$ac_objext \
9901 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009902 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905done
Victor Stinnere0be4232011-10-25 13:06:09 +02009906if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908else
9909 ac_cv_search_sem_init=no
9910fi
9911rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009912LIBS=$ac_func_search_save_LIBS
9913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9915$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009917if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009919
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009920fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009921
Martin v. Löwis519adae2003-09-20 10:47:47 +00009922
Martin v. Löwis19d17342003-06-14 21:03:05 +00009923# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9925$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009926if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009928else
9929 ac_check_lib_save_LIBS=$LIBS
9930LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009932/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934/* Override any GCC internal prototype to avoid an error.
9935 Use char because int might match the return type of a GCC
9936 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009937#ifdef __cplusplus
9938extern "C"
9939#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009941int
9942main ()
9943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009945 ;
9946 return 0;
9947}
9948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009950 ac_cv_lib_intl_textdomain=yes
9951else
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009954rm -f core conftest.err conftest.$ac_objext \
9955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009956LIBS=$ac_check_lib_save_LIBS
9957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9959$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009960if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009961
Matthias Kloseb9621712010-04-24 17:59:49 +00009962$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009963
Brett Cannonc6d936e2009-06-07 20:09:53 +00009964 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009965fi
9966
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009967
9968# checks for system dependent C++ extensions support
9969case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9971$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009973/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009974
Georg Brandl59e87bd2011-02-15 19:48:59 +00009975 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009976int
9977main ()
9978{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009979loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 ;
9981 return 0;
9982}
Matthias Kloseb159a552010-04-25 21:00:44 +00009983
Martin v. Löwis11437992002-04-12 09:54:03 +00009984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009985if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009986
Matthias Kloseb159a552010-04-25 21:00:44 +00009987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Matthias Kloseb159a552010-04-25 21:00:44 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009991$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009992
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009993else
Matthias Kloseb159a552010-04-25 21:00:44 +00009994
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009997
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009999rm -f core conftest.err conftest.$ac_objext \
10000 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010001 *) ;;
10002esac
10003
Christian Heimes985ecdc2013-11-20 11:46:18 +010010004# check for systems that require aligned memory access
10005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10006$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010007if ${ac_cv_aligned_required+:} false; then :
10008 $as_echo_n "(cached) " >&6
10009else
10010 if test "$cross_compiling" = yes; then :
10011 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010012else
10013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10014/* end confdefs.h. */
10015
10016int main()
10017{
10018 char s[16];
10019 int i, *p1, *p2;
10020 for (i=0; i < 16; i++)
10021 s[i] = i;
10022 p1 = (int*)(s+1);
10023 p2 = (int*)(s+2);
10024 if (*p1 == *p2)
10025 return 1;
10026 return 0;
10027}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010028_ACEOF
10029if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010030 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010031else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010032 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010033fi
10034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10035 conftest.$ac_objext conftest.beam conftest.$ac_ext
10036fi
10037
10038
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010039fi
10040
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10042$as_echo "$ac_cv_aligned_required" >&6; }
10043if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010044
10045$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10046
10047fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010048
10049# str, bytes and memoryview hash algorithm
10050
10051
10052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10053$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10054
10055# Check whether --with-hash_algorithm was given.
10056if test "${with_hash_algorithm+set}" = set; then :
10057 withval=$with_hash_algorithm;
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10059$as_echo "$withval" >&6; }
10060case "$withval" in
10061 siphash24)
10062 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10063
10064 ;;
10065 fnv)
10066 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10067
10068 ;;
10069 *)
10070 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10071 ;;
10072esac
10073
10074else
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10076$as_echo "default" >&6; }
10077fi
10078
10079
Charles-François Natalid30b0222014-05-08 23:08:51 +010010080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10081$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10082
10083# Check whether --with-address_sanitizer was given.
10084if test "${with_address_sanitizer+set}" = set; then :
10085 withval=$with_address_sanitizer;
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10087$as_echo "$withval" >&6; }
10088BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10089LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010090# ASan works by controlling memory allocation, our own malloc interferes.
10091with_pymalloc="no"
10092
10093else
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
10096fi
10097
10098
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10100$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10101
10102# Check whether --with-memory_sanitizer was given.
10103if test "${with_memory_sanitizer+set}" = set; then :
10104 withval=$with_memory_sanitizer;
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10106$as_echo "$withval" >&6; }
10107BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10108LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10109# MSan works by controlling memory allocation, our own malloc interferes.
10110with_pymalloc="no"
10111
10112else
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
10115fi
10116
10117
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10119$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10120
10121# Check whether --with-undefined_behavior_sanitizer was given.
10122if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10123 withval=$with_undefined_behavior_sanitizer;
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10125$as_echo "$withval" >&6; }
10126BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10127LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010128
10129else
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
10132fi
10133
10134
Guido van Rossum70c7f481998-03-26 18:44:10 +000010135# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10137$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010138if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010140else
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010142LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146/* Override any GCC internal prototype to avoid an error.
10147 Use char because int might match the return type of a GCC
10148 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010149#ifdef __cplusplus
10150extern "C"
10151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010152char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010153int
10154main ()
10155{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ;
10158 return 0;
10159}
10160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010161if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010163else
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166rm -f core conftest.err conftest.$ac_objext \
10167 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010168LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10171$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010172if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010173 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010174fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010175 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10177$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010178if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010180else
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010182LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186/* Override any GCC internal prototype to avoid an error.
10187 Use char because int might match the return type of a GCC
10188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010189#ifdef __cplusplus
10190extern "C"
10191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010192char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010193int
10194main ()
10195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 ;
10198 return 0;
10199}
10200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010203else
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010206rm -f core conftest.err conftest.$ac_objext \
10207 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010208LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10211$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010212if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010213 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010214fi
10215 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010216
Matthias Kloseb9621712010-04-24 17:59:49 +000010217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10218$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10224$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010225LIBS="$withval $LIBS"
10226
10227else
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10229$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230fi
10231
Guido van Rossum7f43da71994-08-01 12:15:30 +000010232
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010233
10234
10235
10236
10237
10238
Victor Stinner23a683a2019-04-12 21:27:37 +020010239
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010240if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10241 if test -n "$ac_tool_prefix"; then
10242 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10243set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10245$as_echo_n "checking for $ac_word... " >&6; }
10246if ${ac_cv_path_PKG_CONFIG+:} false; then :
10247 $as_echo_n "(cached) " >&6
10248else
10249 case $PKG_CONFIG in
10250 [\\/]* | ?:[\\/]*)
10251 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10252 ;;
10253 *)
10254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10255for as_dir in $PATH
10256do
10257 IFS=$as_save_IFS
10258 test -z "$as_dir" && as_dir=.
10259 for ac_exec_ext in '' $ac_executable_extensions; do
10260 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10261 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10262 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10263 break 2
10264 fi
10265done
10266 done
10267IFS=$as_save_IFS
10268
10269 ;;
10270esac
10271fi
10272PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10273if test -n "$PKG_CONFIG"; then
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10275$as_echo "$PKG_CONFIG" >&6; }
10276else
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278$as_echo "no" >&6; }
10279fi
10280
10281
10282fi
10283if test -z "$ac_cv_path_PKG_CONFIG"; then
10284 ac_pt_PKG_CONFIG=$PKG_CONFIG
10285 # Extract the first word of "pkg-config", so it can be a program name with args.
10286set dummy pkg-config; ac_word=$2
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10288$as_echo_n "checking for $ac_word... " >&6; }
10289if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10290 $as_echo_n "(cached) " >&6
10291else
10292 case $ac_pt_PKG_CONFIG in
10293 [\\/]* | ?:[\\/]*)
10294 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10295 ;;
10296 *)
10297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10298for as_dir in $PATH
10299do
10300 IFS=$as_save_IFS
10301 test -z "$as_dir" && as_dir=.
10302 for ac_exec_ext in '' $ac_executable_extensions; do
10303 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10304 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10306 break 2
10307 fi
10308done
10309 done
10310IFS=$as_save_IFS
10311
10312 ;;
10313esac
10314fi
10315ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10316if test -n "$ac_pt_PKG_CONFIG"; then
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10318$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10319else
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
10322fi
10323
10324 if test "x$ac_pt_PKG_CONFIG" = x; then
10325 PKG_CONFIG=""
10326 else
10327 case $cross_compiling:$ac_tool_warned in
10328yes:)
10329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10331ac_tool_warned=yes ;;
10332esac
10333 PKG_CONFIG=$ac_pt_PKG_CONFIG
10334 fi
10335else
10336 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10337fi
10338
10339fi
10340if test -n "$PKG_CONFIG"; then
10341 _pkg_min_version=0.9.0
10342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10343$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10344 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10346$as_echo "yes" >&6; }
10347 else
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349$as_echo "no" >&6; }
10350 PKG_CONFIG=""
10351 fi
10352fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010353
10354# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10356$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010357
10358# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010359if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010360 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010361else
10362 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010363fi
10364
10365
Matthias Kloseb9621712010-04-24 17:59:49 +000010366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10367$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010368
10369# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10371$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010372
10373# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010375 withval=$with_system_ffi;
10376fi
10377
10378
Zachary Waref40d4dd2016-09-17 01:25:24 -050010379if test "$ac_sys_system" = "Darwin"
10380then
10381 case "$with_system_ffi" in
10382 "")
10383 with_system_ffi="no"
10384 ;;
10385 yes|no)
10386 ;;
10387 *)
10388 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10389 ;;
10390 esac
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10392$as_echo "$with_system_ffi" >&6; }
10393else
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10395$as_echo "yes" >&6; }
10396 if test "$with_system_ffi" != ""
10397 then
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10399$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10400 fi
10401 with_system_ffi="yes"
10402fi
Zachary Ware935043d2016-09-09 17:01:21 -070010403
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010404if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010405 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10406else
10407 LIBFFI_INCLUDEDIR=""
10408fi
10409
10410
Stefan Krah60187b52012-03-23 19:06:27 +010010411# Check for use of the system libmpdec library
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10413$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10414
10415# Check whether --with-system_libmpdec was given.
10416if test "${with_system_libmpdec+set}" = set; then :
10417 withval=$with_system_libmpdec;
10418else
10419 with_system_libmpdec="no"
10420fi
10421
10422
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10424$as_echo "$with_system_libmpdec" >&6; }
10425
Stefan Krah4d701242020-02-29 22:16:32 +010010426# Check whether _decimal should use a coroutine-local or thread-local context
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10428$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10429
10430# Check whether --with-decimal_contextvar was given.
10431if test "${with_decimal_contextvar+set}" = set; then :
10432 withval=$with_decimal_contextvar;
10433else
10434 with_decimal_contextvar="yes"
10435fi
10436
10437
10438if test "$with_decimal_contextvar" != "no"
10439then
10440
10441$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10442
10443fi
10444
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10446$as_echo "$with_decimal_contextvar" >&6; }
10447
Benjamin Peterson076ed002010-10-31 17:11:02 +000010448# Check for support for loadable sqlite extensions
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10450$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10451# Check whether --enable-loadable-sqlite-extensions was given.
10452if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10453 enableval=$enable_loadable_sqlite_extensions;
10454else
10455 enable_loadable_sqlite_extensions="no"
10456fi
10457
10458
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10460$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10461
Ned Deilyd819b932013-09-06 01:07:05 -070010462# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10463
10464
10465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10466$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10467
10468# Check whether --with-tcltk-includes was given.
10469if test "${with_tcltk_includes+set}" = set; then :
10470 withval=$with_tcltk_includes;
10471else
10472 with_tcltk_includes="default"
10473fi
10474
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10476$as_echo "$with_tcltk_includes" >&6; }
10477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10478$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10479
10480# Check whether --with-tcltk-libs was given.
10481if test "${with_tcltk_libs+set}" = set; then :
10482 withval=$with_tcltk_libs;
10483else
10484 with_tcltk_libs="default"
10485fi
10486
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10488$as_echo "$with_tcltk_libs" >&6; }
10489if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10490then
10491 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10492 then
10493 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10494 fi
10495 TCLTK_INCLUDES=""
10496 TCLTK_LIBS=""
10497else
10498 TCLTK_INCLUDES="$with_tcltk_includes"
10499 TCLTK_LIBS="$with_tcltk_libs"
10500fi
10501
Matthias Klose55708cc2009-04-30 08:06:49 +000010502# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10504$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010505
10506# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010508 withval=$with_dbmliborder;
10509if test x$with_dbmliborder = xyes
10510then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010511as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010512else
10513 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10514 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10515 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010516 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010517 fi
10518 done
10519fi
10520fi
10521
Matthias Kloseb9621712010-04-24 17:59:49 +000010522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10523$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010524
Martin v. Löwis11437992002-04-12 09:54:03 +000010525# Templates for things AC_DEFINEd more than once.
10526# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010527
10528
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010529if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010530then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010531 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010533
10534 posix_threads=yes
Miss Islington (bot)8750bce2019-09-27 19:20:31 -070010535 if test "$ac_sys_system" = "SunOS"; then
10536 CFLAGS="$CFLAGS -D_REENTRANT"
10537 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010538elif test "$ac_cv_kpthread" = "yes"
10539then
10540 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010541 if test "$ac_cv_cxx_thread" = "yes"; then
10542 CXX="$CXX -Kpthread"
10543 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010544 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010545elif test "$ac_cv_kthread" = "yes"
10546then
10547 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010548 if test "$ac_cv_cxx_thread" = "yes"; then
10549 CXX="$CXX -Kthread"
10550 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010551 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552elif test "$ac_cv_pthread" = "yes"
10553then
10554 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010555 if test "$ac_cv_cxx_thread" = "yes"; then
10556 CXX="$CXX -pthread"
10557 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010558 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010559else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010560 if test ! -z "$withval" -a -d "$withval"
10561 then LDFLAGS="$LDFLAGS -L$withval"
10562 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010563
10564 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010565 # define _POSIX_THREADS in unistd.h. Some apparently don't
10566 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10568$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010570/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010571
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010572#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010573#ifdef _POSIX_THREADS
10574yes
10575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010576
10577_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010580 unistd_defines_pthreads=yes
10581else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010582 unistd_defines_pthreads=no
10583fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010584rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10587$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010590
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010591 # Just looking for pthread_create in libpthread is not enough:
10592 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10593 # So we really have to include pthread.h, and then link.
10594 _libs=$LIBS
10595 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10597$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010599/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010600
10601#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010602#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010603
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010604void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010605int
10606main ()
10607{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010608
10609pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 ;
10611 return 0;
10612}
10613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010615
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10617$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010618 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010619
Guido van Rossum02a1c402000-02-25 19:26:31 +000010620else
Martin v. Löwis11437992002-04-12 09:54:03 +000010621
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010622 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010624if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010625
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010626 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010627
Guido van Rossumad678af1998-10-02 14:42:15 +000010628else
Guido van Rossumad678af1998-10-02 14:42:15 +000010629
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10631$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010632if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010634else
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010636LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640/* Override any GCC internal prototype to avoid an error.
10641 Use char because int might match the return type of a GCC
10642 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010643#ifdef __cplusplus
10644extern "C"
10645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010646char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010647int
10648main ()
10649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 ;
10652 return 0;
10653}
10654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010655if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010657else
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010660rm -f core conftest.err conftest.$ac_objext \
10661 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010662LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10665$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010666if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010667
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010668 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010669 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010670
Greg Steinadf63d62000-07-05 10:38:09 +000010671else
Greg Steinadf63d62000-07-05 10:38:09 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10674$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010675if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010677else
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010679LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683/* Override any GCC internal prototype to avoid an error.
10684 Use char because int might match the return type of a GCC
10685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010686#ifdef __cplusplus
10687extern "C"
10688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010689char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010690int
10691main ()
10692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 ;
10695 return 0;
10696}
10697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010700else
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010703rm -f core conftest.err conftest.$ac_objext \
10704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010705LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10708$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010709if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010710
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010711 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010712 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010713
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010714else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10717$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010718if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010720else
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010722LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726/* Override any GCC internal prototype to avoid an error.
10727 Use char because int might match the return type of a GCC
10728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010729#ifdef __cplusplus
10730extern "C"
10731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010732char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010733int
10734main ()
10735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010737 ;
10738 return 0;
10739}
10740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010742 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010743else
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010746rm -f core conftest.err conftest.$ac_objext \
10747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10751$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010752if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010753
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010754 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010755 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010756
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010757else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10760$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010761if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010763else
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010765LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769/* Override any GCC internal prototype to avoid an error.
10770 Use char because int might match the return type of a GCC
10771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010772#ifdef __cplusplus
10773extern "C"
10774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010775char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010776int
10777main ()
10778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010780 ;
10781 return 0;
10782}
10783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010784if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010785 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010786else
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010789rm -f core conftest.err conftest.$ac_objext \
10790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010791LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10794$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010795if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010796
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010797 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010798 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010799
Guido van Rossumb93a8621998-05-07 13:27:32 +000010800else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010801
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010802 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10803
Guido van Rossum2d38f911996-06-26 19:47:01 +000010804fi
10805
Guido van Rossum627b2d71993-12-24 10:39:16 +000010806
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010807fi
10808
Guido van Rossum0be3e491997-05-22 20:33:33 +000010809fi
10810
Guido van Rossum49545951997-12-02 19:28:29 +000010811fi
10812
Guido van Rossumb93a8621998-05-07 13:27:32 +000010813fi
10814
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010816rm -f core conftest.err conftest.$ac_objext \
10817 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010818
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10820$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010821if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010823else
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010825LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010829/* Override any GCC internal prototype to avoid an error.
10830 Use char because int might match the return type of a GCC
10831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010832#ifdef __cplusplus
10833extern "C"
10834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010835char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010836int
10837main ()
10838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 ;
10841 return 0;
10842}
10843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010846else
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010849rm -f core conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010851LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10854$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010855if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010856
Martin v. Löwis130fb172001-07-19 11:00:41 +000010857 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010858
Guido van Rossum627b2d71993-12-24 10:39:16 +000010859fi
10860
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010861
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010862fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010863
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010864if test "$posix_threads" = "yes"; then
10865 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868
10869 fi
10870
10871 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10872 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010873 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010875
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010876 ;;
10877 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010878$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010879
10880 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010881 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010882$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010883
10884 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010885 esac
10886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10888$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010889 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010893 ac_cv_pthread_system_supported=no
10894else
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. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010897
10898 #include <stdio.h>
10899 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010900 void *foo(void *parm) {
10901 return NULL;
10902 }
10903 main() {
10904 pthread_attr_t attr;
10905 pthread_t id;
10906 if (pthread_attr_init(&attr)) exit(-1);
10907 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10908 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10909 exit(0);
10910 }
10911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010912if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913 ac_cv_pthread_system_supported=yes
10914else
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010919fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010921
Guido van Rossum627b2d71993-12-24 10:39:16 +000010922fi
10923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10925$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010926 if test "$ac_cv_pthread_system_supported" = "yes"; then
10927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010929
10930 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 for ac_func in pthread_sigmask
10932do :
10933 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010934if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010935 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010936#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010937_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010938 case $ac_sys_system in
10939 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010942
10943 ;;
10944 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010945fi
10946done
10947
pdoxe14679c2017-10-05 00:01:56 -070010948 for ac_func in pthread_getcpuclockid
10949do :
10950 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10951if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10952 cat >>confdefs.h <<_ACEOF
10953#define HAVE_PTHREAD_GETCPUCLOCKID 1
10954_ACEOF
10955
10956fi
10957done
10958
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010959fi
10960
10961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10965$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010968 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010972 ipv6=no
10973 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10975$as_echo "yes" >&6; }
10976 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977
10978 ipv6=yes
10979 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981else
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010984/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985 /* AF_INET6 available check */
10986#include <sys/types.h>
10987#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010988int
10989main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010991int domain = AF_INET6;
10992 ;
10993 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010994}
Martin v. Löwis11437992002-04-12 09:54:03 +000010995_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010996if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10999$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011000 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011001
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011002else
Matthias Kloseb159a552010-04-25 21:00:44 +000011003
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011007
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011011if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11013$as_echo_n "checking if RFC2553 API is available... " >&6; }
11014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011015/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011016
11017 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011018#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011019int
11020main ()
11021{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011022struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011023 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 ;
11025 return 0;
11026}
Matthias Kloseb159a552010-04-25 21:00:44 +000011027
Martin v. Löwis11437992002-04-12 09:54:03 +000011028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011029if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011030
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011032$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011033 ipv6=yes
11034
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011035else
Matthias Kloseb159a552010-04-25 21:00:44 +000011036
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011038$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011039 ipv6=no
11040
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011043fi
11044
11045if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011047
11048fi
11049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050fi
11051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011052
11053ipv6type=unknown
11054ipv6lib=none
11055ipv6trylibc=no
11056
11057if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11059$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011060 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11061 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062 case $i in
11063 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067#include <netinet/in.h>
11068#ifdef IPV6_INRIA_VERSION
11069yes
11070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011074 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011076rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077
11078 ;;
11079 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011081/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011082
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011083#include <netinet/in.h>
11084#ifdef __KAME__
11085yes
11086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011087_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011090 ipv6type=$i;
11091 ipv6lib=inet6
11092 ipv6libdir=/usr/local/v6/lib
11093 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011095rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096
11097 ;;
11098 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011100/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011102#include <features.h>
11103#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11104yes
11105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011106_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109 ipv6type=$i;
11110 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011111fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011112rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113
11114 ;;
11115 linux-inet6)
11116 if test -d /usr/inet6; then
11117 ipv6type=$i
11118 ipv6lib=inet6
11119 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011120 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121 fi
11122 ;;
11123 solaris)
11124 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011125 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126 ipv6type=$i
11127 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128 fi
11129 fi
11130 ;;
11131 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011133/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135#include <sys/param.h>
11136#ifdef _TOSHIBA_INET6
11137yes
11138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011139_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142 ipv6type=$i;
11143 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011144 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011146rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147
11148 ;;
11149 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011151/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011152
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011153#include </usr/local/v6/include/sys/v6config.h>
11154#ifdef __V6D__
11155yes
11156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011157_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160 ipv6type=$i;
11161 ipv6lib=v6;
11162 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011163 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011164fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011165rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011166
11167 ;;
11168 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011171
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011172#include <sys/param.h>
11173#ifdef _ZETA_MINAMI_INET6
11174yes
11175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011176_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011177if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011179 ipv6type=$i;
11180 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011181 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011183rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011184
11185 ;;
11186 esac
11187 if test "$ipv6type" != "unknown"; then
11188 break
11189 fi
11190 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11192$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011193fi
11194
11195if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11196 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11197 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11198 echo "using lib$ipv6lib"
11199 else
11200 if test $ipv6trylibc = "yes"; then
11201 echo "using libc"
11202 else
11203 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11204 echo "You need to fetch lib$ipv6lib.a from appropriate"
11205 echo 'ipv6 kit and compile beforehand.'
11206 exit 1
11207 fi
11208 fi
11209fi
11210
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11212$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11214/* end confdefs.h. */
11215 /* CAN_RAW_FD_FRAMES available check */
11216#include <linux/can/raw.h>
11217int
11218main ()
11219{
11220int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11221 ;
11222 return 0;
11223}
11224_ACEOF
11225if ac_fn_c_try_compile "$LINENO"; then :
11226
11227
11228$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11229
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11231$as_echo "yes" >&6; }
11232
11233else
11234
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11236$as_echo "no" >&6; }
11237
11238fi
11239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11240
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011241# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11243$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011246if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011247 withval=$with_doc_strings;
11248fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011249
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011250
11251if test -z "$with_doc_strings"
11252then with_doc_strings="yes"
11253fi
11254if test "$with_doc_strings" != "no"
11255then
11256
Matthias Kloseb9621712010-04-24 17:59:49 +000011257$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011258
11259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11261$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011262
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011263# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11265$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011268if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269 withval=$with_pymalloc;
11270fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011271
Neil Schemenauera35c6882001-02-27 04:45:05 +000011272
Neil Schemenauer16c22972002-03-22 15:34:49 +000011273if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011274then
11275 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011276fi
11277if test "$with_pymalloc" != "no"
11278then
Martin v. Löwis11437992002-04-12 09:54:03 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011281
11282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11284$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011285
Nick Coghlan6ea41862017-06-11 13:16:15 +100011286# Check for --with-c-locale-coercion
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11288$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11289
11290# Check whether --with-c-locale-coercion was given.
11291if test "${with_c_locale_coercion+set}" = set; then :
11292 withval=$with_c_locale_coercion;
11293fi
11294
11295
11296if test -z "$with_c_locale_coercion"
11297then
11298 with_c_locale_coercion="yes"
11299fi
11300if test "$with_c_locale_coercion" != "no"
11301then
11302
11303$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11304
11305fi
11306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11307$as_echo "$with_c_locale_coercion" >&6; }
11308
Benjamin Peterson05159c42009-12-03 03:01:27 +000011309# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11311$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011312
11313# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011314if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011315 withval=$with_valgrind;
11316else
11317 with_valgrind=no
11318fi
11319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11321$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011322if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 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 +020011324if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011327
11328else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011329 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011330
11331fi
11332
11333
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011334 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011335fi
11336
Łukasz Langaa785c872016-09-09 17:37:37 -070011337# Check for DTrace support
11338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11339$as_echo_n "checking for --with-dtrace... " >&6; }
11340
11341# Check whether --with-dtrace was given.
11342if test "${with_dtrace+set}" = set; then :
11343 withval=$with_dtrace;
11344else
11345 with_dtrace=no
11346fi
11347
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11349$as_echo "$with_dtrace" >&6; }
11350
11351
11352
11353
11354
11355DTRACE=
11356DFLAGS=
11357DTRACE_HEADERS=
11358DTRACE_OBJS=
11359
11360if test "$with_dtrace" = "yes"
11361then
11362 # Extract the first word of "dtrace", so it can be a program name with args.
11363set dummy dtrace; ac_word=$2
11364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11365$as_echo_n "checking for $ac_word... " >&6; }
11366if ${ac_cv_path_DTRACE+:} false; then :
11367 $as_echo_n "(cached) " >&6
11368else
11369 case $DTRACE in
11370 [\\/]* | ?:[\\/]*)
11371 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11372 ;;
11373 *)
11374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11375for as_dir in $PATH
11376do
11377 IFS=$as_save_IFS
11378 test -z "$as_dir" && as_dir=.
11379 for ac_exec_ext in '' $ac_executable_extensions; do
11380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11381 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11383 break 2
11384 fi
11385done
11386 done
11387IFS=$as_save_IFS
11388
11389 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11390 ;;
11391esac
11392fi
11393DTRACE=$ac_cv_path_DTRACE
11394if test -n "$DTRACE"; then
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11396$as_echo "$DTRACE" >&6; }
11397else
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399$as_echo "no" >&6; }
11400fi
11401
11402
11403 if test "$DTRACE" = "not found"; then
11404 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11405 fi
11406
11407$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11408
11409 DTRACE_HEADERS="Include/pydtrace_probes.h"
11410
11411 # On OS X, DTrace providers do not need to be explicitly compiled and
11412 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11413 # generation flag '-G'. We check for presence of this flag, rather than
11414 # hardcoding support by OS, in the interest of robustness.
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11416$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11417if ${ac_cv_dtrace_link+:} false; then :
11418 $as_echo_n "(cached) " >&6
11419else
11420 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011421 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011422 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11423 ac_cv_dtrace_link=yes
11424
11425fi
11426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11427$as_echo "$ac_cv_dtrace_link" >&6; }
11428 if test "$ac_cv_dtrace_link" = "yes"; then
11429 DTRACE_OBJS="Python/pydtrace.o"
11430 fi
11431fi
11432
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011433# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011434
Guido van Rossum98935bf2001-09-05 19:13:16 +000011435DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011436
Guido van Rossume97ee181999-12-20 21:27:22 +000011437# the dlopen() function means we might want to use dynload_shlib.o. some
11438# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011439for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011440do :
11441 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011442if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011444#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011445_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011446
Guido van Rossume97ee181999-12-20 21:27:22 +000011447fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011448done
Guido van Rossume97ee181999-12-20 21:27:22 +000011449
Michael W. Hudson54241132001-12-07 15:38:26 +000011450
Guido van Rossume97ee181999-12-20 21:27:22 +000011451# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11452# loading of modules.
11453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11455$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011456if test -z "$DYNLOADFILE"
11457then
11458 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011459 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11460 if test "$ac_cv_func_dlopen" = yes
11461 then DYNLOADFILE="dynload_shlib.o"
11462 else DYNLOADFILE="dynload_aix.o"
11463 fi
11464 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011465 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011466 *)
11467 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11468 # out any dynamic loading
11469 if test "$ac_cv_func_dlopen" = yes
11470 then DYNLOADFILE="dynload_shlib.o"
11471 else DYNLOADFILE="dynload_stub.o"
11472 fi
11473 ;;
11474 esac
11475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11477$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011478if test "$DYNLOADFILE" != "dynload_stub.o"
11479then
Martin v. Löwis11437992002-04-12 09:54:03 +000011480
Matthias Kloseb9621712010-04-24 17:59:49 +000011481$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011482
11483fi
11484
Neil Schemenauer4e425612001-06-19 15:44:15 +000011485# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11486
Michael W. Hudson54241132001-12-07 15:38:26 +000011487
Matthias Kloseb9621712010-04-24 17:59:49 +000011488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11489$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011490if test -z "$MACHDEP_OBJS"
11491then
Jack Jansene578a632001-08-15 01:27:14 +000011492 MACHDEP_OBJS=$extra_machdep_objs
11493else
11494 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011495fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011496if test -z "$MACHDEP_OBJS"; then
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11498$as_echo "none" >&6; }
11499else
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11501$as_echo "$MACHDEP_OBJS" >&6; }
11502fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011503
Guido van Rossum627b2d71993-12-24 10:39:16 +000011504# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011505for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011506 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11507 faccessat fchmod fchmodat fchown fchownat \
Miss Islington (bot)84eb42e2019-09-12 04:19:21 -070011508 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011509 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011510 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011511 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011512 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011513 if_nameindex \
Miss Islington (bot)12acb5b2019-09-09 06:01:41 -070011514 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011515 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011516 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011517 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011518 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11519 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011520 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011521 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011522 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011523 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11524 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011525 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011526 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011527 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011528 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011529 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011530do :
11531 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11532ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011533if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011535#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011536_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011537
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011538fi
11539done
11540
Michael W. Hudson54241132001-12-07 15:38:26 +000011541
Benjamin Peterson40caa052018-09-12 15:52:40 -070011542# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11543# links. Some libc implementations have a stub lchmod implementation that always
11544# returns an error.
11545if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011546 for ac_func in lchmod
11547do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011548 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11549if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011550 cat >>confdefs.h <<_ACEOF
11551#define HAVE_LCHMOD 1
11552_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011553
11554fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011555done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011556
11557fi
11558
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011559ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11560 #include <dirent.h>
11561"
11562if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11563
11564$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11565
11566fi
11567
11568
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569# For some functions, having a definition is not sufficient, since
11570# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11572$as_echo_n "checking for chroot... " >&6; }
11573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011574/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011575#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011576int
11577main ()
11578{
11579void *x=chroot
11580 ;
11581 return 0;
11582}
11583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011587
Matthias Kloseb159a552010-04-25 21:00:44 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011589$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593
11594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11597$as_echo_n "checking for link... " >&6; }
11598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011599/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011600#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011601int
11602main ()
11603{
11604void *x=link
11605 ;
11606 return 0;
11607}
11608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011609if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011612
Matthias Kloseb159a552010-04-25 21:00:44 +000011613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011614$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011618
11619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11622$as_echo_n "checking for symlink... " >&6; }
11623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011624/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011625#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011626int
11627main ()
11628{
11629void *x=symlink
11630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011637
Matthias Kloseb159a552010-04-25 21:00:44 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011639$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011640else
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11642$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011643
11644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11647$as_echo_n "checking for fchdir... " >&6; }
11648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011649/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011650#include <unistd.h>
11651int
11652main ()
11653{
11654void *x=fchdir
11655 ;
11656 return 0;
11657}
11658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011662
Matthias Kloseb159a552010-04-25 21:00:44 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011664$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668
11669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11672$as_echo_n "checking for fsync... " >&6; }
11673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011675#include <unistd.h>
11676int
11677main ()
11678{
11679void *x=fsync
11680 ;
11681 return 0;
11682}
11683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011687
Matthias Kloseb159a552010-04-25 21:00:44 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011689$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011690else
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11692$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011693
11694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11697$as_echo_n "checking for fdatasync... " >&6; }
11698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011699/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011700#include <unistd.h>
11701int
11702main ()
11703{
11704void *x=fdatasync
11705 ;
11706 return 0;
11707}
11708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011709if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011710
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011712
Matthias Kloseb159a552010-04-25 21:00:44 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011714$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011715else
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011718
11719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11722$as_echo_n "checking for epoll... " >&6; }
11723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011724/* end confdefs.h. */
11725#include <sys/epoll.h>
11726int
11727main ()
11728{
11729void *x=epoll_create
11730 ;
11731 return 0;
11732}
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011737
Matthias Kloseb159a552010-04-25 21:00:44 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011739$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11742$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011743
11744fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11747$as_echo_n "checking for epoll_create1... " >&6; }
11748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11749/* end confdefs.h. */
11750#include <sys/epoll.h>
11751int
11752main ()
11753{
11754void *x=epoll_create1
11755 ;
11756 return 0;
11757}
11758_ACEOF
11759if ac_fn_c_try_compile "$LINENO"; then :
11760
11761$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11762
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11764$as_echo "yes" >&6; }
11765else
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11767$as_echo "no" >&6; }
11768
11769fi
11770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11772$as_echo_n "checking for kqueue... " >&6; }
11773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011774/* end confdefs.h. */
11775
11776#include <sys/types.h>
11777#include <sys/event.h>
11778
11779int
11780main ()
11781{
11782int x=kqueue()
11783 ;
11784 return 0;
11785}
11786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011790
Matthias Kloseb159a552010-04-25 21:00:44 +000011791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011792$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11795$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011796
11797fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11800$as_echo_n "checking for prlimit... " >&6; }
11801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11802/* end confdefs.h. */
11803
11804#include <sys/time.h>
11805#include <sys/resource.h>
11806
11807int
11808main ()
11809{
11810void *x=prlimit
11811 ;
11812 return 0;
11813}
11814_ACEOF
11815if ac_fn_c_try_compile "$LINENO"; then :
11816
11817$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11818
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11820$as_echo "yes" >&6; }
11821else
11822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11823$as_echo "no" >&6; }
11824
11825fi
11826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11827
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11829$as_echo_n "checking for memfd_create... " >&6; }
11830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11831/* end confdefs.h. */
11832
11833#ifdef HAVE_SYS_MMAN_H
11834#include <sys/mman.h>
11835#endif
11836#ifdef HAVE_SYS_MEMFD_H
11837#include <sys/memfd.h>
11838#endif
11839
11840int
11841main ()
11842{
11843void *x=memfd_create
11844 ;
11845 return 0;
11846}
11847_ACEOF
11848if ac_fn_c_try_compile "$LINENO"; then :
11849
11850$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11851
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11853$as_echo "yes" >&6; }
11854else
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11856$as_echo "no" >&6; }
11857
11858fi
11859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11860
Martin v. Löwisd5843682002-11-21 20:41:28 +000011861# On some systems (eg. FreeBSD 5), we would find a definition of the
11862# functions ctermid_r, setgroups in the library, but no prototype
11863# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11864# address to avoid compiler warnings and potential miscompilations
11865# because of the missing prototypes.
11866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11868$as_echo_n "checking for ctermid_r... " >&6; }
11869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011870/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011871
Martin v. Löwisd5843682002-11-21 20:41:28 +000011872#include <stdio.h>
11873
Martin v. Löwisd5843682002-11-21 20:41:28 +000011874int
11875main ()
11876{
11877void* p = ctermid_r
11878 ;
11879 return 0;
11880}
11881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011885
Matthias Kloseb159a552010-04-25 21:00:44 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011887$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11890$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011891
11892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11894
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11896$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011898 $as_echo_n "(cached) " >&6
11899else
11900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011901/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011902#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011903int
11904main ()
11905{
11906void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011907
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011908 ;
11909 return 0;
11910}
11911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011913 ac_cv_flock_decl=yes
11914else
11915 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011916
11917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011919
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011920fi
11921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11922$as_echo "$ac_cv_flock_decl" >&6; }
11923if test "x${ac_cv_flock_decl}" = xyes; then
11924 for ac_func in flock
11925do :
11926 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011927if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011928 cat >>confdefs.h <<_ACEOF
11929#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011930_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011931
Antoine Pitroua3000072010-09-07 14:52:42 +000011932else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011934$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011936 $as_echo_n "(cached) " >&6
11937else
11938 ac_check_lib_save_LIBS=$LIBS
11939LIBS="-lbsd $LIBS"
11940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11941/* end confdefs.h. */
11942
11943/* Override any GCC internal prototype to avoid an error.
11944 Use char because int might match the return type of a GCC
11945 builtin and then its argument prototype would still apply. */
11946#ifdef __cplusplus
11947extern "C"
11948#endif
11949char flock ();
11950int
11951main ()
11952{
11953return flock ();
11954 ;
11955 return 0;
11956}
11957_ACEOF
11958if ac_fn_c_try_link "$LINENO"; then :
11959 ac_cv_lib_bsd_flock=yes
11960else
11961 ac_cv_lib_bsd_flock=no
11962fi
11963rm -f core conftest.err conftest.$ac_objext \
11964 conftest$ac_exeext conftest.$ac_ext
11965LIBS=$ac_check_lib_save_LIBS
11966fi
11967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11968$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011969if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011970 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011971
11972
11973$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11974
11975
11976fi
11977
11978
11979fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011980done
11981
Antoine Pitroua3000072010-09-07 14:52:42 +000011982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11985$as_echo_n "checking for getpagesize... " >&6; }
11986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011987/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011988
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011989#include <unistd.h>
11990
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011991int
11992main ()
11993{
11994void* p = getpagesize
11995 ;
11996 return 0;
11997}
11998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011999if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012002
Matthias Kloseb159a552010-04-25 21:00:44 +000012003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012004$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012005else
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12007$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012008
12009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012011
Victor Stinner984890f2011-11-24 13:53:38 +010012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12013$as_echo_n "checking for broken unsetenv... " >&6; }
12014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12015/* end confdefs.h. */
12016
12017#include <stdlib.h>
12018
12019int
12020main ()
12021{
12022int res = unsetenv("DUMMY")
12023 ;
12024 return 0;
12025}
12026_ACEOF
12027if ac_fn_c_try_compile "$LINENO"; then :
12028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12029$as_echo "no" >&6; }
12030else
12031
12032$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12033
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12035$as_echo "yes" >&6; }
12036
12037fi
12038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12039
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012040for ac_prog in true
12041do
12042 # Extract the first word of "$ac_prog", so it can be a program name with args.
12043set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12045$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012048else
12049 if test -n "$TRUE"; then
12050 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12051else
12052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12053for as_dir in $PATH
12054do
12055 IFS=$as_save_IFS
12056 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012059 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 $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 +000012061 break 2
12062 fi
12063done
Matthias Kloseb9621712010-04-24 17:59:49 +000012064 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012066
12067fi
12068fi
12069TRUE=$ac_cv_prog_TRUE
12070if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12072$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012073else
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12075$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012076fi
12077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012079 test -n "$TRUE" && break
12080done
12081test -n "$TRUE" || TRUE="/bin/true"
12082
12083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12085$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088else
12089 ac_check_lib_save_LIBS=$LIBS
12090LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012092/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094/* Override any GCC internal prototype to avoid an error.
12095 Use char because int might match the return type of a GCC
12096 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012097#ifdef __cplusplus
12098extern "C"
12099#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012101int
12102main ()
12103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012110 ac_cv_lib_c_inet_aton=yes
12111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012114rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012116LIBS=$ac_check_lib_save_LIBS
12117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12119$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012121 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12124$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012125if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012127else
12128 ac_check_lib_save_LIBS=$LIBS
12129LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133/* Override any GCC internal prototype to avoid an error.
12134 Use char because int might match the return type of a GCC
12135 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012136#ifdef __cplusplus
12137extern "C"
12138#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012139char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012140int
12141main ()
12142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012143return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012144 ;
12145 return 0;
12146}
12147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012148if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012149 ac_cv_lib_resolv_inet_aton=yes
12150else
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012153rm -f core conftest.err conftest.$ac_objext \
12154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012155LIBS=$ac_check_lib_save_LIBS
12156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12158$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012159if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012160 cat >>confdefs.h <<_ACEOF
12161#define HAVE_LIBRESOLV 1
12162_ACEOF
12163
12164 LIBS="-lresolv $LIBS"
12165
12166fi
12167
12168
12169fi
12170
12171
Christian Heimesd0764e22007-12-04 15:00:33 +000012172# On Tru64, chflags seems to be present, but calling it will
12173# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12175$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012176if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012178else
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012180 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012183/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012184
Christian Heimesd0764e22007-12-04 15:00:33 +000012185#include <sys/stat.h>
12186#include <unistd.h>
12187int main(int argc, char*argv[])
12188{
12189 if(chflags(argv[0], 0) != 0)
12190 return 1;
12191 return 0;
12192}
Ned Deily3eb67d52011-06-28 00:00:28 -070012193
Christian Heimesd0764e22007-12-04 15:00:33 +000012194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012195if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012196 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012197else
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12201 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012202fi
12203
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012204
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12207$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012208if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012210if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012211 ac_cv_have_chflags="yes"
12212else
12213 ac_cv_have_chflags="no"
12214fi
12215
12216fi
12217if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012218
Matthias Kloseb9621712010-04-24 17:59:49 +000012219$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012220
12221fi
12222
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12224$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012225if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012227else
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012229 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012230else
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012232/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012233
Christian Heimesd0764e22007-12-04 15:00:33 +000012234#include <sys/stat.h>
12235#include <unistd.h>
12236int main(int argc, char*argv[])
12237{
12238 if(lchflags(argv[0], 0) != 0)
12239 return 1;
12240 return 0;
12241}
Ned Deily3eb67d52011-06-28 00:00:28 -070012242
Christian Heimesd0764e22007-12-04 15:00:33 +000012243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012245 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12250 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012251fi
12252
12253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12256$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012257if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012259if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012260 ac_cv_have_lchflags="yes"
12261else
12262 ac_cv_have_lchflags="no"
12263fi
12264
12265fi
12266if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012269
12270fi
12271
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012272case $ac_sys_system/$ac_sys_release in
12273Darwin/*)
12274 _CUR_CFLAGS="${CFLAGS}"
12275 _CUR_LDFLAGS="${LDFLAGS}"
12276 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12277 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12278 ;;
12279esac
12280
Matthias Kloseb9621712010-04-24 17:59:49 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12282$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012283if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012285else
12286 ac_check_lib_save_LIBS=$LIBS
12287LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012289/* end confdefs.h. */
12290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291/* Override any GCC internal prototype to avoid an error.
12292 Use char because int might match the return type of a GCC
12293 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012294#ifdef __cplusplus
12295extern "C"
12296#endif
12297char inflateCopy ();
12298int
12299main ()
12300{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012302 ;
12303 return 0;
12304}
12305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012307 ac_cv_lib_z_inflateCopy=yes
12308else
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012311rm -f core conftest.err conftest.$ac_objext \
12312 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012313LIBS=$ac_check_lib_save_LIBS
12314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12316$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012317if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012318
Matthias Kloseb9621712010-04-24 17:59:49 +000012319$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012320
12321fi
12322
12323
12324case $ac_sys_system/$ac_sys_release in
12325Darwin/*)
12326 CFLAGS="${_CUR_CFLAGS}"
12327 LDFLAGS="${_CUR_LDFLAGS}"
12328 ;;
12329esac
12330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12332$as_echo_n "checking for hstrerror... " >&6; }
12333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012334/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012335
Martin v. Löwise9416172003-05-03 10:12:45 +000012336#include <netdb.h>
12337
Martin v. Löwise9416172003-05-03 10:12:45 +000012338int
12339main ()
12340{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012341void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012342 ;
12343 return 0;
12344}
12345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012349
Matthias Kloseb159a552010-04-25 21:00:44 +000012350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012351$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12354$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012355
12356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012357rm -f core conftest.err conftest.$ac_objext \
12358 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359
Matthias Kloseb9621712010-04-24 17:59:49 +000012360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12361$as_echo_n "checking for inet_aton... " >&6; }
12362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012363/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012364
Martin v. Löwis86d66262006-02-17 08:40:11 +000012365#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012366#include <sys/socket.h>
12367#include <netinet/in.h>
12368#include <arpa/inet.h>
12369
Martin v. Löwise9416172003-05-03 10:12:45 +000012370int
12371main ()
12372{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012373void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012374 ;
12375 return 0;
12376}
12377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012378if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012379
Matthias Kloseb9621712010-04-24 17:59:49 +000012380$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012381
Matthias Kloseb159a552010-04-25 21:00:44 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012383$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012384else
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12386$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012387
12388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012389rm -f core conftest.err conftest.$ac_objext \
12390 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391
Matthias Kloseb9621712010-04-24 17:59:49 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12393$as_echo_n "checking for inet_pton... " >&6; }
12394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012395/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012396
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012397#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012398#include <sys/socket.h>
12399#include <netinet/in.h>
12400#include <arpa/inet.h>
12401
Martin v. Löwise9416172003-05-03 10:12:45 +000012402int
12403main ()
12404{
12405void* p = inet_pton
12406 ;
12407 return 0;
12408}
12409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012413
Matthias Kloseb159a552010-04-25 21:00:44 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012415$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12418$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012419
12420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012422
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012423# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12425$as_echo_n "checking for setgroups... " >&6; }
12426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012427/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012428
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012429#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012430#ifdef HAVE_GRP_H
12431#include <grp.h>
12432#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012433
Martin v. Löwisd5843682002-11-21 20:41:28 +000012434int
12435main ()
12436{
12437void* p = setgroups
12438 ;
12439 return 0;
12440}
12441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012443
Matthias Kloseb9621712010-04-24 17:59:49 +000012444$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012445
Matthias Kloseb159a552010-04-25 21:00:44 +000012446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012447$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012448else
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12450$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012451
12452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012454
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012455# check for openpty and forkpty
12456
12457for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012458do :
12459 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012460if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012461 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012462#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012463_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012464
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012465else
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12467$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012468if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012470else
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012472LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476/* Override any GCC internal prototype to avoid an error.
12477 Use char because int might match the return type of a GCC
12478 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012479#ifdef __cplusplus
12480extern "C"
12481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012482char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012483int
12484main ()
12485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 ;
12488 return 0;
12489}
12490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012491if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012493else
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012496rm -f core conftest.err conftest.$ac_objext \
12497 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012498LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12501$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012502if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012504 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012505else
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12507$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012508if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012509 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012510else
12511 ac_check_lib_save_LIBS=$LIBS
12512LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012514/* end confdefs.h. */
12515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516/* Override any GCC internal prototype to avoid an error.
12517 Use char because int might match the return type of a GCC
12518 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012519#ifdef __cplusplus
12520extern "C"
12521#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012522char openpty ();
12523int
12524main ()
12525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012527 ;
12528 return 0;
12529}
12530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012532 ac_cv_lib_bsd_openpty=yes
12533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012536rm -f core conftest.err conftest.$ac_objext \
12537 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012538LIBS=$ac_check_lib_save_LIBS
12539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12541$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012542if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012543 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012544 LIBS="$LIBS -lbsd"
12545fi
12546
12547
12548fi
12549
Fred Drake8cef4cf2000-06-28 16:40:38 +000012550
12551fi
12552done
12553
12554for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012555do :
12556 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012557if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012559#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012560_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012561
Fred Drake8cef4cf2000-06-28 16:40:38 +000012562else
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12564$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012565if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012567else
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012569LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573/* Override any GCC internal prototype to avoid an error.
12574 Use char because int might match the return type of a GCC
12575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012576#ifdef __cplusplus
12577extern "C"
12578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012579char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012580int
12581main ()
12582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 ;
12585 return 0;
12586}
12587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012590else
Matthias Kloseb9621712010-04-24 17:59:49 +000012591 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012593rm -f core conftest.err conftest.$ac_objext \
12594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012595LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12598$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012599if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012601 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012602else
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12604$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012605if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012607else
12608 ac_check_lib_save_LIBS=$LIBS
12609LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012611/* end confdefs.h. */
12612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613/* Override any GCC internal prototype to avoid an error.
12614 Use char because int might match the return type of a GCC
12615 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012616#ifdef __cplusplus
12617extern "C"
12618#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012619char forkpty ();
12620int
12621main ()
12622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012623return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012624 ;
12625 return 0;
12626}
12627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012629 ac_cv_lib_bsd_forkpty=yes
12630else
Matthias Kloseb9621712010-04-24 17:59:49 +000012631 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012633rm -f core conftest.err conftest.$ac_objext \
12634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012635LIBS=$ac_check_lib_save_LIBS
12636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12638$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012639if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012641 LIBS="$LIBS -lbsd"
12642fi
12643
12644
12645fi
12646
Fred Drake8cef4cf2000-06-28 16:40:38 +000012647
12648fi
12649done
12650
Jack Jansendd19cf82001-12-06 22:36:17 +000012651
Michael W. Hudson54241132001-12-07 15:38:26 +000012652# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012653for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012654do :
12655 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12656ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012657if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012659#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012660_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012662fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012663done
12664
Michael W. Hudson54241132001-12-07 15:38:26 +000012665
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012666ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012667if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012668 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012669
Martin v. Löwis1142de32002-03-29 16:28:31 +000012670else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012672 *" dup2.$ac_objext "* ) ;;
12673 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012675esac
12676
Martin v. Löwis1142de32002-03-29 16:28:31 +000012677fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012678
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012679ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012680if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012681 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12682
12683else
12684 case " $LIBOBJS " in
12685 *" strdup.$ac_objext "* ) ;;
12686 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12687 ;;
12688esac
12689
12690fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012691
12692
12693for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012694do :
12695 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012696if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012698#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012701/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012702#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012703int
12704main ()
12705{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 ;
12708 return 0;
12709}
12710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Matthias Kloseb9621712010-04-24 17:59:49 +000012713$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012714
Guido van Rossum627b2d71993-12-24 10:39:16 +000012715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012717
Guido van Rossum627b2d71993-12-24 10:39:16 +000012718fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012719done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012720
Jack Jansen150753c2003-03-29 22:07:47 +000012721for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012722do :
12723 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012724if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012725 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012729/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012730#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012731int
12732main ()
12733{
12734setpgrp(0,0);
12735 ;
12736 return 0;
12737}
12738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012742
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012745
12746fi
12747done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012748
Thomas Wouters3a584202000-08-05 23:28:51 +000012749for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012750do :
12751 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012752if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012754#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012757/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012758#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012759int
12760main ()
12761{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 ;
12764 return 0;
12765}
12766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012767if ac_fn_c_try_compile "$LINENO"; then :
12768
Guido van Rossum627b2d71993-12-24 10:39:16 +000012769else
Skip Montanaro6dead952003-09-25 14:50:04 +000012770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012772
Martin v. Löwis11437992002-04-12 09:54:03 +000012773
Guido van Rossum627b2d71993-12-24 10:39:16 +000012774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012777fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012778done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012779
Michael W. Hudson54241132001-12-07 15:38:26 +000012780
Gregory P. Smith387512c2018-12-30 15:42:32 -080012781# We search for both crypt and crypt_r as one or the other may be defined
12782# This gets us our -lcrypt in LIBS when required on the target platform.
12783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12784$as_echo_n "checking for library containing crypt... " >&6; }
12785if ${ac_cv_search_crypt+:} false; then :
12786 $as_echo_n "(cached) " >&6
12787else
12788 ac_func_search_save_LIBS=$LIBS
12789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12790/* end confdefs.h. */
12791
12792/* Override any GCC internal prototype to avoid an error.
12793 Use char because int might match the return type of a GCC
12794 builtin and then its argument prototype would still apply. */
12795#ifdef __cplusplus
12796extern "C"
12797#endif
12798char crypt ();
12799int
12800main ()
12801{
12802return crypt ();
12803 ;
12804 return 0;
12805}
12806_ACEOF
12807for ac_lib in '' crypt; do
12808 if test -z "$ac_lib"; then
12809 ac_res="none required"
12810 else
12811 ac_res=-l$ac_lib
12812 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12813 fi
12814 if ac_fn_c_try_link "$LINENO"; then :
12815 ac_cv_search_crypt=$ac_res
12816fi
12817rm -f core conftest.err conftest.$ac_objext \
12818 conftest$ac_exeext
12819 if ${ac_cv_search_crypt+:} false; then :
12820 break
12821fi
12822done
12823if ${ac_cv_search_crypt+:} false; then :
12824
12825else
12826 ac_cv_search_crypt=no
12827fi
12828rm conftest.$ac_ext
12829LIBS=$ac_func_search_save_LIBS
12830fi
12831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12832$as_echo "$ac_cv_search_crypt" >&6; }
12833ac_res=$ac_cv_search_crypt
12834if test "$ac_res" != no; then :
12835 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12836
12837fi
12838
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12840$as_echo_n "checking for library containing crypt_r... " >&6; }
12841if ${ac_cv_search_crypt_r+:} false; then :
12842 $as_echo_n "(cached) " >&6
12843else
12844 ac_func_search_save_LIBS=$LIBS
12845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846/* end confdefs.h. */
12847
12848/* Override any GCC internal prototype to avoid an error.
12849 Use char because int might match the return type of a GCC
12850 builtin and then its argument prototype would still apply. */
12851#ifdef __cplusplus
12852extern "C"
12853#endif
12854char crypt_r ();
12855int
12856main ()
12857{
12858return crypt_r ();
12859 ;
12860 return 0;
12861}
12862_ACEOF
12863for ac_lib in '' crypt; do
12864 if test -z "$ac_lib"; then
12865 ac_res="none required"
12866 else
12867 ac_res=-l$ac_lib
12868 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12869 fi
12870 if ac_fn_c_try_link "$LINENO"; then :
12871 ac_cv_search_crypt_r=$ac_res
12872fi
12873rm -f core conftest.err conftest.$ac_objext \
12874 conftest$ac_exeext
12875 if ${ac_cv_search_crypt_r+:} false; then :
12876 break
12877fi
12878done
12879if ${ac_cv_search_crypt_r+:} false; then :
12880
12881else
12882 ac_cv_search_crypt_r=no
12883fi
12884rm conftest.$ac_ext
12885LIBS=$ac_func_search_save_LIBS
12886fi
12887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12888$as_echo "$ac_cv_search_crypt_r" >&6; }
12889ac_res=$ac_cv_search_crypt_r
12890if test "$ac_res" != no; then :
12891 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12892
12893fi
12894
12895
12896ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12897if test "x$ac_cv_func_crypt_r" = xyes; then :
12898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12899/* end confdefs.h. */
12900
12901#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12902#include <crypt.h>
12903
12904int
12905main ()
12906{
12907
12908struct crypt_data d;
12909char *r = crypt_r("", "", &d);
12910
12911 ;
12912 return 0;
12913}
12914_ACEOF
12915if ac_fn_c_try_compile "$LINENO"; then :
12916
12917$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12918
12919fi
12920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12921
12922fi
12923
12924
Victor Stinnere0be4232011-10-25 13:06:09 +020012925for ac_func in clock_gettime
12926do :
12927 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12928if test "x$ac_cv_func_clock_gettime" = xyes; then :
12929 cat >>confdefs.h <<_ACEOF
12930#define HAVE_CLOCK_GETTIME 1
12931_ACEOF
12932
12933else
12934
12935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12936$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12937if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12938 $as_echo_n "(cached) " >&6
12939else
12940 ac_check_lib_save_LIBS=$LIBS
12941LIBS="-lrt $LIBS"
12942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12943/* end confdefs.h. */
12944
12945/* Override any GCC internal prototype to avoid an error.
12946 Use char because int might match the return type of a GCC
12947 builtin and then its argument prototype would still apply. */
12948#ifdef __cplusplus
12949extern "C"
12950#endif
12951char clock_gettime ();
12952int
12953main ()
12954{
12955return clock_gettime ();
12956 ;
12957 return 0;
12958}
12959_ACEOF
12960if ac_fn_c_try_link "$LINENO"; then :
12961 ac_cv_lib_rt_clock_gettime=yes
12962else
12963 ac_cv_lib_rt_clock_gettime=no
12964fi
12965rm -f core conftest.err conftest.$ac_objext \
12966 conftest$ac_exeext conftest.$ac_ext
12967LIBS=$ac_check_lib_save_LIBS
12968fi
12969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12970$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12971if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12972
Victor Stinner7efb8332014-08-29 15:41:08 +020012973 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012974 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12975
12976
12977$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12978
12979
12980fi
12981
12982
12983fi
12984done
12985
12986
12987for ac_func in clock_getres
12988do :
12989 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12990if test "x$ac_cv_func_clock_getres" = xyes; then :
12991 cat >>confdefs.h <<_ACEOF
12992#define HAVE_CLOCK_GETRES 1
12993_ACEOF
12994
12995else
12996
12997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12998$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12999if ${ac_cv_lib_rt_clock_getres+:} false; then :
13000 $as_echo_n "(cached) " >&6
13001else
13002 ac_check_lib_save_LIBS=$LIBS
13003LIBS="-lrt $LIBS"
13004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13005/* end confdefs.h. */
13006
13007/* Override any GCC internal prototype to avoid an error.
13008 Use char because int might match the return type of a GCC
13009 builtin and then its argument prototype would still apply. */
13010#ifdef __cplusplus
13011extern "C"
13012#endif
13013char clock_getres ();
13014int
13015main ()
13016{
13017return clock_getres ();
13018 ;
13019 return 0;
13020}
13021_ACEOF
13022if ac_fn_c_try_link "$LINENO"; then :
13023 ac_cv_lib_rt_clock_getres=yes
13024else
13025 ac_cv_lib_rt_clock_getres=no
13026fi
13027rm -f core conftest.err conftest.$ac_objext \
13028 conftest$ac_exeext conftest.$ac_ext
13029LIBS=$ac_check_lib_save_LIBS
13030fi
13031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13032$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13033if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13034
13035 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13036
13037
13038fi
13039
13040
13041fi
13042done
13043
13044
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013045for ac_func in clock_settime
13046do :
13047 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13048if test "x$ac_cv_func_clock_settime" = xyes; then :
13049 cat >>confdefs.h <<_ACEOF
13050#define HAVE_CLOCK_SETTIME 1
13051_ACEOF
13052
13053else
13054
13055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13056$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13057if ${ac_cv_lib_rt_clock_settime+:} false; then :
13058 $as_echo_n "(cached) " >&6
13059else
13060 ac_check_lib_save_LIBS=$LIBS
13061LIBS="-lrt $LIBS"
13062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063/* end confdefs.h. */
13064
13065/* Override any GCC internal prototype to avoid an error.
13066 Use char because int might match the return type of a GCC
13067 builtin and then its argument prototype would still apply. */
13068#ifdef __cplusplus
13069extern "C"
13070#endif
13071char clock_settime ();
13072int
13073main ()
13074{
13075return clock_settime ();
13076 ;
13077 return 0;
13078}
13079_ACEOF
13080if ac_fn_c_try_link "$LINENO"; then :
13081 ac_cv_lib_rt_clock_settime=yes
13082else
13083 ac_cv_lib_rt_clock_settime=no
13084fi
13085rm -f core conftest.err conftest.$ac_objext \
13086 conftest$ac_exeext conftest.$ac_ext
13087LIBS=$ac_check_lib_save_LIBS
13088fi
13089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13090$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13091if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13092
13093 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13094
13095
13096fi
13097
13098
13099fi
13100done
13101
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13104$as_echo_n "checking for major... " >&6; }
13105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013106/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013107
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013108#if defined(MAJOR_IN_MKDEV)
13109#include <sys/mkdev.h>
13110#elif defined(MAJOR_IN_SYSMACROS)
13111#include <sys/sysmacros.h>
13112#else
13113#include <sys/types.h>
13114#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013115
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013116int
13117main ()
13118{
13119
13120 makedev(major(0),minor(0));
13121
13122 ;
13123 return 0;
13124}
13125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013126if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013127
13128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013130
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13132$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013133
13134else
Skip Montanaro6dead952003-09-25 14:50:04 +000013135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13137$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013138
13139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013140rm -f core conftest.err conftest.$ac_objext \
13141 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013142
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013143# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013144# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13146$as_echo_n "checking for getaddrinfo... " >&6; }
13147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013148/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013149
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013150#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013151#include <sys/socket.h>
13152#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013153#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154
Martin v. Löwis11437992002-04-12 09:54:03 +000013155int
13156main ()
13157{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013158getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 ;
13160 return 0;
13161}
13162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013163if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013164 have_getaddrinfo=yes
13165else
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013168rm -f core conftest.err conftest.$ac_objext \
13169 conftest$ac_exeext conftest.$ac_ext
13170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13171$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013172if test $have_getaddrinfo = yes
13173then
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13175$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013176 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013180
13181if test "${enable_ipv6+set}" = set; then
13182 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13183else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013184 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013185fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013186else
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013188/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013189
Stefan Krah19c21392012-11-22 23:47:32 +010013190#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013191#include <sys/types.h>
13192#include <netdb.h>
13193#include <string.h>
13194#include <sys/socket.h>
13195#include <netinet/in.h>
13196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013198{
13199 int passive, gaierr, inet4 = 0, inet6 = 0;
13200 struct addrinfo hints, *ai, *aitop;
13201 char straddr[INET6_ADDRSTRLEN], strport[16];
13202
13203 for (passive = 0; passive <= 1; passive++) {
13204 memset(&hints, 0, sizeof(hints));
13205 hints.ai_family = AF_UNSPEC;
13206 hints.ai_flags = passive ? AI_PASSIVE : 0;
13207 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013208 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013209 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13210 (void)gai_strerror(gaierr);
13211 goto bad;
13212 }
13213 for (ai = aitop; ai; ai = ai->ai_next) {
13214 if (ai->ai_addr == NULL ||
13215 ai->ai_addrlen == 0 ||
13216 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13217 straddr, sizeof(straddr), strport, sizeof(strport),
13218 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13219 goto bad;
13220 }
13221 switch (ai->ai_family) {
13222 case AF_INET:
13223 if (strcmp(strport, "54321") != 0) {
13224 goto bad;
13225 }
13226 if (passive) {
13227 if (strcmp(straddr, "0.0.0.0") != 0) {
13228 goto bad;
13229 }
13230 } else {
13231 if (strcmp(straddr, "127.0.0.1") != 0) {
13232 goto bad;
13233 }
13234 }
13235 inet4++;
13236 break;
13237 case AF_INET6:
13238 if (strcmp(strport, "54321") != 0) {
13239 goto bad;
13240 }
13241 if (passive) {
13242 if (strcmp(straddr, "::") != 0) {
13243 goto bad;
13244 }
13245 } else {
13246 if (strcmp(straddr, "::1") != 0) {
13247 goto bad;
13248 }
13249 }
13250 inet6++;
13251 break;
13252 case AF_UNSPEC:
13253 goto bad;
13254 break;
13255 default:
13256 /* another family support? */
13257 break;
13258 }
13259 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013260 freeaddrinfo(aitop);
13261 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013262 }
13263
13264 if (!(inet4 == 0 || inet4 == 2))
13265 goto bad;
13266 if (!(inet6 == 0 || inet6 == 2))
13267 goto bad;
13268
13269 if (aitop)
13270 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272
13273 bad:
13274 if (aitop)
13275 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013276 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013277}
13278
Martin v. Löwis11437992002-04-12 09:54:03 +000013279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013281 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13286 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13294$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13295
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013296if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013297then
13298 if test $ipv6 = yes
13299 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013300 echo 'Fatal: You must get working getaddrinfo() function.'
13301 echo ' or you can specify "--disable-ipv6"'.
13302 exit 1
13303 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013304else
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013307
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013309
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013310for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013311do :
13312 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013313if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013315#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013316_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013317
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013318fi
13319done
13320
Michael W. Hudson54241132001-12-07 15:38:26 +000013321
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13324$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013325if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330#include <sys/types.h>
13331#include <sys/time.h>
13332#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334int
13335main ()
13336{
13337if ((struct tm *) 0)
13338return 0;
13339 ;
13340 return 0;
13341}
13342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013345else
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13351$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013352if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013355
13356fi
13357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13359$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013360if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013364/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365#include <sys/types.h>
13366#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013367
Martin v. Löwis11437992002-04-12 09:54:03 +000013368int
13369main ()
13370{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371struct tm tm;
13372 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379 ac_cv_struct_tm=time.h
13380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13386$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013387if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390
13391fi
13392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393ac_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 +000013394#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396"
Victor Stinnere0be4232011-10-25 13:06:09 +020013397if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
13399cat >>confdefs.h <<_ACEOF
13400#define HAVE_STRUCT_TM_TM_ZONE 1
13401_ACEOF
13402
13403
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013404fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013409
13410else
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13412"
Victor Stinnere0be4232011-10-25 13:06:09 +020013413if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417fi
13418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013420#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421_ACEOF
13422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13424$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013425if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013426 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427else
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013430#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431#if !HAVE_DECL_TZNAME
13432extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
Martin v. Löwis11437992002-04-12 09:54:03 +000013435int
13436main ()
13437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013438return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 ;
13440 return 0;
13441}
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444 ac_cv_var_tzname=yes
13445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013448rm -f core conftest.err conftest.$ac_objext \
13449 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13452$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013453 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013456
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457 fi
13458fi
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460ac_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 +020013461if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013462
13463cat >>confdefs.h <<_ACEOF
13464#define HAVE_STRUCT_STAT_ST_RDEV 1
13465_ACEOF
13466
13467
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013468fi
13469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470ac_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 +020013471if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473cat >>confdefs.h <<_ACEOF
13474#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13475_ACEOF
13476
13477
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013478fi
13479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480ac_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 +020013481if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013482
13483cat >>confdefs.h <<_ACEOF
13484#define HAVE_STRUCT_STAT_ST_FLAGS 1
13485_ACEOF
13486
13487
13488fi
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490ac_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 +020013491if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013492
13493cat >>confdefs.h <<_ACEOF
13494#define HAVE_STRUCT_STAT_ST_GEN 1
13495_ACEOF
13496
13497
13498fi
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500ac_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 +020013501if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013502
13503cat >>confdefs.h <<_ACEOF
13504#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13505_ACEOF
13506
13507
13508fi
13509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510ac_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 +020013511if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013512
Martin v. Löwis11437992002-04-12 09:54:03 +000013513cat >>confdefs.h <<_ACEOF
13514#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13515_ACEOF
13516
13517
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013518fi
13519
Stefan Krah267b6392016-04-26 01:09:18 +020013520ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13521 #include <sys/types.h>
13522 #include <pwd.h>
13523
13524"
13525if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13526
13527cat >>confdefs.h <<_ACEOF
13528#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13529_ACEOF
13530
13531
13532fi
13533ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13534 #include <sys/types.h>
13535 #include <pwd.h>
13536
13537"
13538if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13539
13540cat >>confdefs.h <<_ACEOF
13541#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13542_ACEOF
13543
13544
13545fi
13546
Zachary Ware6a6967e2016-10-01 00:47:27 -050013547# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13548ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13549"
13550if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13551
13552cat >>confdefs.h <<_ACEOF
13553#define HAVE_SIGINFO_T_SI_BAND 1
13554_ACEOF
13555
13556
13557fi
13558
Michael W. Hudson54241132001-12-07 15:38:26 +000013559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13561$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013562if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013564else
Matthias Kloseb159a552010-04-25 21:00:44 +000013565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013567/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013568#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013569int
13570main ()
13571{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 ;
13574 return 0;
13575}
13576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013577if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578 ac_cv_header_time_altzone=yes
13579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584fi
13585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13587$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591
13592fi
13593
Guido van Rossumda88dad1995-01-26 00:46:29 +000013594was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13596$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013598/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013599
13600#include <sys/types.h>
13601#include <sys/select.h>
13602#include <sys/time.h>
13603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604int
13605main ()
13606{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013607;
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 ;
13609 return 0;
13610}
13611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013616
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013617 was_it_defined=yes
13618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13622$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13625$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013626if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013630/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013631#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013632int
13633main ()
13634{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013635struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ;
13637 return 0;
13638}
13639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013640if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641 ac_cv_struct_addrinfo=yes
13642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13646fi
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13649$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013650if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013653
13654fi
13655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13657$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013658if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013662/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013663
13664# include <sys/types.h>
13665# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013666int
13667main ()
13668{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013669struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 ;
13671 return 0;
13672}
13673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013675 ac_cv_struct_sockaddr_storage=yes
13676else
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13680fi
13681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13683$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013684if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013687
13688fi
13689
Christian Heimesdffa3942016-09-05 23:54:41 +020013690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13691$as_echo_n "checking for sockaddr_alg... " >&6; }
13692if ${ac_cv_struct_sockaddr_alg+:} false; then :
13693 $as_echo_n "(cached) " >&6
13694else
13695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13696/* end confdefs.h. */
13697
13698# include <sys/types.h>
13699# include <sys/socket.h>
13700# include <linux/if_alg.h>
13701int
13702main ()
13703{
13704struct sockaddr_alg s
13705 ;
13706 return 0;
13707}
13708_ACEOF
13709if ac_fn_c_try_compile "$LINENO"; then :
13710 ac_cv_struct_sockaddr_alg=yes
13711else
13712 ac_cv_struct_sockaddr_alg=no
13713fi
13714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13715fi
13716
13717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13718$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13719if test $ac_cv_struct_sockaddr_alg = yes; then
13720
13721$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13722
13723fi
13724
Guido van Rossum627b2d71993-12-24 10:39:16 +000013725# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13728$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013729if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013731else
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013734$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013735int
13736main ()
13737{
13738static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013739test_array [0] = 0;
13740return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
13742 ;
13743 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013744}
Martin v. Löwis11437992002-04-12 09:54:03 +000013745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013746if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013747 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013748else
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13754$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013755if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757
13758fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13761$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013762if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013764else
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013766/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013767
Martin v. Löwis11437992002-04-12 09:54:03 +000013768int
13769main ()
13770{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013771
Martin v. Löwis11437992002-04-12 09:54:03 +000013772#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013773 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013774 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013775 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013777 char const *const *pcpcc;
13778 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 /* NEC SVR4.0.2 mips cc rejects this. */
13780 struct point {int x, y;};
13781 static struct point const zero = {0,0};
13782 /* AIX XL C 1.02.0.0 rejects this.
13783 It does not let you subtract one const X* pointer from another in
13784 an arm of an if-expression whose if-part is not a constant
13785 expression */
13786 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789 ++pcpcc;
13790 ppc = (char**) pcpcc;
13791 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013792 { /* SCO 3.2v4 cc rejects this sort of thing. */
13793 char tx;
13794 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 }
13800 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13801 int x[] = {25, 17};
13802 const int *foo = &x[0];
13803 ++foo;
13804 }
13805 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13806 typedef const int *iptr;
13807 iptr p = 0;
13808 ++p;
13809 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013810 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013812 struct s { int j; const int *ap[3]; } bx;
13813 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 }
13815 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13816 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013817 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013820#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013821
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 ;
13823 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013824}
Martin v. Löwis11437992002-04-12 09:54:03 +000013825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013826if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013827 ac_cv_c_const=yes
13828else
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13834$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013835if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Matthias Kloseb9621712010-04-24 17:59:49 +000013837$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838
13839fi
13840
Michael W. Hudson54241132001-12-07 15:38:26 +000013841
Guido van Rossumda88dad1995-01-26 00:46:29 +000013842works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13844$as_echo_n "checking for working signed char... " >&6; }
13845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013846/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013847
Martin v. Löwis11437992002-04-12 09:54:03 +000013848int
13849main ()
13850{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013851signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013852 ;
13853 return 0;
13854}
13855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013856if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013857 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013858else
Skip Montanaro6dead952003-09-25 14:50:04 +000013859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013861
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013862
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13866$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013867
Guido van Rossumda88dad1995-01-26 00:46:29 +000013868have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13870$as_echo_n "checking for prototypes... " >&6; }
13871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013872/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013873int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013874int
13875main ()
13876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 ;
13879 return 0;
13880}
13881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013883
Matthias Kloseb9621712010-04-24 17:59:49 +000013884$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013885
Matthias Kloseb159a552010-04-25 21:00:44 +000013886 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13890$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891
Guido van Rossumda88dad1995-01-26 00:46:29 +000013892works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13894$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013896/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013897
13898#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013899int foo(int x, ...) {
13900 va_list va;
13901 va_start(va, x);
13902 va_arg(va, int);
13903 va_arg(va, char *);
13904 va_arg(va, double);
13905 return 0;
13906}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013907
Martin v. Löwis11437992002-04-12 09:54:03 +000013908int
13909main ()
13910{
Guido van Rossum90eea071996-08-30 20:58:57 +000013911return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 ;
13913 return 0;
13914}
13915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013917
13918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013921 works=yes
13922
Guido van Rossum627b2d71993-12-24 10:39:16 +000013923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13926$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013927
Martin v. Löwisd6320502004-08-12 13:45:08 +000013928# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13930$as_echo_n "checking for socketpair... " >&6; }
13931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013932/* end confdefs.h. */
13933
13934#include <sys/types.h>
13935#include <sys/socket.h>
13936
13937int
13938main ()
13939{
13940void *x=socketpair
13941 ;
13942 return 0;
13943}
13944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013945if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013948
Matthias Kloseb159a552010-04-25 21:00:44 +000013949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013951else
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13953$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013954
13955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013957
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013958# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13960$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013962/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013963#include <sys/types.h>
13964#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013965int
13966main ()
13967{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013968struct sockaddr x;
13969x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 ;
13971 return 0;
13972}
13973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if ac_fn_c_try_compile "$LINENO"; then :
13975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13976$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013979
13980else
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13982$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013983
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013986
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
13989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013991if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013994
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13996$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997 OLD_CFLAGS=$CFLAGS
13998 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014000/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014001
14002# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004int
14005main ()
14006{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014007
14008 char *name;
14009 struct hostent *he, *res;
14010 char buffer[2048];
14011 int buflen = 2048;
14012 int h_errnop;
14013
14014 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
14016 ;
14017 return 0;
14018}
14019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014023
Martin v. Löwis11437992002-04-12 09:54:03 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14028$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030else
Skip Montanaro6dead952003-09-25 14:50:04 +000014031
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14033$as_echo "no" >&6; }
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14035$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014037/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014038
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014039# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041int
14042main ()
14043{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044
14045 char *name;
14046 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014047 char buffer[2048];
14048 int buflen = 2048;
14049 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014050
Matthias Kloseb159a552010-04-25 21:00:44 +000014051 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
14053 ;
14054 return 0;
14055}
14056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014060
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
Matthias Kloseb159a552010-04-25 21:00:44 +000014062$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14065$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014067else
Skip Montanaro6dead952003-09-25 14:50:04 +000014068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14070$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14072$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14074/* end confdefs.h. */
14075
14076# include <netdb.h>
14077
14078int
14079main ()
14080{
14081
14082 char *name;
14083 struct hostent *he;
14084 struct hostent_data data;
14085
14086 (void) gethostbyname_r(name, he, &data);
14087
14088 ;
14089 return 0;
14090}
14091_ACEOF
14092if ac_fn_c_try_compile "$LINENO"; then :
14093
14094 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14095
14096
14097$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14098
14099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14100$as_echo "yes" >&6; }
14101
14102else
14103
14104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14105$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014115 CFLAGS=$OLD_CFLAGS
14116
14117else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 for ac_func in gethostbyname
14120do :
14121 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014122if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014124#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014125_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014126
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014127fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014128done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014129
Michael W. Hudson54241132001-12-07 15:38:26 +000014130
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014131fi
14132
Michael W. Hudson54241132001-12-07 15:38:26 +000014133
14134
14135
14136
14137
14138
Guido van Rossum627b2d71993-12-24 10:39:16 +000014139# checks for system services
14140# (none yet)
14141
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014142# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014143ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014144if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014145
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014146else
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14148$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014149if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014151else
Martin v. Löwis11437992002-04-12 09:54:03 +000014152 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014153LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157/* Override any GCC internal prototype to avoid an error.
14158 Use char because int might match the return type of a GCC
14159 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014160#ifdef __cplusplus
14161extern "C"
14162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014163char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014164int
14165main ()
14166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014168 ;
14169 return 0;
14170}
14171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014172if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014174else
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014177rm -f core conftest.err conftest.$ac_objext \
14178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014179LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14182$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014183if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 cat >>confdefs.h <<_ACEOF
14185#define HAVE_LIBIEEE 1
14186_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014187
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014188 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014189
Guido van Rossum627b2d71993-12-24 10:39:16 +000014190fi
14191
Michael W. Hudson54241132001-12-07 15:38:26 +000014192
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014193fi
14194
Michael W. Hudson54241132001-12-07 15:38:26 +000014195
Guido van Rossum7f43da71994-08-01 12:15:30 +000014196# check for --with-libm=...
14197
Guido van Rossum563e7081996-09-10 18:20:48 +000014198case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014199Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014200*) LIBM=-lm
14201esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14203$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014206if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014208if test "$withval" = no
14209then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14211$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014212elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014213then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14215$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014216else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014217fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014218else
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14220$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221fi
14222
Guido van Rossum7f43da71994-08-01 12:15:30 +000014223
14224# check for --with-libc=...
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14227$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014229# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014230if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014232if test "$withval" = no
14233then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14235$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014236elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014237then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14239$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014240else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014241fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014242else
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14244$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245fi
14246
Guido van Rossum7f43da71994-08-01 12:15:30 +000014247
Stefan Krah1919b7e2012-03-21 18:25:23 +010014248# **************************************
14249# * Check for gcc x64 inline assembler *
14250# **************************************
14251
14252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14253$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14255/* end confdefs.h. */
14256
14257int
14258main ()
14259{
14260
14261 __asm__ __volatile__ ("movq %rcx, %rax");
14262
14263 ;
14264 return 0;
14265}
14266_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014267if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014268 have_gcc_asm_for_x64=yes
14269else
14270 have_gcc_asm_for_x64=no
14271fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014272rm -f core conftest.err conftest.$ac_objext \
14273 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14275$as_echo "$have_gcc_asm_for_x64" >&6; }
14276if test "$have_gcc_asm_for_x64" = yes
14277then
14278
14279$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14280
14281fi
14282
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014283# **************************************************
14284# * Check for various properties of floating point *
14285# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014286
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14288$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14289if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014291else
14292
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014293
14294ax_cv_c_float_words_bigendian=unknown
14295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014296/* end confdefs.h. */
14297
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014298
14299double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14300
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014301
14302_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014303if ac_fn_c_try_compile "$LINENO"; then :
14304
14305
Miss Islington (bot)fc036402020-04-01 08:38:17 -070014306if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014307 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014308fi
Miss Islington (bot)fc036402020-04-01 08:38:17 -070014309if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014310 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14311 ax_cv_c_float_words_bigendian=no
14312 else
14313 ax_cv_c_float_words_bigendian=unknown
14314 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014315fi
14316
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014317
14318fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014320fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14322$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014323
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014324case $ax_cv_c_float_words_bigendian in
14325 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014326
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014327$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14328 ;;
14329 no)
14330 ;;
14331 *)
14332 as_fn_error $? "
14333
14334Unknown float word ordering. You need to manually preset
14335ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14336
14337 " "$LINENO" 5 ;;
14338esac
14339
14340
14341if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014342then
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014345
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014346elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014347then
14348
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014349$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14350
14351else
14352 # Some ARM platforms use a mixed-endian representation for doubles.
14353 # While Python doesn't currently have full support for these platforms
14354 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14355 # conversions work.
14356 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14357 # or little, then it must be this?
14358
Matthias Kloseb9621712010-04-24 17:59:49 +000014359$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014360
14361fi
14362
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014363# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014364# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014365# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014366# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014367# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014368# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014369
14370# This inline assembler syntax may also work for suncc and icc,
14371# so we try it on all platforms.
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14374$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014376/* end confdefs.h. */
14377
14378int
14379main ()
14380{
14381
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014382 unsigned short cw;
14383 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14384 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014385
14386 ;
14387 return 0;
14388}
14389_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014390if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014391 have_gcc_asm_for_x87=yes
14392else
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014394fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014395rm -f core conftest.err conftest.$ac_objext \
14396 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14398$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014399if test "$have_gcc_asm_for_x87" = yes
14400then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014401
Matthias Kloseb9621712010-04-24 17:59:49 +000014402$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014403
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014404fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014405
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14407$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14409/* end confdefs.h. */
14410
14411int
14412main ()
14413{
14414
14415 unsigned int fpcr;
14416 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14417 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14418
14419 ;
14420 return 0;
14421}
14422_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014423if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014424 have_gcc_asm_for_mc68881=yes
14425else
14426 have_gcc_asm_for_mc68881=no
14427fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014428rm -f core conftest.err conftest.$ac_objext \
14429 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14431$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14432if test "$have_gcc_asm_for_mc68881" = yes
14433then
14434
14435$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14436
14437fi
14438
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014439# Detect whether system arithmetic is subject to x87-style double
14440# rounding issues. The result of this test has little meaning on non
14441# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14442# mode is round-to-nearest and double rounding issues are present, and
14443# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14445$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014446# $BASECFLAGS may affect the result
14447ac_save_cc="$CC"
14448CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014449if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014450 ac_cv_x87_double_rounding=no
14451else
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014453/* end confdefs.h. */
14454
14455#include <stdlib.h>
14456#include <math.h>
14457int main() {
14458 volatile double x, y, z;
14459 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14460 x = 0.99999999999999989; /* 1-2**-53 */
14461 y = 1./x;
14462 if (y != 1.)
14463 exit(0);
14464 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14465 x = 1e16;
14466 y = 2.99999;
14467 z = x + y;
14468 if (z != 1e16+4.)
14469 exit(0);
14470 /* both tests show evidence of double rounding */
14471 exit(1);
14472}
14473
14474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014475if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014476 ac_cv_x87_double_rounding=no
14477else
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014482fi
14483
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014484CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14486$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014487if test "$ac_cv_x87_double_rounding" = yes
14488then
14489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014491
14492fi
14493
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014494# ************************************
14495# * Check for mathematical functions *
14496# ************************************
14497
14498LIBS_SAVE=$LIBS
14499LIBS="$LIBS $LIBM"
14500
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014501for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14502do :
14503 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14504ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014505if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014506 cat >>confdefs.h <<_ACEOF
14507#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14508_ACEOF
14509
14510fi
14511done
14512
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014513for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014514do :
14515 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14516ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014517if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014518 cat >>confdefs.h <<_ACEOF
14519#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14520_ACEOF
14521
14522fi
14523done
14524
14525ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14526"
Victor Stinnere0be4232011-10-25 13:06:09 +020014527if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014528 ac_have_decl=1
14529else
14530 ac_have_decl=0
14531fi
14532
14533cat >>confdefs.h <<_ACEOF
14534#define HAVE_DECL_ISINF $ac_have_decl
14535_ACEOF
14536ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14537"
Victor Stinnere0be4232011-10-25 13:06:09 +020014538if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014539 ac_have_decl=1
14540else
14541 ac_have_decl=0
14542fi
14543
14544cat >>confdefs.h <<_ACEOF
14545#define HAVE_DECL_ISNAN $ac_have_decl
14546_ACEOF
14547ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14548"
Victor Stinnere0be4232011-10-25 13:06:09 +020014549if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014550 ac_have_decl=1
14551else
14552 ac_have_decl=0
14553fi
14554
14555cat >>confdefs.h <<_ACEOF
14556#define HAVE_DECL_ISFINITE $ac_have_decl
14557_ACEOF
14558
14559
Mark Dickinsona614f042009-11-28 12:48:43 +000014560# For multiprocessing module, check that sem_open
14561# actually works. For FreeBSD versions <= 7.2,
14562# the kernel module that provides POSIX semaphores
14563# isn't loaded by default, so an attempt to call
14564# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14566$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014567if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014571 ac_cv_posix_semaphores_enabled=yes
14572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014574/* end confdefs.h. */
14575
14576#include <unistd.h>
14577#include <fcntl.h>
14578#include <stdio.h>
14579#include <semaphore.h>
14580#include <sys/stat.h>
14581
14582int main(void) {
14583 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14584 if (a == SEM_FAILED) {
14585 perror("sem_open");
14586 return 1;
14587 }
14588 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014589 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014590 return 0;
14591}
14592
14593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014594if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014595 ac_cv_posix_semaphores_enabled=yes
14596else
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14600 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014601fi
14602
14603
Mark Dickinsona614f042009-11-28 12:48:43 +000014604fi
14605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14607$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014608if test $ac_cv_posix_semaphores_enabled = no
14609then
14610
Matthias Kloseb9621712010-04-24 17:59:49 +000014611$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014612
14613fi
14614
Mark Dickinson10683072009-04-18 21:18:19 +000014615# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14617$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014618if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014620else
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014622 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014623else
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014625/* end confdefs.h. */
14626
14627#include <unistd.h>
14628#include <fcntl.h>
14629#include <stdio.h>
14630#include <semaphore.h>
14631#include <sys/stat.h>
14632
14633int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014634 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014635 int count;
14636 int res;
14637 if(a==SEM_FAILED){
14638 perror("sem_open");
14639 return 1;
14640
14641 }
14642 res = sem_getvalue(a, &count);
14643 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014644 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014645 return res==-1 ? 1 : 0;
14646}
14647
Mark Dickinson10683072009-04-18 21:18:19 +000014648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014650 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014651else
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014656fi
14657
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014658
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014659fi
14660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14662$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014663if test $ac_cv_broken_sem_getvalue = yes
14664then
14665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014667
14668fi
14669
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014670ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14671"
14672if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14673 ac_have_decl=1
14674else
14675 ac_have_decl=0
14676fi
14677
14678cat >>confdefs.h <<_ACEOF
14679#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14680_ACEOF
14681ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14682"
14683if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14684 ac_have_decl=1
14685else
14686 ac_have_decl=0
14687fi
14688
14689cat >>confdefs.h <<_ACEOF
14690#define HAVE_DECL_RTLD_NOW $ac_have_decl
14691_ACEOF
14692ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14693"
14694if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14695 ac_have_decl=1
14696else
14697 ac_have_decl=0
14698fi
14699
14700cat >>confdefs.h <<_ACEOF
14701#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14702_ACEOF
14703ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14704"
14705if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14706 ac_have_decl=1
14707else
14708 ac_have_decl=0
14709fi
14710
14711cat >>confdefs.h <<_ACEOF
14712#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14713_ACEOF
14714ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14715"
14716if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14717 ac_have_decl=1
14718else
14719 ac_have_decl=0
14720fi
14721
14722cat >>confdefs.h <<_ACEOF
14723#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14724_ACEOF
14725ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14726"
14727if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14728 ac_have_decl=1
14729else
14730 ac_have_decl=0
14731fi
14732
14733cat >>confdefs.h <<_ACEOF
14734#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14735_ACEOF
14736ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14737"
14738if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14739 ac_have_decl=1
14740else
14741 ac_have_decl=0
14742fi
14743
14744cat >>confdefs.h <<_ACEOF
14745#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14746_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014747ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14748"
14749if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14750 ac_have_decl=1
14751else
14752 ac_have_decl=0
14753fi
14754
14755cat >>confdefs.h <<_ACEOF
14756#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14757_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014758
14759
Mark Dickinsonbd792642009-03-18 20:06:12 +000014760# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14762$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014763# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014765 enableval=$enable_big_digits; case $enable_big_digits in
14766yes)
14767 enable_big_digits=30 ;;
14768no)
14769 enable_big_digits=15 ;;
1477015|30)
14771 ;;
14772*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014773 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 +000014774esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14776$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014777
14778cat >>confdefs.h <<_ACEOF
14779#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14780_ACEOF
14781
14782
14783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14785$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014786fi
14787
14788
Guido van Rossumef2255b2000-03-10 22:30:29 +000014789# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014790ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014791if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014792
14793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014796 wchar_h="yes"
14797
Guido van Rossumef2255b2000-03-10 22:30:29 +000014798else
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014800
14801fi
14802
Michael W. Hudson54241132001-12-07 15:38:26 +000014803
Martin v. Löwis11437992002-04-12 09:54:03 +000014804
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014805# determine wchar_t size
14806if test "$wchar_h" = yes
14807then
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14811# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14813$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014814if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014816else
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14818"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014819
Martin v. Löwis11437992002-04-12 09:54:03 +000014820else
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 if test "$ac_cv_type_wchar_t" = yes; then
14822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014824as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014825See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826 else
14827 ac_cv_sizeof_wchar_t=0
14828 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014830
Martin v. Löwis11437992002-04-12 09:54:03 +000014831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14833$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834
14835
14836
Martin v. Löwis11437992002-04-12 09:54:03 +000014837cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014838#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014839_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014840
Michael W. Hudson54241132001-12-07 15:38:26 +000014841
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014842fi
14843
Matthias Kloseb9621712010-04-24 17:59:49 +000014844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14845$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014846have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014848/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014849
14850#include <tcl.h>
14851#if TCL_UTF_MAX != 6
14852# error "NOT UCS4_TCL"
14853#endif
14854int
14855main ()
14856{
14857
14858 ;
14859 return 0;
14860}
14861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014862if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014863
14864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014866
14867 have_ucs4_tcl=yes
14868
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14872$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014873
Skip Montanaro6dead952003-09-25 14:50:04 +000014874# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014875if test "$wchar_h" = yes
14876then
14877 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14879$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014880 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014882else
14883
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014885 ac_cv_wchar_t_signed=yes
14886else
Matthias Kloseb9621712010-04-24 17:59:49 +000014887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014888/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014889
14890 #include <wchar.h>
14891 int main()
14892 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014893 /* Success: exit code 0 */
14894 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014895 }
14896
14897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014898if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014899 ac_cv_wchar_t_signed=yes
14900else
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014905fi
14906
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014907fi
14908
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14910$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911fi
14912
Michael Osipov3738fad2018-08-24 18:17:19 +020014913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14914$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014915# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014916if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014917 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014918then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014921
Michael Osipov3738fad2018-08-24 18:17:19 +020014922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14923$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014924else
Michael Osipov3738fad2018-08-24 18:17:19 +020014925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14926$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014927fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014928
14929# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14931$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014932if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014934else
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 ac_cv_c_bigendian=unknown
14936 # See if we're dealing with a universal compiler.
14937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14938/* end confdefs.h. */
14939#ifndef __APPLE_CC__
14940 not a universal capable compiler
14941 #endif
14942 typedef int dummy;
14943
Skip Montanaro6dead952003-09-25 14:50:04 +000014944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014945if ac_fn_c_try_compile "$LINENO"; then :
14946
14947 # Check for potential -arch flags. It is not universal unless
14948 # there are at least two -arch flags with different values.
14949 ac_arch=
14950 ac_prev=
14951 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14952 if test -n "$ac_prev"; then
14953 case $ac_word in
14954 i?86 | x86_64 | ppc | ppc64)
14955 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14956 ac_arch=$ac_word
14957 else
14958 ac_cv_c_bigendian=universal
14959 break
14960 fi
14961 ;;
14962 esac
14963 ac_prev=
14964 elif test "x$ac_word" = "x-arch"; then
14965 ac_prev=arch
14966 fi
14967 done
14968fi
14969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14970 if test $ac_cv_c_bigendian = unknown; then
14971 # See if sys/param.h defines the BYTE_ORDER macro.
14972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014973/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014974#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014976
Martin v. Löwis11437992002-04-12 09:54:03 +000014977int
14978main ()
14979{
Matthias Kloseb9621712010-04-24 17:59:49 +000014980#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14981 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14982 && LITTLE_ENDIAN)
14983 bogus endian macros
14984 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014985
14986 ;
14987 return 0;
14988}
14989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014990if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014991 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014993/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014994#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014996
Martin v. Löwis11437992002-04-12 09:54:03 +000014997int
14998main ()
14999{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015000#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 not big endian
15002 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015003
15004 ;
15005 return 0;
15006}
15007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015008if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015009 ac_cv_c_bigendian=yes
15010else
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015014fi
15015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15016 fi
15017 if test $ac_cv_c_bigendian = unknown; then
15018 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015020/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015021#include <limits.h>
15022
Martin v. Löwis11437992002-04-12 09:54:03 +000015023int
15024main ()
15025{
Matthias Kloseb9621712010-04-24 17:59:49 +000015026#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15027 bogus endian macros
15028 #endif
15029
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 ;
15031 return 0;
15032}
15033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015034if ac_fn_c_try_compile "$LINENO"; then :
15035 # It does; now see whether it defined to _BIG_ENDIAN or not.
15036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15037/* end confdefs.h. */
15038#include <limits.h>
15039
15040int
15041main ()
15042{
15043#ifndef _BIG_ENDIAN
15044 not big endian
15045 #endif
15046
15047 ;
15048 return 0;
15049}
15050_ACEOF
15051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015053else
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15057fi
15058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15059 fi
15060 if test $ac_cv_c_bigendian = unknown; then
15061 # Compile a test program.
15062 if test "$cross_compiling" = yes; then :
15063 # Try to guess by grepping values from an object file.
15064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15065/* end confdefs.h. */
15066short int ascii_mm[] =
15067 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15068 short int ascii_ii[] =
15069 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15070 int use_ascii (int i) {
15071 return ascii_mm[i] + ascii_ii[i];
15072 }
15073 short int ebcdic_ii[] =
15074 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15075 short int ebcdic_mm[] =
15076 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15077 int use_ebcdic (int i) {
15078 return ebcdic_mm[i] + ebcdic_ii[i];
15079 }
15080 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081
Matthias Kloseb9621712010-04-24 17:59:49 +000015082int
15083main ()
15084{
15085return use_ascii (foo) == use_ebcdic (foo);
15086 ;
15087 return 0;
15088}
15089_ACEOF
15090if ac_fn_c_try_compile "$LINENO"; then :
15091 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15092 ac_cv_c_bigendian=yes
15093 fi
15094 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15095 if test "$ac_cv_c_bigendian" = unknown; then
15096 ac_cv_c_bigendian=no
15097 else
15098 # finding both strings is unlikely to happen, but who knows?
15099 ac_cv_c_bigendian=unknown
15100 fi
15101 fi
15102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015104else
Matthias Kloseb9621712010-04-24 17:59:49 +000015105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015106/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015108int
15109main ()
15110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 /* Are we little or big endian? From Harbison&Steele. */
15113 union
15114 {
15115 long int l;
15116 char c[sizeof (long int)];
15117 } u;
15118 u.l = 1;
15119 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120
15121 ;
15122 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015123}
Martin v. Löwis11437992002-04-12 09:54:03 +000015124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015125if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015126 ac_cv_c_bigendian=no
15127else
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15137$as_echo "$ac_cv_c_bigendian" >&6; }
15138 case $ac_cv_c_bigendian in #(
15139 yes)
15140 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15141;; #(
15142 no)
15143 ;; #(
15144 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015145
Matthias Kloseb9621712010-04-24 17:59:49 +000015146$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 ;; #(
15149 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015150 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015151 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015153
Michael W. Hudson54241132001-12-07 15:38:26 +000015154
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015155# ABI version string for Python extension modules. This appears between the
15156# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15157# from the following attributes which affect the ABI of this Python build (in
15158# this order):
15159#
15160# * The Python implementation (always 'cpython-' for us)
15161# * The major and minor version numbers
15162# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015163#
15164# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015165# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15166# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015167#
15168# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15169# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015170
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15172$as_echo_n "checking ABIFLAGS... " >&6; }
15173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15174$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15176$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015177SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15179$as_echo "$SOABI" >&6; }
15180
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015181# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15182if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015183 # Similar to SOABI but remove "d" flag from ABIFLAGS
15184
15185 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15186
15187cat >>confdefs.h <<_ACEOF
15188#define ALT_SOABI "${ALT_SOABI}"
15189_ACEOF
15190
15191fi
15192
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015193
15194case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015195 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015196 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15197 *)
15198 EXT_SUFFIX=${SHLIB_SUFFIX};;
15199esac
15200
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15202$as_echo_n "checking LDVERSION... " >&6; }
15203LDVERSION='$(VERSION)$(ABIFLAGS)'
15204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15205$as_echo "$LDVERSION" >&6; }
15206
E. M. Brayc994c8f2019-05-24 17:33:47 +020015207# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015208
E. M. Brayb1fc4172019-05-24 18:39:39 +020015209if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015210 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015211else
15212 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015213fi
15214
doko@python.org87421192013-01-26 11:39:31 +010015215
doko@ubuntu.com55532312016-06-14 08:55:19 +020015216if test x$PLATFORM_TRIPLET = x; then
15217 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15218else
15219 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15220fi
doko@python.org87421192013-01-26 11:39:31 +010015221
15222
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015223# Check whether right shifting a negative integer extends the sign bit
15224# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15226$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015227if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015229else
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
Matthias Kloseb9621712010-04-24 17:59:49 +000015231if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015232 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015233else
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015235/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015236
15237int main()
15238{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015239 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015240}
15241
Martin v. Löwis11437992002-04-12 09:54:03 +000015242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015243if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015244 ac_cv_rshift_extends_sign=yes
15245else
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015250fi
15251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252fi
15253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15255$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015256if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015257then
Martin v. Löwis11437992002-04-12 09:54:03 +000015258
Matthias Kloseb9621712010-04-24 17:59:49 +000015259$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015260
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015261fi
15262
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015263# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15265$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015266if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015268else
Martin v. Löwis11437992002-04-12 09:54:03 +000015269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015271/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015272#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015273int
15274main ()
15275{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015276
15277 FILE *f = fopen("/dev/null", "r");
15278 flockfile(f);
15279 getc_unlocked(f);
15280 funlockfile(f);
15281
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 ;
15283 return 0;
15284}
15285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015286if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015287 ac_cv_have_getc_unlocked=yes
15288else
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 ac_cv_have_getc_unlocked=no
15290fi
15291rm -f core conftest.err conftest.$ac_objext \
15292 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294
Matthias Kloseb9621712010-04-24 17:59:49 +000015295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15296$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015297if test "$ac_cv_have_getc_unlocked" = yes
15298then
Martin v. Löwis11437992002-04-12 09:54:03 +000015299
Matthias Kloseb9621712010-04-24 17:59:49 +000015300$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015301
15302fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015303
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015304# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015305# save the value of LIBS so we don't actually link Python with readline
15306LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015307
Gregory P. Smith18820942008-09-07 06:24:49 +000015308# On some systems we need to link readline to a termcap compatible
15309# library. NOTE: Keep the precedence of listed libraries synchronised
15310# with setup.py.
15311py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15313$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015314for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015315 if test -z "$py_libtermcap"; then
15316 READLINE_LIBS="-lreadline"
15317 else
15318 READLINE_LIBS="-lreadline -l$py_libtermcap"
15319 fi
15320 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015322/* end confdefs.h. */
15323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324/* Override any GCC internal prototype to avoid an error.
15325 Use char because int might match the return type of a GCC
15326 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015327#ifdef __cplusplus
15328extern "C"
15329#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015330char readline ();
15331int
15332main ()
15333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015335 ;
15336 return 0;
15337}
15338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015339if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015340 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015342rm -f core conftest.err conftest.$ac_objext \
15343 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015344 if test $py_cv_lib_readline = yes; then
15345 break
15346 fi
15347done
15348# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15349#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015350if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15352$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015353else
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15355$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015358
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015359fi
15360
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015361# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015363/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015364#include <readline/readline.h>
15365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015366if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015367 have_readline=yes
15368else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015369 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015370
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015371fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015372rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015373if test $have_readline = yes
15374then
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015376/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015377#include <readline/readline.h>
15378
15379_ACEOF
15380if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015384
15385fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015386rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015389/* end confdefs.h. */
15390#include <readline/readline.h>
15391
15392_ACEOF
15393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015395
Matthias Kloseb9621712010-04-24 17:59:49 +000015396$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015397
15398fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015399rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015400
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015401fi
15402
Martin v. Löwis0daad592001-09-30 21:09:59 +000015403# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15405$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015406if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015408else
Martin v. Löwis11437992002-04-12 09:54:03 +000015409 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015410LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015414/* Override any GCC internal prototype to avoid an error.
15415 Use char because int might match the return type of a GCC
15416 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015417#ifdef __cplusplus
15418extern "C"
15419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015420char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015421int
15422main ()
15423{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015425 ;
15426 return 0;
15427}
15428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015429if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015431else
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015434rm -f core conftest.err conftest.$ac_objext \
15435 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015436LIBS=$ac_check_lib_save_LIBS
15437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15439$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015440if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015441
Matthias Kloseb9621712010-04-24 17:59:49 +000015442$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015443
Martin v. Löwis0daad592001-09-30 21:09:59 +000015444fi
15445
Michael W. Hudson54241132001-12-07 15:38:26 +000015446
Thomas Wouters89d996e2007-09-08 17:39:28 +000015447# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15449$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015450if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015451 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015452else
15453 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015454LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015456/* end confdefs.h. */
15457
15458/* Override any GCC internal prototype to avoid an error.
15459 Use char because int might match the return type of a GCC
15460 builtin and then its argument prototype would still apply. */
15461#ifdef __cplusplus
15462extern "C"
15463#endif
15464char rl_completion_display_matches_hook ();
15465int
15466main ()
15467{
15468return rl_completion_display_matches_hook ();
15469 ;
15470 return 0;
15471}
15472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015473if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015474 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15475else
Matthias Kloseb9621712010-04-24 17:59:49 +000015476 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015478rm -f core conftest.err conftest.$ac_objext \
15479 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015480LIBS=$ac_check_lib_save_LIBS
15481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15483$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015484if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015485
Matthias Kloseb9621712010-04-24 17:59:49 +000015486$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015487
15488fi
15489
15490
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015491# also in 4.0, but not in editline
15492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15493$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15494if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15495 $as_echo_n "(cached) " >&6
15496else
15497 ac_check_lib_save_LIBS=$LIBS
15498LIBS="-lreadline $READLINE_LIBS $LIBS"
15499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500/* end confdefs.h. */
15501
15502/* Override any GCC internal prototype to avoid an error.
15503 Use char because int might match the return type of a GCC
15504 builtin and then its argument prototype would still apply. */
15505#ifdef __cplusplus
15506extern "C"
15507#endif
15508char rl_resize_terminal ();
15509int
15510main ()
15511{
15512return rl_resize_terminal ();
15513 ;
15514 return 0;
15515}
15516_ACEOF
15517if ac_fn_c_try_link "$LINENO"; then :
15518 ac_cv_lib_readline_rl_resize_terminal=yes
15519else
15520 ac_cv_lib_readline_rl_resize_terminal=no
15521fi
15522rm -f core conftest.err conftest.$ac_objext \
15523 conftest$ac_exeext conftest.$ac_ext
15524LIBS=$ac_check_lib_save_LIBS
15525fi
15526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15527$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15528if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15529
15530$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15531
15532fi
15533
15534
Martin v. Löwis0daad592001-09-30 21:09:59 +000015535# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15537$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015538if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015540else
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015542LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546/* Override any GCC internal prototype to avoid an error.
15547 Use char because int might match the return type of a GCC
15548 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015549#ifdef __cplusplus
15550extern "C"
15551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015552char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015553int
15554main ()
15555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015557 ;
15558 return 0;
15559}
15560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015561if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015563else
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015566rm -f core conftest.err conftest.$ac_objext \
15567 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015568LIBS=$ac_check_lib_save_LIBS
15569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15571$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015572if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015575
Guido van Rossum353ae582001-07-10 16:45:32 +000015576fi
15577
Jack Jansendd19cf82001-12-06 22:36:17 +000015578
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015579# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015581/* end confdefs.h. */
15582#include <readline/readline.h>
15583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015584if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015585 have_readline=yes
15586else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015587 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015588
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015589fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015590rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015591if test $have_readline = yes
15592then
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015594/* end confdefs.h. */
15595#include <readline/readline.h>
15596
15597_ACEOF
15598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015599 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015602
15603fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015604rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015605
15606fi
15607
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15609$as_echo_n "checking for append_history in -lreadline... " >&6; }
15610if ${ac_cv_lib_readline_append_history+:} false; then :
15611 $as_echo_n "(cached) " >&6
15612else
15613 ac_check_lib_save_LIBS=$LIBS
15614LIBS="-lreadline $READLINE_LIBS $LIBS"
15615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15616/* end confdefs.h. */
15617
15618/* Override any GCC internal prototype to avoid an error.
15619 Use char because int might match the return type of a GCC
15620 builtin and then its argument prototype would still apply. */
15621#ifdef __cplusplus
15622extern "C"
15623#endif
15624char append_history ();
15625int
15626main ()
15627{
15628return append_history ();
15629 ;
15630 return 0;
15631}
15632_ACEOF
15633if ac_fn_c_try_link "$LINENO"; then :
15634 ac_cv_lib_readline_append_history=yes
15635else
15636 ac_cv_lib_readline_append_history=no
15637fi
15638rm -f core conftest.err conftest.$ac_objext \
15639 conftest$ac_exeext conftest.$ac_ext
15640LIBS=$ac_check_lib_save_LIBS
15641fi
15642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15643$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15644if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15645
15646$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15647
15648fi
15649
15650
Martin v. Löwis82bca632006-02-10 20:49:30 +000015651# End of readline checks: restore LIBS
15652LIBS=$LIBS_no_readline
15653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15655$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015656if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015657 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015658else
Martin v. Löwis11437992002-04-12 09:54:03 +000015659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015661 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015662else
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015664/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015665
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015666#include <stdlib.h>
15667#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015668int main()
15669{
15670 int val1 = nice(1);
15671 if (val1 != -1 && val1 == nice(2))
15672 exit(0);
15673 exit(1);
15674}
15675
Martin v. Löwis11437992002-04-12 09:54:03 +000015676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015677if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015678 ac_cv_broken_nice=yes
15679else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015684fi
15685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015686fi
15687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15689$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015690if test "$ac_cv_broken_nice" = yes
15691then
Martin v. Löwis11437992002-04-12 09:54:03 +000015692
Matthias Kloseb9621712010-04-24 17:59:49 +000015693$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015694
15695fi
15696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15698$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015699if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015701else
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015703 ac_cv_broken_poll=no
15704else
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015706/* end confdefs.h. */
15707
15708#include <poll.h>
15709
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015710int main()
15711{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015712 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015713 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015714
15715 close (42);
15716
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015717 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015718 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015719 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015720 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015721 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015722 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015723 return 1;
15724}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015725
15726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015727if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015728 ac_cv_broken_poll=yes
15729else
Matthias Kloseb9621712010-04-24 17:59:49 +000015730 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015736fi
15737
Matthias Kloseb9621712010-04-24 17:59:49 +000015738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15739$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015740if test "$ac_cv_broken_poll" = yes
15741then
15742
Matthias Kloseb9621712010-04-24 17:59:49 +000015743$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015744
15745fi
15746
Martin v. Löwis1d459062005-03-14 21:23:33 +000015747# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15749$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015750if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015752else
15753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015755 ac_cv_working_tzset=no
15756else
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015758/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015759
15760#include <stdlib.h>
15761#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015762#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015763
15764#if HAVE_TZNAME
15765extern char *tzname[];
15766#endif
15767
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015768int main()
15769{
Brett Cannon18367812003-09-19 00:59:16 +000015770 /* Note that we need to ensure that not only does tzset(3)
15771 do 'something' with localtime, but it works as documented
15772 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015773 This includes making sure that tzname is set properly if
15774 tm->tm_zone does not exist since it is the alternative way
15775 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015776
15777 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015778 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015779 */
15780
Martin v. Löwis1d459062005-03-14 21:23:33 +000015781 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015782 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15783
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015784 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015785 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015786 if (localtime(&groundhogday)->tm_hour != 0)
15787 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015788#if HAVE_TZNAME
15789 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15790 if (strcmp(tzname[0], "UTC") ||
15791 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15792 exit(1);
15793#endif
Brett Cannon18367812003-09-19 00:59:16 +000015794
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015795 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015796 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015797 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015798 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015799#if HAVE_TZNAME
15800 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15801 exit(1);
15802#endif
Brett Cannon18367812003-09-19 00:59:16 +000015803
15804 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15805 tzset();
15806 if (localtime(&groundhogday)->tm_hour != 11)
15807 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015808#if HAVE_TZNAME
15809 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15810 exit(1);
15811#endif
15812
15813#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015814 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15815 exit(1);
15816 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15817 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015818#endif
Brett Cannon18367812003-09-19 00:59:16 +000015819
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015820 exit(0);
15821}
15822
15823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015824if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015825 ac_cv_working_tzset=yes
15826else
Matthias Kloseb9621712010-04-24 17:59:49 +000015827 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015831fi
15832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833fi
15834
Matthias Kloseb9621712010-04-24 17:59:49 +000015835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15836$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015837if test "$ac_cv_working_tzset" = yes
15838then
15839
Matthias Kloseb9621712010-04-24 17:59:49 +000015840$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015841
15842fi
15843
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015844# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15846$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015847if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015849else
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015851/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015852#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015853int
15854main ()
15855{
15856
15857struct stat st;
15858st.st_mtim.tv_nsec = 1;
15859
15860 ;
15861 return 0;
15862}
15863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015864if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015865 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015866else
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15870fi
15871
Matthias Kloseb9621712010-04-24 17:59:49 +000015872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15873$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015874if test "$ac_cv_stat_tv_nsec" = yes
15875then
15876
Matthias Kloseb9621712010-04-24 17:59:49 +000015877$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015878
15879fi
15880
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015881# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15883$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015884if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015886else
Matthias Kloseb9621712010-04-24 17:59:49 +000015887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015888/* end confdefs.h. */
15889#include <sys/stat.h>
15890int
15891main ()
15892{
15893
15894struct stat st;
15895st.st_mtimespec.tv_nsec = 1;
15896
15897 ;
15898 return 0;
15899}
15900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015901if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015902 ac_cv_stat_tv_nsec2=yes
15903else
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15907fi
15908
Matthias Kloseb9621712010-04-24 17:59:49 +000015909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15910$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015911if test "$ac_cv_stat_tv_nsec2" = yes
15912then
15913
Matthias Kloseb9621712010-04-24 17:59:49 +000015914$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015915
15916fi
15917
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015918# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015919ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015920if test "$cross_compiling" = no; then
15921 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15922fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015923
15924for ac_header in curses.h ncurses.h
15925do :
15926 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15927ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15928if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15929 cat >>confdefs.h <<_ACEOF
15930#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15931_ACEOF
15932
15933fi
15934
15935done
15936
15937
15938# On Solaris, term.h requires curses.h
15939for ac_header in term.h
15940do :
15941 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15942#ifdef HAVE_CURSES_H
15943#include <curses.h>
15944#endif
15945
15946"
15947if test "x$ac_cv_header_term_h" = xyes; then :
15948 cat >>confdefs.h <<_ACEOF
15949#define HAVE_TERM_H 1
15950_ACEOF
15951
15952fi
15953
15954done
15955
15956
Jack Jansen666b1e72001-10-31 12:11:48 +000015957# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15959$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015960if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015962else
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015964/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015965#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015966int
15967main ()
15968{
Jack Jansen666b1e72001-10-31 12:11:48 +000015969
15970 int rtn;
15971 rtn = mvwdelch(0,0,0);
15972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 ;
15974 return 0;
15975}
15976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015977if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015978 ac_cv_mvwdelch_is_expression=yes
15979else
Matthias Kloseb9621712010-04-24 17:59:49 +000015980 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15983fi
15984
Matthias Kloseb9621712010-04-24 17:59:49 +000015985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15986$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015987
15988if test "$ac_cv_mvwdelch_is_expression" = yes
15989then
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Matthias Kloseb9621712010-04-24 17:59:49 +000015991$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015992
15993fi
15994
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015995# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15996# structs since version 5.7. If the macro is defined as zero before including
15997# [n]curses.h, ncurses will expose fields of the structs regardless of the
15998# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16000$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016001if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016003else
Matthias Kloseb9621712010-04-24 17:59:49 +000016004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016005/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016006
16007 #define NCURSES_OPAQUE 0
16008 #include <curses.h>
16009
Martin v. Löwis11437992002-04-12 09:54:03 +000016010int
16011main ()
16012{
Jack Jansen666b1e72001-10-31 12:11:48 +000016013
16014 WINDOW *w;
16015 w->_flags = 0;
16016
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 ;
16018 return 0;
16019}
16020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016021if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016022 ac_cv_window_has_flags=yes
16023else
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16027fi
16028
Matthias Kloseb9621712010-04-24 17:59:49 +000016029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16030$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016031
Jack Jansen666b1e72001-10-31 12:11:48 +000016032
16033if test "$ac_cv_window_has_flags" = yes
16034then
Martin v. Löwis11437992002-04-12 09:54:03 +000016035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016037
16038fi
16039
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16041$as_echo_n "checking for is_pad... " >&6; }
16042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16043/* end confdefs.h. */
16044#include <curses.h>
16045int
16046main ()
16047{
16048
16049#ifndef is_pad
16050void *x=is_pad
16051#endif
16052
16053 ;
16054 return 0;
16055}
16056_ACEOF
16057if ac_fn_c_try_compile "$LINENO"; then :
16058
16059$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16060
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16062$as_echo "yes" >&6; }
16063else
16064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16065$as_echo "no" >&6; }
16066
16067fi
16068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16069
Matthias Kloseb9621712010-04-24 17:59:49 +000016070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16071$as_echo_n "checking for is_term_resized... " >&6; }
16072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016073/* end confdefs.h. */
16074#include <curses.h>
16075int
16076main ()
16077{
16078void *x=is_term_resized
16079 ;
16080 return 0;
16081}
16082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016084
Matthias Kloseb9621712010-04-24 17:59:49 +000016085$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016086
Matthias Kloseb159a552010-04-25 21:00:44 +000016087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016088$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016089else
Matthias Kloseb9621712010-04-24 17:59:49 +000016090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16091$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016092
16093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16095
Matthias Kloseb9621712010-04-24 17:59:49 +000016096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16097$as_echo_n "checking for resize_term... " >&6; }
16098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016099/* end confdefs.h. */
16100#include <curses.h>
16101int
16102main ()
16103{
16104void *x=resize_term
16105 ;
16106 return 0;
16107}
16108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016109if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016110
Matthias Kloseb9621712010-04-24 17:59:49 +000016111$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016112
Matthias Kloseb159a552010-04-25 21:00:44 +000016113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016114$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016115else
Matthias Kloseb9621712010-04-24 17:59:49 +000016116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16117$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016118
16119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16121
Matthias Kloseb9621712010-04-24 17:59:49 +000016122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16123$as_echo_n "checking for resizeterm... " >&6; }
16124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016125/* end confdefs.h. */
16126#include <curses.h>
16127int
16128main ()
16129{
16130void *x=resizeterm
16131 ;
16132 return 0;
16133}
16134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016135if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016136
Matthias Kloseb9621712010-04-24 17:59:49 +000016137$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016138
Matthias Kloseb159a552010-04-25 21:00:44 +000016139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016140$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016141else
Matthias Kloseb9621712010-04-24 17:59:49 +000016142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16143$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016144
16145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016147
16148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16149$as_echo_n "checking for immedok... " >&6; }
16150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16151/* end confdefs.h. */
16152#include <curses.h>
16153int
16154main ()
16155{
16156
16157#ifndef immedok
16158void *x=immedok
16159#endif
16160
16161 ;
16162 return 0;
16163}
16164_ACEOF
16165if ac_fn_c_try_compile "$LINENO"; then :
16166
16167$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16168
16169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16170$as_echo "yes" >&6; }
16171else
16172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16173$as_echo "no" >&6; }
16174
16175fi
16176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16177
16178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16179$as_echo_n "checking for syncok... " >&6; }
16180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16181/* end confdefs.h. */
16182#include <curses.h>
16183int
16184main ()
16185{
16186
16187#ifndef syncok
16188void *x=syncok
16189#endif
16190
16191 ;
16192 return 0;
16193}
16194_ACEOF
16195if ac_fn_c_try_compile "$LINENO"; then :
16196
16197$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16198
16199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16200$as_echo "yes" >&6; }
16201else
16202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16203$as_echo "no" >&6; }
16204
16205fi
16206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16207
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16209$as_echo_n "checking for wchgat... " >&6; }
16210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16211/* end confdefs.h. */
16212#include <curses.h>
16213int
16214main ()
16215{
16216
16217#ifndef wchgat
16218void *x=wchgat
16219#endif
16220
16221 ;
16222 return 0;
16223}
16224_ACEOF
16225if ac_fn_c_try_compile "$LINENO"; then :
16226
16227$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16228
16229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16230$as_echo "yes" >&6; }
16231else
16232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16233$as_echo "no" >&6; }
16234
16235fi
16236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16237
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16239$as_echo_n "checking for filter... " >&6; }
16240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16241/* end confdefs.h. */
16242#include <curses.h>
16243int
16244main ()
16245{
16246
16247#ifndef filter
16248void *x=filter
16249#endif
16250
16251 ;
16252 return 0;
16253}
16254_ACEOF
16255if ac_fn_c_try_compile "$LINENO"; then :
16256
16257$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16258
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16260$as_echo "yes" >&6; }
16261else
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16263$as_echo "no" >&6; }
16264
16265fi
16266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16267
16268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16269$as_echo_n "checking for has_key... " >&6; }
16270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16271/* end confdefs.h. */
16272#include <curses.h>
16273int
16274main ()
16275{
16276
16277#ifndef has_key
16278void *x=has_key
16279#endif
16280
16281 ;
16282 return 0;
16283}
16284_ACEOF
16285if ac_fn_c_try_compile "$LINENO"; then :
16286
16287$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16288
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16290$as_echo "yes" >&6; }
16291else
16292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16293$as_echo "no" >&6; }
16294
16295fi
16296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16297
16298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16299$as_echo_n "checking for typeahead... " >&6; }
16300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16301/* end confdefs.h. */
16302#include <curses.h>
16303int
16304main ()
16305{
16306
16307#ifndef typeahead
16308void *x=typeahead
16309#endif
16310
16311 ;
16312 return 0;
16313}
16314_ACEOF
16315if ac_fn_c_try_compile "$LINENO"; then :
16316
16317$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16318
16319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16320$as_echo "yes" >&6; }
16321else
16322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16323$as_echo "no" >&6; }
16324
16325fi
16326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16327
16328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16329$as_echo_n "checking for use_env... " >&6; }
16330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16331/* end confdefs.h. */
16332#include <curses.h>
16333int
16334main ()
16335{
16336
16337#ifndef use_env
16338void *x=use_env
16339#endif
16340
16341 ;
16342 return 0;
16343}
16344_ACEOF
16345if ac_fn_c_try_compile "$LINENO"; then :
16346
16347$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16348
16349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16350$as_echo "yes" >&6; }
16351else
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16353$as_echo "no" >&6; }
16354
16355fi
16356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016357# last curses configure check
16358CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16361$as_echo "$as_me: checking for device files" >&6;}
16362
16363if test "x$cross_compiling" = xyes; then
16364 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16366$as_echo_n "checking for /dev/ptmx... " >&6; }
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16368$as_echo "not set" >&6; }
16369 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16370 fi
16371 if test "${ac_cv_file__dev_ptc+set}" != set; then
16372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16373$as_echo_n "checking for /dev/ptc... " >&6; }
16374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16375$as_echo "not set" >&6; }
16376 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16377 fi
16378fi
16379
Matthias Kloseb9621712010-04-24 17:59:49 +000016380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16381$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016382if ${ac_cv_file__dev_ptmx+:} false; then :
16383 $as_echo_n "(cached) " >&6
16384else
16385 test "$cross_compiling" = yes &&
16386 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16387if test -r "/dev/ptmx"; then
16388 ac_cv_file__dev_ptmx=yes
16389else
16390 ac_cv_file__dev_ptmx=no
16391fi
16392fi
16393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16394$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16395if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016396
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016397fi
16398
16399if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016400
Matthias Kloseb9621712010-04-24 17:59:49 +000016401$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016402
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16405$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016406if ${ac_cv_file__dev_ptc+:} false; then :
16407 $as_echo_n "(cached) " >&6
16408else
16409 test "$cross_compiling" = yes &&
16410 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16411if test -r "/dev/ptc"; then
16412 ac_cv_file__dev_ptc=yes
16413else
16414 ac_cv_file__dev_ptc=no
16415fi
16416fi
16417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16418$as_echo "$ac_cv_file__dev_ptc" >&6; }
16419if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016420
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016421fi
16422
16423if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016424
Matthias Kloseb9621712010-04-24 17:59:49 +000016425$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016426
Neal Norwitz865400f2003-03-21 01:42:58 +000016427fi
16428
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016429if test $ac_sys_system = Darwin
16430then
16431 LIBS="$LIBS -framework CoreFoundation"
16432fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016433
Matthias Kloseb9621712010-04-24 17:59:49 +000016434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16435$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016436if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016437 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016438else
Matthias Kloseb9621712010-04-24 17:59:49 +000016439 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016440 ac_cv_have_size_t_format="cross -- assuming yes"
16441
Thomas Wouters477c8d52006-05-27 19:21:47 +000016442else
Matthias Kloseb9621712010-04-24 17:59:49 +000016443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016444/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016445
Thomas Wouters477c8d52006-05-27 19:21:47 +000016446#include <stdio.h>
16447#include <stddef.h>
16448#include <string.h>
16449
Christian Heimes2c181612007-12-17 20:04:13 +000016450#ifdef HAVE_SYS_TYPES_H
16451#include <sys/types.h>
16452#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016453
16454#ifdef HAVE_SSIZE_T
16455typedef ssize_t Py_ssize_t;
16456#elif SIZEOF_VOID_P == SIZEOF_LONG
16457typedef long Py_ssize_t;
16458#else
16459typedef int Py_ssize_t;
16460#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016461
Christian Heimes2c181612007-12-17 20:04:13 +000016462int main()
16463{
16464 char buffer[256];
16465
Thomas Wouters477c8d52006-05-27 19:21:47 +000016466 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16467 return 1;
16468
Thomas Wouters89f507f2006-12-13 04:49:30 +000016469 if (strcmp(buffer, "123"))
16470 return 1;
16471
16472 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16473 return 1;
16474
16475 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016476 return 1;
16477
16478 return 0;
16479}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016480
Thomas Wouters477c8d52006-05-27 19:21:47 +000016481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016482if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016483 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016484else
Matthias Kloseb9621712010-04-24 17:59:49 +000016485 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16488 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016489fi
16490
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16493$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016494if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016495
Matthias Kloseb9621712010-04-24 17:59:49 +000016496$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016497
16498fi
16499
Matthias Kloseb9621712010-04-24 17:59:49 +000016500ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016501#ifdef HAVE_SYS_TYPES_H
16502#include <sys/types.h>
16503#endif
16504#ifdef HAVE_SYS_SOCKET_H
16505#include <sys/socket.h>
16506#endif
16507
Matthias Kloseb9621712010-04-24 17:59:49 +000016508"
Victor Stinnere0be4232011-10-25 13:06:09 +020016509if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016510
Martin v. Löwis11437992002-04-12 09:54:03 +000016511else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016512
Matthias Kloseb9621712010-04-24 17:59:49 +000016513$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016514
16515fi
16516
Michael W. Hudson54241132001-12-07 15:38:26 +000016517
Matthias Kloseb9621712010-04-24 17:59:49 +000016518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16519$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016520if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016521 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016522else
Matthias Kloseb9621712010-04-24 17:59:49 +000016523 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016524 ac_cv_broken_mbstowcs=no
16525else
Matthias Kloseb9621712010-04-24 17:59:49 +000016526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016527/* end confdefs.h. */
16528
Stefan Krah19c21392012-11-22 23:47:32 +010016529#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016530#include<stdlib.h>
16531int main() {
16532 size_t len = -1;
16533 const char *str = "text";
16534 len = mbstowcs(NULL, str, 0);
16535 return (len != 4);
16536}
16537
16538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016539if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016540 ac_cv_broken_mbstowcs=no
16541else
Matthias Kloseb9621712010-04-24 17:59:49 +000016542 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016546fi
16547
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016548fi
16549
Matthias Kloseb9621712010-04-24 17:59:49 +000016550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16551$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016552if test "$ac_cv_broken_mbstowcs" = yes
16553then
16554
Matthias Kloseb9621712010-04-24 17:59:49 +000016555$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016556
16557fi
16558
Antoine Pitroub52ec782009-01-25 16:34:23 +000016559# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16561$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016562
16563# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016564if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016565 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016566if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016567then
16568
Matthias Kloseb9621712010-04-24 17:59:49 +000016569$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016570
Matthias Kloseb9621712010-04-24 17:59:49 +000016571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16572$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016573fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016574if test "$withval" = no
16575then
16576
16577$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16578
Matthias Kloseb9621712010-04-24 17:59:49 +000016579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16580$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016581fi
16582
Antoine Pitrou042b1282010-08-13 21:15:58 +000016583else
16584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16585$as_echo "no value specified" >&6; }
16586fi
16587
Antoine Pitroub52ec782009-01-25 16:34:23 +000016588
Matthias Kloseb17289e2012-03-15 19:51:34 +010016589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16590$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16591if ${ac_cv_computed_gotos+:} false; then :
16592 $as_echo_n "(cached) " >&6
16593else
16594 if test "$cross_compiling" = yes; then :
16595 if test "${with_computed_gotos+set}" = set; then
16596 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16597 else
16598 ac_cv_computed_gotos=no
16599 fi
16600else
16601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16602/* end confdefs.h. */
16603
16604int main(int argc, char **argv)
16605{
16606 static void *targets[1] = { &&LABEL1 };
16607 goto LABEL2;
16608LABEL1:
16609 return 0;
16610LABEL2:
16611 goto *targets[0];
16612 return 1;
16613}
16614
16615_ACEOF
16616if ac_fn_c_try_run "$LINENO"; then :
16617 ac_cv_computed_gotos=yes
16618else
16619 ac_cv_computed_gotos=no
16620fi
16621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16622 conftest.$ac_objext conftest.beam conftest.$ac_ext
16623fi
16624
16625fi
16626
16627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16628$as_echo "$ac_cv_computed_gotos" >&6; }
16629case "$ac_cv_computed_gotos" in yes*)
16630
16631$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16632
16633esac
16634
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016635case $ac_sys_system in
16636AIX*)
16637
16638$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16639 ;;
16640esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016641
Michael W. Hudson54241132001-12-07 15:38:26 +000016642
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016643
16644
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016645for h in `(cd $srcdir;echo Python/thread_*.h)`
16646do
16647 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16648done
16649
Michael W. Hudson54241132001-12-07 15:38:26 +000016650
Victor Stinner21a74a92019-04-11 22:28:12 +020016651SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16653$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016654for dir in $SRCDIRS; do
16655 if test ! -d $dir; then
16656 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016657 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016658done
Matthias Kloseb9621712010-04-24 17:59:49 +000016659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16660$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016661
Stefan Krah1919b7e2012-03-21 18:25:23 +010016662# Availability of -O2:
16663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16664$as_echo_n "checking for -O2... " >&6; }
16665saved_cflags="$CFLAGS"
16666CFLAGS="-O2"
16667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16668/* end confdefs.h. */
16669
16670int
16671main ()
16672{
16673
16674
16675 ;
16676 return 0;
16677}
16678_ACEOF
16679if ac_fn_c_try_compile "$LINENO"; then :
16680 have_O2=yes
16681else
16682 have_O2=no
16683fi
16684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16686$as_echo "$have_O2" >&6; }
16687CFLAGS="$saved_cflags"
16688
16689# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16690# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16692$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16693saved_cflags="$CFLAGS"
16694CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16695if test "$have_O2" = no; then
16696 CFLAGS=""
16697fi
16698if test "$cross_compiling" = yes; then :
16699 have_glibc_memmove_bug=undefined
16700else
16701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16702/* end confdefs.h. */
16703
16704#include <stdio.h>
16705#include <stdlib.h>
16706#include <string.h>
16707void foo(void *p, void *q) { memmove(p, q, 19); }
16708int main() {
16709 char a[32] = "123456789000000000";
16710 foo(&a[9], a);
16711 if (strcmp(a, "123456789123456789000000000") != 0)
16712 return 1;
16713 foo(a, &a[9]);
16714 if (strcmp(a, "123456789000000000") != 0)
16715 return 1;
16716 return 0;
16717}
16718
16719_ACEOF
16720if ac_fn_c_try_run "$LINENO"; then :
16721 have_glibc_memmove_bug=no
16722else
16723 have_glibc_memmove_bug=yes
16724fi
16725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16726 conftest.$ac_objext conftest.beam conftest.$ac_ext
16727fi
16728
16729CFLAGS="$saved_cflags"
16730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16731$as_echo "$have_glibc_memmove_bug" >&6; }
16732if test "$have_glibc_memmove_bug" = yes; then
16733
16734$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16735
16736fi
16737
16738if test "$have_gcc_asm_for_x87" = yes; then
16739 # Some versions of gcc miscompile inline asm:
16740 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16741 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16742 case $CC in
16743 *gcc*)
16744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16745$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16746 saved_cflags="$CFLAGS"
16747 CFLAGS="-O2"
16748 if test "$cross_compiling" = yes; then :
16749 have_ipa_pure_const_bug=undefined
16750else
16751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16752/* end confdefs.h. */
16753
16754 __attribute__((noinline)) int
16755 foo(int *p) {
16756 int r;
16757 asm ( "movl \$6, (%1)\n\t"
16758 "xorl %0, %0\n\t"
16759 : "=r" (r) : "r" (p) : "memory"
16760 );
16761 return r;
16762 }
16763 int main() {
16764 int p = 8;
16765 if ((foo(&p) ? : p) != 6)
16766 return 1;
16767 return 0;
16768 }
16769
16770_ACEOF
16771if ac_fn_c_try_run "$LINENO"; then :
16772 have_ipa_pure_const_bug=no
16773else
16774 have_ipa_pure_const_bug=yes
16775fi
16776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16777 conftest.$ac_objext conftest.beam conftest.$ac_ext
16778fi
16779
16780 CFLAGS="$saved_cflags"
16781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16782$as_echo "$have_ipa_pure_const_bug" >&6; }
16783 if test "$have_ipa_pure_const_bug" = yes; then
16784
16785$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16786
16787 fi
16788 ;;
16789 esac
16790fi
16791
Victor Stinner4f5366e2015-01-09 02:13:19 +010016792# Check for stdatomic.h
16793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16794$as_echo_n "checking for stdatomic.h... " >&6; }
16795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16796/* end confdefs.h. */
16797
16798
16799 #include <stdatomic.h>
Miss Skeleton (bot)dbcea392019-10-22 13:19:32 -070016800 atomic_int int_var;
16801 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016802 int main() {
Miss Skeleton (bot)dbcea392019-10-22 13:19:32 -070016803 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16804 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16805 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016806 return 0;
16807 }
16808
16809
16810_ACEOF
16811if ac_fn_c_try_link "$LINENO"; then :
16812 have_stdatomic_h=yes
16813else
16814 have_stdatomic_h=no
16815fi
16816rm -f core conftest.err conftest.$ac_objext \
16817 conftest$ac_exeext conftest.$ac_ext
16818
16819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16820$as_echo "$have_stdatomic_h" >&6; }
16821
16822if test "$have_stdatomic_h" = yes; then
16823
16824$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16825
16826fi
16827
16828# Check for GCC >= 4.7 __atomic builtins
16829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16830$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16832/* end confdefs.h. */
16833
16834
16835 volatile int val = 1;
16836 int main() {
16837 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16838 return 0;
16839 }
16840
16841
16842_ACEOF
16843if ac_fn_c_try_link "$LINENO"; then :
16844 have_builtin_atomic=yes
16845else
16846 have_builtin_atomic=no
16847fi
16848rm -f core conftest.err conftest.$ac_objext \
16849 conftest$ac_exeext conftest.$ac_ext
16850
16851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16852$as_echo "$have_builtin_atomic" >&6; }
16853
16854if test "$have_builtin_atomic" = yes; then
16855
16856$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16857
16858fi
16859
Ned Deily322f5ba2013-11-21 23:01:59 -080016860# ensurepip option
16861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16862$as_echo_n "checking for ensurepip... " >&6; }
16863
16864# Check whether --with-ensurepip was given.
16865if test "${with_ensurepip+set}" = set; then :
16866 withval=$with_ensurepip;
16867else
16868 with_ensurepip=upgrade
16869fi
16870
16871case $with_ensurepip in #(
16872 yes|upgrade) :
16873 ENSUREPIP=upgrade ;; #(
16874 install) :
16875 ENSUREPIP=install ;; #(
16876 no) :
16877 ENSUREPIP=no ;; #(
16878 *) :
16879 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16880esac
16881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16882$as_echo "$ENSUREPIP" >&6; }
16883
16884
Victor Stinner35a97c02015-03-08 02:59:09 +010016885# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16887$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16889/* end confdefs.h. */
16890
16891
16892 #include <dirent.h>
16893
16894 int main() {
16895 struct dirent entry;
16896 return entry.d_type == DT_UNKNOWN;
16897 }
16898
16899
16900_ACEOF
16901if ac_fn_c_try_link "$LINENO"; then :
16902 have_dirent_d_type=yes
16903else
16904 have_dirent_d_type=no
16905fi
16906rm -f core conftest.err conftest.$ac_objext \
16907 conftest$ac_exeext conftest.$ac_ext
16908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16909$as_echo "$have_dirent_d_type" >&6; }
16910
16911if test "$have_dirent_d_type" = yes; then
16912
16913$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16914
16915fi
16916
Victor Stinner9eb57c52015-03-19 22:21:49 +010016917# check if the Linux getrandom() syscall is available
16918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16919$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16921/* end confdefs.h. */
16922
16923
Victor Stinner1b80b242016-04-12 22:34:58 +020016924 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016925 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016926 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016927
16928 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016929 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016930 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016931 const int flags = GRND_NONBLOCK;
16932 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016933 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016934 return 0;
16935 }
16936
16937
16938_ACEOF
16939if ac_fn_c_try_link "$LINENO"; then :
16940 have_getrandom_syscall=yes
16941else
16942 have_getrandom_syscall=no
16943fi
16944rm -f core conftest.err conftest.$ac_objext \
16945 conftest$ac_exeext conftest.$ac_ext
16946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16947$as_echo "$have_getrandom_syscall" >&6; }
16948
16949if test "$have_getrandom_syscall" = yes; then
16950
16951$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16952
16953fi
16954
Victor Stinner3abf44e2015-09-18 15:38:37 +020016955# check if the getrandom() function is available
16956# the test was written for the Solaris function of <sys/random.h>
16957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16958$as_echo_n "checking for the getrandom() function... " >&6; }
16959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16960/* end confdefs.h. */
16961
16962
16963 #include <sys/random.h>
16964
16965 int main() {
16966 char buffer[1];
16967 const size_t buflen = sizeof(buffer);
16968 const int flags = 0;
16969 /* ignore the result, Python checks for ENOSYS at runtime */
16970 (void)getrandom(buffer, buflen, flags);
16971 return 0;
16972 }
16973
16974
16975_ACEOF
16976if ac_fn_c_try_link "$LINENO"; then :
16977 have_getrandom=yes
16978else
16979 have_getrandom=no
16980fi
16981rm -f core conftest.err conftest.$ac_objext \
16982 conftest$ac_exeext conftest.$ac_ext
16983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16984$as_echo "$have_getrandom" >&6; }
16985
16986if test "$have_getrandom" = yes; then
16987
16988$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16989
16990fi
16991
Neil Schemenauer5741c452019-02-08 10:48:46 -080016992# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16993# shm_* may only be available if linking against librt
16994save_LIBS="$LIBS"
16995save_includes_default="$ac_includes_default"
16996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16997$as_echo_n "checking for library containing shm_open... " >&6; }
16998if ${ac_cv_search_shm_open+:} false; then :
16999 $as_echo_n "(cached) " >&6
17000else
17001 ac_func_search_save_LIBS=$LIBS
17002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17003/* end confdefs.h. */
17004
17005/* Override any GCC internal prototype to avoid an error.
17006 Use char because int might match the return type of a GCC
17007 builtin and then its argument prototype would still apply. */
17008#ifdef __cplusplus
17009extern "C"
17010#endif
17011char shm_open ();
17012int
17013main ()
17014{
17015return shm_open ();
17016 ;
17017 return 0;
17018}
17019_ACEOF
17020for ac_lib in '' rt; do
17021 if test -z "$ac_lib"; then
17022 ac_res="none required"
17023 else
17024 ac_res=-l$ac_lib
17025 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17026 fi
17027 if ac_fn_c_try_link "$LINENO"; then :
17028 ac_cv_search_shm_open=$ac_res
17029fi
17030rm -f core conftest.err conftest.$ac_objext \
17031 conftest$ac_exeext
17032 if ${ac_cv_search_shm_open+:} false; then :
17033 break
17034fi
17035done
17036if ${ac_cv_search_shm_open+:} false; then :
17037
17038else
17039 ac_cv_search_shm_open=no
17040fi
17041rm conftest.$ac_ext
17042LIBS=$ac_func_search_save_LIBS
17043fi
17044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17045$as_echo "$ac_cv_search_shm_open" >&6; }
17046ac_res=$ac_cv_search_shm_open
17047if test "$ac_res" != no; then :
17048 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17049
17050fi
17051
17052if test "$ac_cv_search_shm_open" = "-lrt"; then
17053
17054$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17055
17056fi
17057for ac_header in sys/mman.h
17058do :
17059 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17060if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17061 cat >>confdefs.h <<_ACEOF
17062#define HAVE_SYS_MMAN_H 1
17063_ACEOF
17064
17065fi
17066
17067done
17068
17069# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17070ac_includes_default="\
17071${ac_includes_default}
17072#ifndef __cplusplus
17073# ifdef HAVE_SYS_MMAN_H
17074# include <sys/mman.h>
17075# endif
17076#endif
17077"
17078for ac_func in shm_open shm_unlink
17079do :
17080 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17081ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17082if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17083 cat >>confdefs.h <<_ACEOF
17084#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17085_ACEOF
17086
17087fi
17088done
17089
17090# we don't want to link with librt always, restore LIBS
17091LIBS="$save_LIBS"
17092ac_includes_default="$save_includes_default"
17093
Christian Heimesff5be6e2018-01-20 13:19:21 +010017094# Check for usable OpenSSL
17095
17096 found=false
17097
17098# Check whether --with-openssl was given.
17099if test "${with_openssl+set}" = set; then :
17100 withval=$with_openssl;
17101 case "$withval" in
17102 "" | y | ye | yes | n | no)
17103 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17104 ;;
17105 *) ssldirs="$withval"
17106 ;;
17107 esac
17108
17109else
17110
17111 # if pkg-config is installed and openssl has installed a .pc file,
17112 # then use that information and don't search ssldirs
17113 if test -n "$ac_tool_prefix"; then
17114 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17115set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17117$as_echo_n "checking for $ac_word... " >&6; }
17118if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17119 $as_echo_n "(cached) " >&6
17120else
17121 if test -n "$PKG_CONFIG"; then
17122 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17123else
17124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17125for as_dir in $PATH
17126do
17127 IFS=$as_save_IFS
17128 test -z "$as_dir" && as_dir=.
17129 for ac_exec_ext in '' $ac_executable_extensions; do
17130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17131 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17133 break 2
17134 fi
17135done
17136 done
17137IFS=$as_save_IFS
17138
17139fi
17140fi
17141PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17142if test -n "$PKG_CONFIG"; then
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17144$as_echo "$PKG_CONFIG" >&6; }
17145else
17146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17147$as_echo "no" >&6; }
17148fi
17149
17150
17151fi
17152if test -z "$ac_cv_prog_PKG_CONFIG"; then
17153 ac_ct_PKG_CONFIG=$PKG_CONFIG
17154 # Extract the first word of "pkg-config", so it can be a program name with args.
17155set dummy pkg-config; ac_word=$2
17156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17157$as_echo_n "checking for $ac_word... " >&6; }
17158if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17159 $as_echo_n "(cached) " >&6
17160else
17161 if test -n "$ac_ct_PKG_CONFIG"; then
17162 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17163else
17164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17165for as_dir in $PATH
17166do
17167 IFS=$as_save_IFS
17168 test -z "$as_dir" && as_dir=.
17169 for ac_exec_ext in '' $ac_executable_extensions; do
17170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17171 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17173 break 2
17174 fi
17175done
17176 done
17177IFS=$as_save_IFS
17178
17179fi
17180fi
17181ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17182if test -n "$ac_ct_PKG_CONFIG"; then
17183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17184$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17185else
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17187$as_echo "no" >&6; }
17188fi
17189
17190 if test "x$ac_ct_PKG_CONFIG" = x; then
17191 PKG_CONFIG=""
17192 else
17193 case $cross_compiling:$ac_tool_warned in
17194yes:)
17195{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17196$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17197ac_tool_warned=yes ;;
17198esac
17199 PKG_CONFIG=$ac_ct_PKG_CONFIG
17200 fi
17201else
17202 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17203fi
17204
17205 if test x"$PKG_CONFIG" != x""; then
17206 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17207 if test $? = 0; then
17208 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17209 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17210 found=true
17211 fi
17212 fi
17213
17214 # no such luck; use some default ssldirs
17215 if ! $found; then
17216 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17217 fi
17218
17219
17220fi
17221
17222
17223
17224 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17225 # an 'openssl' subdirectory
17226
17227 if ! $found; then
17228 OPENSSL_INCLUDES=
17229 for ssldir in $ssldirs; do
17230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17231$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17232 if test -f "$ssldir/include/openssl/ssl.h"; then
17233 OPENSSL_INCLUDES="-I$ssldir/include"
17234 OPENSSL_LDFLAGS="-L$ssldir/lib"
17235 OPENSSL_LIBS="-lssl -lcrypto"
17236 found=true
17237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17238$as_echo "yes" >&6; }
17239 break
17240 else
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17242$as_echo "no" >&6; }
17243 fi
17244 done
17245
17246 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17247 # it will just work!
17248 fi
17249
17250 # try the preprocessor and linker with our new flags,
17251 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17252
17253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17254$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17255 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17256 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17257
17258 save_LIBS="$LIBS"
17259 save_LDFLAGS="$LDFLAGS"
17260 save_CPPFLAGS="$CPPFLAGS"
17261 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17262 LIBS="$OPENSSL_LIBS $LIBS"
17263 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17265/* end confdefs.h. */
17266#include <openssl/ssl.h>
17267int
17268main ()
17269{
17270SSL_new(NULL)
17271 ;
17272 return 0;
17273}
17274_ACEOF
17275if ac_fn_c_try_link "$LINENO"; then :
17276
17277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17278$as_echo "yes" >&6; }
17279 have_openssl=yes
17280
17281else
17282
17283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17284$as_echo "no" >&6; }
17285 have_openssl=no
17286
17287fi
17288rm -f core conftest.err conftest.$ac_objext \
17289 conftest$ac_exeext conftest.$ac_ext
17290 CPPFLAGS="$save_CPPFLAGS"
17291 LDFLAGS="$save_LDFLAGS"
17292 LIBS="$save_LIBS"
17293
17294
17295
17296
17297
17298
17299if test "$have_openssl" = yes; then
17300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17301$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17302
17303 save_LIBS="$LIBS"
17304 save_LDFLAGS="$LDFLAGS"
17305 save_CPPFLAGS="$CPPFLAGS"
17306 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17307 LIBS="$OPENSSL_LIBS $LIBS"
17308 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17309
17310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17311/* end confdefs.h. */
17312
17313 #include <openssl/x509_vfy.h>
17314
17315int
17316main ()
17317{
17318
17319 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17320 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17321 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17322 X509_VERIFY_PARAM_set_hostflags(p, 0);
17323
17324 ;
17325 return 0;
17326}
17327
17328_ACEOF
17329if ac_fn_c_try_link "$LINENO"; then :
17330
17331 ac_cv_has_x509_verify_param_set1_host=yes
17332
17333else
17334
17335 ac_cv_has_x509_verify_param_set1_host=no
17336
17337fi
17338rm -f core conftest.err conftest.$ac_objext \
17339 conftest$ac_exeext conftest.$ac_ext
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17341$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17342 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17343
17344$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17345
17346 fi
17347
17348 CPPFLAGS="$save_CPPFLAGS"
17349 LDFLAGS="$save_LDFLAGS"
17350 LIBS="$save_LIBS"
17351fi
17352
Christian Heimes892d66e2018-01-29 14:10:18 +010017353# ssl module default cipher suite string
17354
17355
17356
17357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17358$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17359
17360# Check whether --with-ssl-default-suites was given.
17361if test "${with_ssl_default_suites+set}" = set; then :
17362 withval=$with_ssl_default_suites;
17363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17364$as_echo "$withval" >&6; }
17365case "$withval" in
17366 python)
17367 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17368
17369 ;;
17370 openssl)
17371 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17372
17373 ;;
17374 *)
17375 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17376
17377 cat >>confdefs.h <<_ACEOF
17378#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17379_ACEOF
17380
17381 ;;
17382esac
17383
17384else
17385
17386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17387$as_echo "python" >&6; }
17388$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17389
17390
17391fi
17392
17393
17394
Guido van Rossum627b2d71993-12-24 10:39:16 +000017395# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017396ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017397
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017398ac_config_files="$ac_config_files Modules/ld_so_aix"
17399
Martin v. Löwis11437992002-04-12 09:54:03 +000017400cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017401# This file is a shell script that caches the results of configure
17402# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017403# scripts and configure runs, see configure's option --config-cache.
17404# It is not useful on other systems. If it contains results you don't
17405# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017406#
Martin v. Löwis11437992002-04-12 09:54:03 +000017407# config.status only pays attention to the cache file if you give it
17408# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017409#
Skip Montanaro6dead952003-09-25 14:50:04 +000017410# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017411# loading this file, other *unset* `ac_cv_foo' will be assigned the
17412# following values.
17413
17414_ACEOF
17415
Guido van Rossumf78abae1997-01-21 22:02:36 +000017416# The following way of writing the cache mishandles newlines in values,
17417# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017419# Ultrix sh set writes to stderr and can't be redirected directly,
17420# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421(
17422 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17423 eval ac_val=\$$ac_var
17424 case $ac_val in #(
17425 *${as_nl}*)
17426 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017427 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17428$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 esac
17430 case $ac_var in #(
17431 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017432 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17433 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434 esac ;;
17435 esac
17436 done
17437
Martin v. Löwis11437992002-04-12 09:54:03 +000017438 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17440 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017441 # `set' does not quote correctly, so add quotes: double-quote
17442 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017443 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017444 "s/'/'\\\\''/g;
17445 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 *)
17448 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017450 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451 esac |
17452 sort
17453) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017454 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017458 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17459 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17461 :end' >>confcache
17462if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17463 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017464 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017465 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17466$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017467 if test ! -f "$cache_file" || test -h "$cache_file"; then
17468 cat confcache >"$cache_file"
17469 else
17470 case $cache_file in #(
17471 */* | ?:*)
17472 mv -f confcache "$cache_file"$$ &&
17473 mv -f "$cache_file"$$ "$cache_file" ;; #(
17474 *)
17475 mv -f confcache "$cache_file" ;;
17476 esac
17477 fi
17478 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017479 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017480 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17481$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017482 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017483fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017484rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017485
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017486test "x$prefix" = xNONE && prefix=$ac_default_prefix
17487# Let make expand exec_prefix.
17488test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017489
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017490DEFS=-DHAVE_CONFIG_H
17491
Skip Montanaro6dead952003-09-25 14:50:04 +000017492ac_libobjs=
17493ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017494U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017495for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17496 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017498 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017499 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17500 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017501 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17502 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017503done
17504LIBOBJS=$ac_libobjs
17505
17506LTLIBOBJS=$ac_ltlibobjs
17507
17508
Martin v. Löwis11437992002-04-12 09:54:03 +000017509
Matthias Kloseb9621712010-04-24 17:59:49 +000017510
Victor Stinnere0be4232011-10-25 13:06:09 +020017511: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017512ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017513ac_clean_files_save=$ac_clean_files
17514ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017515{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17516$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17517as_write_fail=0
17518cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017519#! $SHELL
17520# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017521# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017522# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017523# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017524
Martin v. Löwis11437992002-04-12 09:54:03 +000017525debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017526ac_cs_recheck=false
17527ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017528
Matthias Kloseb9621712010-04-24 17:59:49 +000017529SHELL=\${CONFIG_SHELL-$SHELL}
17530export SHELL
17531_ASEOF
17532cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17533## -------------------- ##
17534## M4sh Initialization. ##
17535## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537# Be more Bourne compatible
17538DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017539if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017540 emulate sh
17541 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017542 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017543 # is contrary to our usage. Disable this feature.
17544 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017546else
Matthias Kloseb9621712010-04-24 17:59:49 +000017547 case `(set -o) 2>/dev/null` in #(
17548 *posix*) :
17549 set -o posix ;; #(
17550 *) :
17551 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017553fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017554
17555
Matthias Kloseb9621712010-04-24 17:59:49 +000017556as_nl='
17557'
17558export as_nl
17559# Printing a long string crashes Solaris 7 /usr/bin/printf.
17560as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17561as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17562as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17563# Prefer a ksh shell builtin over an external printf program on Solaris,
17564# but without wasting forks for bash or zsh.
17565if test -z "$BASH_VERSION$ZSH_VERSION" \
17566 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17567 as_echo='print -r --'
17568 as_echo_n='print -rn --'
17569elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17570 as_echo='printf %s\n'
17571 as_echo_n='printf %s'
17572else
17573 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17574 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17575 as_echo_n='/usr/ucb/echo -n'
17576 else
17577 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17578 as_echo_n_body='eval
17579 arg=$1;
17580 case $arg in #(
17581 *"$as_nl"*)
17582 expr "X$arg" : "X\\(.*\\)$as_nl";
17583 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17584 esac;
17585 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17586 '
17587 export as_echo_n_body
17588 as_echo_n='sh -c $as_echo_n_body as_echo'
17589 fi
17590 export as_echo_body
17591 as_echo='sh -c $as_echo_body as_echo'
17592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017593
17594# The user is always right.
17595if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 PATH_SEPARATOR=:
17597 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17598 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17599 PATH_SEPARATOR=';'
17600 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603
17604# IFS
17605# We need space, tab and new line, in precisely that order. Quoting is
17606# there to prevent editors from complaining about space-tab.
17607# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17608# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609IFS=" "" $as_nl"
17610
17611# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017612as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017613case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614 *[\\/]* ) as_myself=$0 ;;
17615 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017616for as_dir in $PATH
17617do
17618 IFS=$as_save_IFS
17619 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017620 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17621 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624 ;;
17625esac
17626# We did not find ourselves, most probably we were run as `sh COMMAND'
17627# in which case we are not to be found in the path.
17628if test "x$as_myself" = x; then
17629 as_myself=$0
17630fi
17631if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017632 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17633 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634fi
17635
Matthias Kloseb9621712010-04-24 17:59:49 +000017636# Unset variables that we do not need and which cause bugs (e.g. in
17637# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17638# suppresses any "Segmentation fault" message there. '((' could
17639# trigger a bug in pdksh 5.2.14.
17640for as_var in BASH_ENV ENV MAIL MAILPATH
17641do eval test x\${$as_var+set} = xset \
17642 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643done
17644PS1='$ '
17645PS2='> '
17646PS4='+ '
17647
17648# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017649LC_ALL=C
17650export LC_ALL
17651LANGUAGE=C
17652export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653
Matthias Kloseb9621712010-04-24 17:59:49 +000017654# CDPATH.
17655(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17656
17657
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017658# as_fn_error STATUS ERROR [LINENO LOG_FD]
17659# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017660# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17661# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017662# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017663as_fn_error ()
17664{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017665 as_status=$1; test $as_status -eq 0 && as_status=1
17666 if test "$4"; then
17667 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17668 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017669 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017670 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017671 as_fn_exit $as_status
17672} # as_fn_error
17673
17674
17675# as_fn_set_status STATUS
17676# -----------------------
17677# Set $? to STATUS, without forking.
17678as_fn_set_status ()
17679{
17680 return $1
17681} # as_fn_set_status
17682
17683# as_fn_exit STATUS
17684# -----------------
17685# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17686as_fn_exit ()
17687{
17688 set +e
17689 as_fn_set_status $1
17690 exit $1
17691} # as_fn_exit
17692
17693# as_fn_unset VAR
17694# ---------------
17695# Portably unset VAR.
17696as_fn_unset ()
17697{
17698 { eval $1=; unset $1;}
17699}
17700as_unset=as_fn_unset
17701# as_fn_append VAR VALUE
17702# ----------------------
17703# Append the text in VALUE to the end of the definition contained in VAR. Take
17704# advantage of any shell optimizations that allow amortized linear growth over
17705# repeated appends, instead of the typical quadratic growth present in naive
17706# implementations.
17707if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17708 eval 'as_fn_append ()
17709 {
17710 eval $1+=\$2
17711 }'
17712else
17713 as_fn_append ()
17714 {
17715 eval $1=\$$1\$2
17716 }
17717fi # as_fn_append
17718
17719# as_fn_arith ARG...
17720# ------------------
17721# Perform arithmetic evaluation on the ARGs, and store the result in the
17722# global $as_val. Take advantage of shells that can avoid forks. The arguments
17723# must be portable across $(()) and expr.
17724if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17725 eval 'as_fn_arith ()
17726 {
17727 as_val=$(( $* ))
17728 }'
17729else
17730 as_fn_arith ()
17731 {
17732 as_val=`expr "$@" || test $? -eq 1`
17733 }
17734fi # as_fn_arith
17735
17736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737if expr a : '\(a\)' >/dev/null 2>&1 &&
17738 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17739 as_expr=expr
17740else
17741 as_expr=false
17742fi
17743
17744if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17745 as_basename=basename
17746else
17747 as_basename=false
17748fi
17749
Matthias Kloseb9621712010-04-24 17:59:49 +000017750if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17751 as_dirname=dirname
17752else
17753 as_dirname=false
17754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756as_me=`$as_basename -- "$0" ||
17757$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17758 X"$0" : 'X\(//\)$' \| \
17759 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017760$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761 sed '/^.*\/\([^/][^/]*\)\/*$/{
17762 s//\1/
17763 q
17764 }
17765 /^X\/\(\/\/\)$/{
17766 s//\1/
17767 q
17768 }
17769 /^X\/\(\/\).*/{
17770 s//\1/
17771 q
17772 }
17773 s/.*/./; q'`
17774
Matthias Kloseb9621712010-04-24 17:59:49 +000017775# Avoid depending upon Character Ranges.
17776as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17777as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17778as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17779as_cr_digits='0123456789'
17780as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781
17782ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017783case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017785 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017786 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017787 xy) ECHO_C='\c';;
17788 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17789 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790 esac;;
17791*)
17792 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017794
Martin v. Löwis11437992002-04-12 09:54:03 +000017795rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796if test -d conf$$.dir; then
17797 rm -f conf$$.dir/conf$$.file
17798else
17799 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017800 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017802if (echo >conf$$.file) 2>/dev/null; then
17803 if ln -s conf$$.file conf$$ 2>/dev/null; then
17804 as_ln_s='ln -s'
17805 # ... but there are two gotchas:
17806 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17807 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017808 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017809 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017810 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017811 elif ln conf$$.file conf$$ 2>/dev/null; then
17812 as_ln_s=ln
17813 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017814 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017816else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017817 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17820rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017821
Matthias Kloseb9621712010-04-24 17:59:49 +000017822
17823# as_fn_mkdir_p
17824# -------------
17825# Create "$as_dir" as a directory, including parents if necessary.
17826as_fn_mkdir_p ()
17827{
17828
17829 case $as_dir in #(
17830 -*) as_dir=./$as_dir;;
17831 esac
17832 test -d "$as_dir" || eval $as_mkdir_p || {
17833 as_dirs=
17834 while :; do
17835 case $as_dir in #(
17836 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17837 *) as_qdir=$as_dir;;
17838 esac
17839 as_dirs="'$as_qdir' $as_dirs"
17840 as_dir=`$as_dirname -- "$as_dir" ||
17841$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17842 X"$as_dir" : 'X\(//\)[^/]' \| \
17843 X"$as_dir" : 'X\(//\)$' \| \
17844 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17845$as_echo X"$as_dir" |
17846 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17847 s//\1/
17848 q
17849 }
17850 /^X\(\/\/\)[^/].*/{
17851 s//\1/
17852 q
17853 }
17854 /^X\(\/\/\)$/{
17855 s//\1/
17856 q
17857 }
17858 /^X\(\/\).*/{
17859 s//\1/
17860 q
17861 }
17862 s/.*/./; q'`
17863 test -d "$as_dir" && break
17864 done
17865 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017866 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017867
17868
17869} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017870if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017871 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017872else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017873 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017874 as_mkdir_p=false
17875fi
17876
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017877
17878# as_fn_executable_p FILE
17879# -----------------------
17880# Test if FILE is an executable regular file.
17881as_fn_executable_p ()
17882{
17883 test -f "$1" && test -x "$1"
17884} # as_fn_executable_p
17885as_test_x='test -x'
17886as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017887
17888# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017889as_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 +000017890
17891# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017892as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017893
17894
Martin v. Löwis11437992002-04-12 09:54:03 +000017895exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017896## ----------------------------------- ##
17897## Main body of $CONFIG_STATUS script. ##
17898## ----------------------------------- ##
17899_ASEOF
17900test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017901
Matthias Kloseb9621712010-04-24 17:59:49 +000017902cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17903# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017904# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905# values after options handling.
17906ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017907This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017908generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017909
17910 CONFIG_FILES = $CONFIG_FILES
17911 CONFIG_HEADERS = $CONFIG_HEADERS
17912 CONFIG_LINKS = $CONFIG_LINKS
17913 CONFIG_COMMANDS = $CONFIG_COMMANDS
17914 $ $0 $@
17915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017916on `(hostname || uname -n) 2>/dev/null | sed 1q`
17917"
17918
Martin v. Löwis11437992002-04-12 09:54:03 +000017919_ACEOF
17920
Matthias Kloseb9621712010-04-24 17:59:49 +000017921case $ac_config_files in *"
17922"*) set x $ac_config_files; shift; ac_config_files=$*;;
17923esac
17924
17925case $ac_config_headers in *"
17926"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17927esac
17928
17929
17930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017931# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017932config_files="$ac_config_files"
17933config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017935_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017936
Matthias Kloseb9621712010-04-24 17:59:49 +000017937cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017938ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017939\`$as_me' instantiates files and other configuration actions
17940from templates according to the current configuration. Unless the files
17941and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017942
Matthias Kloseb9621712010-04-24 17:59:49 +000017943Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017944
17945 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017947 --config print configuration, then exit
17948 -q, --quiet, --silent
17949 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 -d, --debug don't remove temporary files
17951 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017952 --file=FILE[:TEMPLATE]
17953 instantiate the configuration file FILE
17954 --header=FILE[:TEMPLATE]
17955 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017956
17957Configuration files:
17958$config_files
17959
17960Configuration headers:
17961$config_headers
17962
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017963Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017966cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17967ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017968ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017969python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017970configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017971 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017972
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017973Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017974This config.status script is free software; the Free Software Foundation
17975gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976
17977ac_pwd='$ac_pwd'
17978srcdir='$srcdir'
17979INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017980MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017981test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017982_ACEOF
17983
Matthias Kloseb9621712010-04-24 17:59:49 +000017984cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17985# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017986ac_need_defaults=:
17987while test $# != 0
17988do
17989 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017990 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17992 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017993 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017994 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017995 --*=)
17996 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17997 ac_optarg=
17998 ac_shift=:
17999 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018001 ac_option=$1
18002 ac_optarg=$2
18003 ac_shift=shift
18004 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018005 esac
18006
Skip Montanaro6dead952003-09-25 14:50:04 +000018007 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018008 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018009 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18010 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018012 $as_echo "$ac_cs_version"; exit ;;
18013 --config | --confi | --conf | --con | --co | --c )
18014 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018016 debug=: ;;
18017 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018018 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018019 case $ac_optarg in
18020 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018021 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018022 esac
18023 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018024 ac_need_defaults=false;;
18025 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018026 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018027 case $ac_optarg in
18028 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18029 esac
18030 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018031 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032 --he | --h)
18033 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018034 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018035Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018037 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018038 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18039 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18040 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018041
18042 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018043 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018044Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018045
Matthias Kloseb9621712010-04-24 17:59:49 +000018046 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018048
18049 esac
18050 shift
18051done
18052
Skip Montanaro6dead952003-09-25 14:50:04 +000018053ac_configure_extra_args=
18054
18055if $ac_cs_silent; then
18056 exec 6>/dev/null
18057 ac_configure_extra_args="$ac_configure_extra_args --silent"
18058fi
18059
18060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018062if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018063 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018064 shift
18065 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18066 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018068 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018069fi
18070
Martin v. Löwis11437992002-04-12 09:54:03 +000018071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073exec 5>>config.log
18074{
18075 echo
18076 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18077## Running $as_me. ##
18078_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018079 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018083cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018085
Matthias Kloseb9621712010-04-24 17:59:49 +000018086cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087
18088# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018089for ac_config_target in $ac_config_targets
18090do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091 case $ac_config_target in
18092 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18093 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18094 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018095 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18096 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018097 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018098 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018099 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018100 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018101 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018102
Victor Stinnere0be4232011-10-25 13:06:09 +020018103 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018104 esac
18105done
18106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107
Martin v. Löwis11437992002-04-12 09:54:03 +000018108# If the user did not use the arguments to specify the items to instantiate,
18109# then the envvar interface is used. Set only those that are not.
18110# We use the long form for the default assignment because of an extremely
18111# bizarre bug on SunOS 4.1.3.
18112if $ac_need_defaults; then
18113 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18114 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18115fi
18116
Skip Montanaro6dead952003-09-25 14:50:04 +000018117# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018119# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120# Hook for its removal unless debugging.
18121# Note that there is a small window in which the directory will not be cleaned:
18122# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018123$debug ||
18124{
Victor Stinnere0be4232011-10-25 13:06:09 +020018125 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018127 : "${ac_tmp:=$tmp}"
18128 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018130 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018131}
Martin v. Löwis11437992002-04-12 09:54:03 +000018132# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018133
Martin v. Löwis11437992002-04-12 09:54:03 +000018134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018136 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018137} ||
18138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139 tmp=./conf$$-$RANDOM
18140 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018141} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018142ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018143
Matthias Kloseb9621712010-04-24 17:59:49 +000018144# Set up the scripts for CONFIG_FILES section.
18145# No need to generate them if there are no CONFIG_FILES.
18146# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018148
Matthias Kloseb9621712010-04-24 17:59:49 +000018149
18150ac_cr=`echo X | tr X '\015'`
18151# On cygwin, bash can eat \r inside `` if the user requested igncr.
18152# But we know of no other shell where ac_cr would be empty at this
18153# point, so we can use a bashism as a fallback.
18154if test "x$ac_cr" = x; then
18155 eval ac_cr=\$\'\\r\'
18156fi
18157ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18158if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018159 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018160else
18161 ac_cs_awk_cr=$ac_cr
18162fi
18163
Victor Stinnere0be4232011-10-25 13:06:09 +020018164echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018165_ACEOF
18166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018167
Matthias Kloseb9621712010-04-24 17:59:49 +000018168{
18169 echo "cat >conf$$subs.awk <<_ACEOF" &&
18170 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18171 echo "_ACEOF"
18172} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018173 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18174ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018175ac_delim='%!_!# '
18176for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018177 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018178 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179
Matthias Kloseb9621712010-04-24 17:59:49 +000018180 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18181 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182 break
18183 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018184 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018185 else
18186 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018187 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188done
Matthias Kloseb9621712010-04-24 17:59:49 +000018189rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018190
Matthias Kloseb9621712010-04-24 17:59:49 +000018191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018192cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018194sed -n '
18195h
18196s/^/S["/; s/!.*/"]=/
18197p
18198g
18199s/^[^!]*!//
18200:repl
18201t repl
18202s/'"$ac_delim"'$//
18203t delim
18204:nl
18205h
18206s/\(.\{148\}\)..*/\1/
18207t more1
18208s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18209p
18210n
18211b repl
18212:more1
18213s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18214p
18215g
18216s/.\{148\}//
18217t nl
18218:delim
18219h
18220s/\(.\{148\}\)..*/\1/
18221t more2
18222s/["\\]/\\&/g; s/^/"/; s/$/"/
18223p
18224b
18225:more2
18226s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18227p
18228g
18229s/.\{148\}//
18230t delim
18231' <conf$$subs.awk | sed '
18232/^[^""]/{
18233 N
18234 s/\n//
18235}
18236' >>$CONFIG_STATUS || ac_write_fail=1
18237rm -f conf$$subs.awk
18238cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18239_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018240cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018241 for (key in S) S_is_set[key] = 1
18242 FS = ""
18243
18244}
18245{
18246 line = $ 0
18247 nfields = split(line, field, "@")
18248 substed = 0
18249 len = length(field[1])
18250 for (i = 2; i < nfields; i++) {
18251 key = field[i]
18252 keylen = length(key)
18253 if (S_is_set[key]) {
18254 value = S[key]
18255 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18256 len += length(value) + length(field[++i])
18257 substed = 1
18258 } else
18259 len += 1 + keylen
18260 }
18261
18262 print line
18263}
18264
18265_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018267cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18268if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18269 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18270else
18271 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018272fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018273 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018274_ACEOF
18275
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018276# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18277# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018278# trailing colons and then remove the whole line if VPATH becomes empty
18279# (actually we leave an empty line to preserve line numbers).
18280if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018281 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18282h
18283s///
18284s/^/:/
18285s/[ ]*$/:/
18286s/:\$(srcdir):/:/g
18287s/:\${srcdir}:/:/g
18288s/:@srcdir@:/:/g
18289s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018290s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018291x
18292s/\(=[ ]*\).*/\1/
18293G
18294s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018295s/^[^=]*=[ ]*$//
18296}'
18297fi
18298
Matthias Kloseb9621712010-04-24 17:59:49 +000018299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018300fi # test -n "$CONFIG_FILES"
18301
Matthias Kloseb9621712010-04-24 17:59:49 +000018302# Set up the scripts for CONFIG_HEADERS section.
18303# No need to generate them if there are no CONFIG_HEADERS.
18304# This happens for instance with `./config.status Makefile'.
18305if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018306cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018307BEGIN {
18308_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309
Matthias Kloseb9621712010-04-24 17:59:49 +000018310# Transform confdefs.h into an awk script `defines.awk', embedded as
18311# here-document in config.status, that substitutes the proper values into
18312# config.h.in to produce config.h.
18313
18314# Create a delimiter string that does not exist in confdefs.h, to ease
18315# handling of long lines.
18316ac_delim='%!_!# '
18317for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018318 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18319 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018320 break
18321 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018322 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018323 else
18324 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18325 fi
18326done
18327
18328# For the awk script, D is an array of macro values keyed by name,
18329# likewise P contains macro parameters if any. Preserve backslash
18330# newline sequences.
18331
18332ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18333sed -n '
18334s/.\{148\}/&'"$ac_delim"'/g
18335t rset
18336:rset
18337s/^[ ]*#[ ]*define[ ][ ]*/ /
18338t def
18339d
18340:def
18341s/\\$//
18342t bsnl
18343s/["\\]/\\&/g
18344s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18345D["\1"]=" \3"/p
18346s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18347d
18348:bsnl
18349s/["\\]/\\&/g
18350s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18351D["\1"]=" \3\\\\\\n"\\/p
18352t cont
18353s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18354t cont
18355d
18356:cont
18357n
18358s/.\{148\}/&'"$ac_delim"'/g
18359t clear
18360:clear
18361s/\\$//
18362t bsnlc
18363s/["\\]/\\&/g; s/^/"/; s/$/"/p
18364d
18365:bsnlc
18366s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18367b cont
18368' <confdefs.h | sed '
18369s/'"$ac_delim"'/"\\\
18370"/g' >>$CONFIG_STATUS || ac_write_fail=1
18371
18372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18373 for (key in D) D_is_set[key] = 1
18374 FS = ""
18375}
18376/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18377 line = \$ 0
18378 split(line, arg, " ")
18379 if (arg[1] == "#") {
18380 defundef = arg[2]
18381 mac1 = arg[3]
18382 } else {
18383 defundef = substr(arg[1], 2)
18384 mac1 = arg[2]
18385 }
18386 split(mac1, mac2, "(") #)
18387 macro = mac2[1]
18388 prefix = substr(line, 1, index(line, defundef) - 1)
18389 if (D_is_set[macro]) {
18390 # Preserve the white space surrounding the "#".
18391 print prefix "define", macro P[macro] D[macro]
18392 next
18393 } else {
18394 # Replace #undef with comments. This is necessary, for example,
18395 # in the case of _POSIX_SOURCE, which is predefined and required
18396 # on some systems where configure will not decide to define it.
18397 if (defundef == "undef") {
18398 print "/*", prefix defundef, macro, "*/"
18399 next
18400 }
18401 }
18402}
18403{ print }
18404_ACAWK
18405_ACEOF
18406cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018407 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018408fi # test -n "$CONFIG_HEADERS"
18409
18410
18411eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18412shift
18413for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414do
18415 case $ac_tag in
18416 :[FHLC]) ac_mode=$ac_tag; continue;;
18417 esac
18418 case $ac_mode$ac_tag in
18419 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018420 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 :[FH]-) ac_tag=-:-;;
18422 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18423 esac
18424 ac_save_IFS=$IFS
18425 IFS=:
18426 set x $ac_tag
18427 IFS=$ac_save_IFS
18428 shift
18429 ac_file=$1
18430 shift
18431
18432 case $ac_mode in
18433 :L) ac_source=$1;;
18434 :[FH])
18435 ac_file_inputs=
18436 for ac_f
18437 do
18438 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018439 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 *) # Look for the file first in the build tree, then in the source tree
18441 # (if the path is not absolute). The absolute path cannot be DOS-style,
18442 # because $ac_f cannot contain `:'.
18443 test -f "$ac_f" ||
18444 case $ac_f in
18445 [\\/$]*) false;;
18446 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18447 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018448 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018449 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018450 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18451 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452 done
18453
18454 # Let's still pretend it is `configure' which instantiates (i.e., don't
18455 # use $as_me), people would be surprised to read:
18456 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018457 configure_input='Generated from '`
18458 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18459 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460 if test x"$ac_file" != x-; then
18461 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018462 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18463$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018465 # Neutralize special characters interpreted by sed in replacement strings.
18466 case $configure_input in #(
18467 *\&* | *\|* | *\\* )
18468 ac_sed_conf_input=`$as_echo "$configure_input" |
18469 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18470 *) ac_sed_conf_input=$configure_input;;
18471 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018472
18473 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018474 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18475 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476 esac
18477 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018478 esac
18479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018480 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018481$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018482 X"$ac_file" : 'X\(//\)[^/]' \| \
18483 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018484 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018485$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18487 s//\1/
18488 q
18489 }
18490 /^X\(\/\/\)[^/].*/{
18491 s//\1/
18492 q
18493 }
18494 /^X\(\/\/\)$/{
18495 s//\1/
18496 q
18497 }
18498 /^X\(\/\).*/{
18499 s//\1/
18500 q
18501 }
18502 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018503 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018504 ac_builddir=.
18505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018506case "$ac_dir" in
18507.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18508*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018509 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018511 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512 case $ac_top_builddir_sub in
18513 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18514 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18515 esac ;;
18516esac
18517ac_abs_top_builddir=$ac_pwd
18518ac_abs_builddir=$ac_pwd$ac_dir_suffix
18519# for backward compatibility:
18520ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018521
18522case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 ac_top_srcdir=$ac_top_builddir_sub
18526 ac_abs_top_srcdir=$ac_pwd ;;
18527 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018528 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529 ac_top_srcdir=$srcdir
18530 ac_abs_top_srcdir=$srcdir ;;
18531 *) # Relative name.
18532 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18533 ac_top_srcdir=$ac_top_build_prefix$srcdir
18534 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018535esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018537
Martin v. Löwis11437992002-04-12 09:54:03 +000018538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018539 case $ac_mode in
18540 :F)
18541 #
18542 # CONFIG_FILE
18543 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018544
18545 case $INSTALL in
18546 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018548 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018549 ac_MKDIR_P=$MKDIR_P
18550 case $MKDIR_P in
18551 [\\/$]* | ?:[\\/]* ) ;;
18552 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18553 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018554_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555
Matthias Kloseb9621712010-04-24 17:59:49 +000018556cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018557# If the template does not know about datarootdir, expand it.
18558# FIXME: This hack should be removed a few years after 2.60.
18559ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018560ac_sed_dataroot='
18561/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562 p
18563 q
18564}
18565/@datadir@/p
18566/@docdir@/p
18567/@infodir@/p
18568/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018569/@mandir@/p'
18570case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571*datarootdir*) ac_datarootdir_seen=yes;;
18572*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18574$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018577 ac_datarootdir_hack='
18578 s&@datadir@&$datadir&g
18579 s&@docdir@&$docdir&g
18580 s&@infodir@&$infodir&g
18581 s&@localedir@&$localedir&g
18582 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018583 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584esac
18585_ACEOF
18586
18587# Neutralize VPATH when `$srcdir' = `.'.
18588# Shell code in configure.ac might set extrasub.
18589# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018590cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18591ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018592$extrasub
18593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018594cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018595:t
18596/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018597s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018598s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018599s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600s&@srcdir@&$ac_srcdir&;t t
18601s&@abs_srcdir@&$ac_abs_srcdir&;t t
18602s&@top_srcdir@&$ac_top_srcdir&;t t
18603s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18604s&@builddir@&$ac_builddir&;t t
18605s&@abs_builddir@&$ac_abs_builddir&;t t
18606s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18607s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018608s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018609$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018610"
Victor Stinnere0be4232011-10-25 13:06:09 +020018611eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18612 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018614test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018615 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18616 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18617 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018619which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018620$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018621which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018622
Victor Stinnere0be4232011-10-25 13:06:09 +020018623 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018624 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018625 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18626 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018627 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018628 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018629 ;;
18630 :H)
18631 #
18632 # CONFIG_HEADER
18633 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018635 {
18636 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018637 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18638 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018639 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018640 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018641 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18642$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018644 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018645 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018646 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 fi
18648 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018649 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018650 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018651 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018653 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018655
18656 esac
18657
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018658
18659 case $ac_file$ac_mode in
18660 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18661
18662 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018663done # for ac_tag
18664
Guido van Rossum627b2d71993-12-24 10:39:16 +000018665
Matthias Kloseb9621712010-04-24 17:59:49 +000018666as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018667_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018668ac_clean_files=$ac_clean_files_save
18669
Matthias Kloseb9621712010-04-24 17:59:49 +000018670test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018671 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018672
Martin v. Löwis11437992002-04-12 09:54:03 +000018673
18674# configure is writing to config.log, and then calls config.status.
18675# config.status does its own redirection, appending to config.log.
18676# Unfortunately, on DOS this fails, as config.log is still kept open
18677# by configure, so config.status won't be able to write to it; its
18678# output is simply discarded. So we exec the FD to /dev/null,
18679# effectively closing config.log, so it can be properly (re)opened and
18680# appended to by config.status. When coming back to configure, we
18681# need to make the FD available again.
18682if test "$no_create" != yes; then
18683 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018684 ac_config_status_args=
18685 test "$silent" = yes &&
18686 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018687 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018688 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 exec 5>>config.log
18690 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18691 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018692 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018693fi
18694if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18696$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018697fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018698
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018699
Christian Heimes75ed8902013-11-20 01:11:18 +010018700echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018701if test ! -f Modules/Setup.local
18702then
18703 echo "# Edit this file for local setup changes" >Modules/Setup.local
18704fi
18705
Christian Heimes75ed8902013-11-20 01:11:18 +010018706echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018707$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018708 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018709 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018710mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018711
18712if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18713 echo "" >&6
18714 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018715 echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000018716 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018717 echo "" >&6
18718 echo "" >&6
18719fi
18720