blob: 6ba109b3754c7a8a3ddb5e68d4fd84359d4344f7 [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.
Christian Heimes32eba612021-03-19 10:29:25 +01003# Generated by GNU Autoconf 2.69 for python 3.10.
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#
Christian Heimes32eba612021-03-19 10:29:25 +01008# 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
Christian Heimes32eba612021-03-19 10:29:25 +010019if 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
Christian Heimes32eba612021-03-19 10:29:25 +010026else
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
Christian Heimes32eba612021-03-19 10:29:25 +010039# 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.
Christian Heimes32eba612021-03-19 10:29:25 +010075if 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
Christian Heimes32eba612021-03-19 10:29:25 +010084# 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.)
89IFS=" "" $as_nl"
90
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091# 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
Christian Heimes32eba612021-03-19 10:29:25 +010099 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +0000101 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
Christian Heimes32eba612021-03-19 10:29:25 +0100112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Christian Heimes32eba612021-03-19 10:29:25 +0100116# 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 || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000136
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'.
Christian Heimes32eba612021-03-19 10:29:25 +0100157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000159 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
Christian Heimes32eba612021-03-19 10:29:25 +0100163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000164 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
Christian Heimes32eba612021-03-19 10:29:25 +0100170else
Matthias Kloseb9621712010-04-24 17:59:49 +0000171 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.; }
Christian Heimes32eba612021-03-19 10:29:25 +0100190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000191
Christian Heimes32eba612021-03-19 10:29:25 +0100192else
Matthias Kloseb9621712010-04-24 17:59:49 +0000193 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"
Christian Heimes32eba612021-03-19 10:29:25 +0100202 if (eval "$as_required") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000203 as_have_required=yes
Christian Heimes32eba612021-03-19 10:29:25 +0100204else
Matthias Kloseb9621712010-04-24 17:59:49 +0000205 as_have_required=no
206fi
Christian Heimes32eba612021-03-19 10:29:25 +0100207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000208
Christian Heimes32eba612021-03-19 10:29:25 +0100209else
Matthias Kloseb9621712010-04-24 17:59:49 +0000210 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
Christian Heimes32eba612021-03-19 10:29:25 +0100215 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000216 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.
Christian Heimes32eba612021-03-19 10:29:25 +0100221 as_shell=$as_dir/$as_base
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Christian Heimes32eba612021-03-19 10:29:25 +0100223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000224 CONFIG_SHELL=$as_shell as_have_required=yes
Christian Heimes32eba612021-03-19 10:29:25 +0100225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
Christian Heimes32eba612021-03-19 10:29:25 +0100233$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 :
Pablo Galindocc128882021-03-01 16:47:53 +0000235 CONFIG_SHELL=$SHELL as_have_required=yes
Christian Heimes32eba612021-03-19 10:29:25 +0100236fi; }
237IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +0000238
239
Christian Heimes32eba612021-03-19 10:29:25 +0100240 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'.
Christian Heimes32eba612021-03-19 10:29:25 +0100258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
Christian Heimes32eba612021-03-19 10:29:25 +0100262 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."
Matthias Kloseb9621712010-04-24 17:59:49 +0000268 else
Christian Heimes32eba612021-03-19 10:29:25 +0100269 $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 #(
Christian Heimes32eba612021-03-19 10:29:25 +0100328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +0000329 *) 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 ||
Christian Heimes32eba612021-03-19 10:29:25 +0100337$as_echo X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +0000338 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.
Christian Heimes32eba612021-03-19 10:29:25 +0100376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
Christian Heimes32eba612021-03-19 10:29:25 +0100381else
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 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.
Christian Heimes32eba612021-03-19 10:29:25 +0100393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
Christian Heimes32eba612021-03-19 10:29:25 +0100398else
Matthias Kloseb9621712010-04-24 17:59:49 +0000399 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
Christian Heimes32eba612021-03-19 10:29:25 +0100416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Christian Heimes32eba612021-03-19 10:29:25 +0100418 $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 ||
Christian Heimes32eba612021-03-19 10:29:25 +0100445$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" ||
Christian Heimes32eba612021-03-19 10:29:25 +0100489 { $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'
Pablo Galindod4fe0982020-05-19 03:33:01 +0100583PACKAGE_VERSION='3.10'
584PACKAGE_STRING='python 3.10'
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="\
Christian Heimes32eba612021-03-19 10:29:25 +0100591#include <stdio.h>
592#ifdef HAVE_SYS_TYPES_H
593# include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000594#endif
Christian Heimes32eba612021-03-19 10:29:25 +0100595#ifdef HAVE_SYS_STAT_H
596# include <sys/stat.h>
597#endif
598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
Christian Heimes32eba612021-03-19 10:29:25 +0100600# include <stddef.h>
601#else
602# ifdef HAVE_STDLIB_H
603# include <stdlib.h>
604# endif
Martin v. Löwis11437992002-04-12 09:54:03 +0000605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
Christian Heimes32eba612021-03-19 10:29:25 +0100607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608# include <memory.h>
609# endif
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <string.h>
611#endif
Christian Heimes32eba612021-03-19 10:29:25 +0100612#ifdef HAVE_STRINGS_H
613# 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
pxinwr277ce302020-12-30 20:50:39 +0800626TEST_MODULES
Victor Stinner801bb0b2021-02-17 11:14:42 +0100627LIBRARY_DEPS
628STATIC_LIBPYTHON
Christian Heimes32eba612021-03-19 10:29:25 +0100629OPENSSL_RPATH
Christian Heimesff5be6e2018-01-20 13:19:21 +0100630OPENSSL_LDFLAGS
631OPENSSL_LIBS
632OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800633ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000634SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635THREADHEADERS
Victor Stinner75e59a92021-01-20 17:07:21 +0100636WHEEL_PKG_DIR
doko@python.org87421192013-01-26 11:39:31 +0100637LIBPL
638PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100639PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200640BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200641LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700642EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200643ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000644SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000645LIBC
646LIBM
647HAVE_GETHOSTBYNAME
648HAVE_GETHOSTBYNAME_R
649HAVE_GETHOSTBYNAME_R_3_ARG
650HAVE_GETHOSTBYNAME_R_5_ARG
651HAVE_GETHOSTBYNAME_R_6_ARG
652LIBOBJS
653TRUE
654MACHDEP_OBJS
655DYNLOADFILE
656DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700657DTRACE_OBJS
658DTRACE_HEADERS
659DFLAGS
660DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700661TCLTK_LIBS
662TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000663LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800664PKG_CONFIG_LIBDIR
665PKG_CONFIG_PATH
666PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400667TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000668SHLIBS
669CFLAGSFORSHARED
670LINKFORSHARED
671CCSHARED
672BLDSHARED
673LDCXXSHARED
674LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700675SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000676LIBTOOL_CRUFT
677OTHER_LIBTOOL_OPT
678UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100679LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700680CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000681BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200682CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000683OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700684LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700685LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700686LLVM_PROF_ERR
687LLVM_PROF_FILE
688LLVM_PROF_MERGER
689PGO_PROF_USE_FLAG
690PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200691LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200692LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700693PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700694DEF_MAKE_RULE
695DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000696ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000697LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100698MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000699INSTALL_DATA
700INSTALL_SCRIPT
701INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200702ac_ct_READELF
703READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000704ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200705ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000706AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000707GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200708EXPORTSFROM
709EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000710LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000711LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000712RUNSHARED
713INSTSONAME
714LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000715PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000716BLDLIBRARY
717DLLLIBRARY
718LDLIBRARY
719LIBRARY
720BUILDEXEEXT
Christian Heimes32eba612021-03-19 10:29:25 +0100721EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200722NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200723MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200724PLATFORM_TRIPLET
725MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200726ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000727MAINCC
728CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700729SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200730GREP
731CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000732OBJEXT
733EXEEXT
734ac_ct_CC
735CPPFLAGS
736LDFLAGS
737CFLAGS
738CC
739EXPORT_MACOSX_DEPLOYMENT_TARGET
740CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200741_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000742MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000743FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000744FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800745FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000746FRAMEWORKALTINSTALLLAST
747FRAMEWORKALTINSTALLFIRST
748FRAMEWORKINSTALLLAST
749FRAMEWORKINSTALLFIRST
750PYTHONFRAMEWORKINSTALLDIR
751PYTHONFRAMEWORKPREFIX
752PYTHONFRAMEWORKDIR
753PYTHONFRAMEWORKIDENTIFIER
754PYTHONFRAMEWORK
755LIPO_32BIT_FLAGS
756ARCH_RUN_32BIT
757UNIVERSALSDK
758CONFIG_ARGS
759SOVERSION
760VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200761PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200762PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100763host_os
764host_vendor
765host_cpu
766host
767build_os
768build_vendor
769build_cpu
770build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500771HAS_GIT
772GITBRANCH
773GITTAG
774GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400775BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000776target_alias
777host_alias
778build_alias
779LIBS
780ECHO_T
781ECHO_N
782ECHO_C
783DEFS
784mandir
785localedir
786libdir
787psdir
788pdfdir
789dvidir
790htmldir
791infodir
792docdir
793oldincludedir
794includedir
795localstatedir
796sharedstatedir
797sysconfdir
798datadir
799datarootdir
800libexecdir
801sbindir
802bindir
803program_transform_name
804prefix
805exec_prefix
806PACKAGE_URL
807PACKAGE_BUGREPORT
808PACKAGE_STRING
809PACKAGE_VERSION
810PACKAGE_TARNAME
811PACKAGE_NAME
812PATH_SEPARATOR
813SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000814ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000815ac_user_opts='
816enable_option_checking
817enable_universalsdk
818with_universal_archs
819with_framework_name
820enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_cxx_main
822with_suffix
823enable_shared
824enable_profiling
825with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200826with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200827with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000828enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700829with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100830with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400831with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100832with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800833with_memory_sanitizer
834with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_libs
836with_system_expat
837with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100838with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100839with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000840enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700841with_tcltk_includes
842with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000844enable_ipv6
845with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000846with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000847with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000848with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700849with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000850with_libm
851with_libc
852enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100853with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100854with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100855with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000856with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800857with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100858with_openssl
Christian Heimes32eba612021-03-19 10:29:25 +0100859with_openssl_rpath
Christian Heimes892d66e2018-01-29 14:10:18 +0100860with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200861with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200862with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100863with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800864enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000865'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 ac_precious_vars='build_alias
867host_alias
868target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100869MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870CC
871CFLAGS
872LDFLAGS
873LIBS
874CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800875CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700876PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800877PKG_CONFIG
878PKG_CONFIG_PATH
879PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880
Guido van Rossum627b2d71993-12-24 10:39:16 +0000881
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000883ac_init_help=
884ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000885ac_unrecognized_opts=
886ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887# The variables have the same names as the options, with
888# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000889cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892no_recursion=
893prefix=NONE
894program_prefix=NONE
895program_suffix=NONE
896program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901x_includes=NONE
902x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000903
904# Installation directory options.
905# These are left unexpanded so users can "make install exec_prefix=/foo"
906# and all the variables that are supposed to be based on exec_prefix
907# by default will actually change.
908# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910bindir='${exec_prefix}/bin'
911sbindir='${exec_prefix}/sbin'
912libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913datarootdir='${prefix}/share'
914datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915sysconfdir='${prefix}/etc'
916sharedstatedir='${prefix}/com'
917localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918includedir='${prefix}/include'
919oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
921infodir='${datarootdir}/info'
922htmldir='${docdir}'
923dvidir='${docdir}'
924pdfdir='${docdir}'
925psdir='${docdir}'
926libdir='${exec_prefix}/lib'
927localedir='${datarootdir}/locale'
928mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000933do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 # If the previous option needs an argument, assign it.
935 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 ac_prev=
938 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000939 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200942 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
943 *=) ac_optarg= ;;
944 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
Christian Heimes32eba612021-03-19 10:29:25 +0100947 # Accept the important Cygnus configure options, so we can diagnose typos.
948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 case $ac_dashdash$ac_option in
950 --)
951 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 -bindir | --bindir | --bindi | --bind | --bin | --bi)
954 ac_prev=bindir ;;
955 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 -cache-file | --cache-file | --cache-fil | --cache-fi \
964 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
965 ac_prev=cache_file ;;
966 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
967 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 cache_file=$ac_optarg ;;
969
970 --config-cache | -C)
971 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000972
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000978 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
979 | --dataroo | --dataro | --datar)
980 ac_prev=datarootdir ;;
981 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
982 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
983 datarootdir=$ac_optarg ;;
984
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes32eba612021-03-19 10:29:25 +0100989 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt_orig=$ac_useropt
Christian Heimes32eba612021-03-19 10:29:25 +0100991 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 case $ac_user_opts in
993 *"
994"enable_$ac_useropt"
995"*) ;;
996 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
997 ac_unrecognized_sep=', ';;
998 esac
999 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001000
1001 -docdir | --docdir | --docdi | --doc | --do)
1002 ac_prev=docdir ;;
1003 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1004 docdir=$ac_optarg ;;
1005
1006 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1007 ac_prev=dvidir ;;
1008 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1009 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001012 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001014 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes32eba612021-03-19 10:29:25 +01001015 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001016 ac_useropt_orig=$ac_useropt
Christian Heimes32eba612021-03-19 10:29:25 +01001017 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001018 case $ac_user_opts in
1019 *"
1020"enable_$ac_useropt"
1021"*) ;;
1022 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1023 ac_unrecognized_sep=', ';;
1024 esac
1025 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1028 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1029 | --exec | --exe | --ex)
1030 ac_prev=exec_prefix ;;
1031 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1032 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1033 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 # Obsolete; use --with-gas.
1038 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 -help | --help | --hel | --he | -h)
1041 ac_init_help=long ;;
1042 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1043 ac_init_help=recursive ;;
1044 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1045 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1053 ac_prev=htmldir ;;
1054 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1055 | --ht=*)
1056 htmldir=$ac_optarg ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -includedir | --includedir | --includedi | --included | --include \
1059 | --includ | --inclu | --incl | --inc)
1060 ac_prev=includedir ;;
1061 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1062 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -infodir | --infodir | --infodi | --infod | --info | --inf)
1066 ac_prev=infodir ;;
1067 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -libdir | --libdir | --libdi | --libd)
1071 ac_prev=libdir ;;
1072 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1076 | --libexe | --libex | --libe)
1077 ac_prev=libexecdir ;;
1078 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1079 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001082 -localedir | --localedir | --localedi | --localed | --locale)
1083 ac_prev=localedir ;;
1084 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1085 localedir=$ac_optarg ;;
1086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001088 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089 ac_prev=localstatedir ;;
1090 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001091 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
1094 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1095 ac_prev=mandir ;;
1096 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100 # Obsolete; use --without-fp.
1101 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 no_create=yes ;;
1106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001107 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1108 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1109 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1112 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1113 | --oldin | --oldi | --old | --ol | --o)
1114 ac_prev=oldincludedir ;;
1115 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1116 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1117 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1121 ac_prev=prefix ;;
1122 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1126 | --program-pre | --program-pr | --program-p)
1127 ac_prev=program_prefix ;;
1128 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1129 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1133 | --program-suf | --program-su | --program-s)
1134 ac_prev=program_suffix ;;
1135 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1136 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -program-transform-name | --program-transform-name \
1140 | --program-transform-nam | --program-transform-na \
1141 | --program-transform-n | --program-transform- \
1142 | --program-transform | --program-transfor \
1143 | --program-transfo | --program-transf \
1144 | --program-trans | --program-tran \
1145 | --progr-tra | --program-tr | --program-t)
1146 ac_prev=program_transform_name ;;
1147 -program-transform-name=* | --program-transform-name=* \
1148 | --program-transform-nam=* | --program-transform-na=* \
1149 | --program-transform-n=* | --program-transform-=* \
1150 | --program-transform=* | --program-transfor=* \
1151 | --program-transfo=* | --program-transf=* \
1152 | --program-trans=* | --program-tran=* \
1153 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001156 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1157 ac_prev=pdfdir ;;
1158 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1159 pdfdir=$ac_optarg ;;
1160
1161 -psdir | --psdir | --psdi | --psd | --ps)
1162 ac_prev=psdir ;;
1163 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1164 psdir=$ac_optarg ;;
1165
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1167 | -silent | --silent | --silen | --sile | --sil)
1168 silent=yes ;;
1169
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1171 ac_prev=sbindir ;;
1172 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1173 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
1176 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1177 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1178 | --sharedst | --shareds | --shared | --share | --shar \
1179 | --sha | --sh)
1180 ac_prev=sharedstatedir ;;
1181 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1182 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1183 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1184 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 -site | --site | --sit)
1188 ac_prev=site ;;
1189 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1193 ac_prev=srcdir ;;
1194 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001197 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1198 | --syscon | --sysco | --sysc | --sys | --sy)
1199 ac_prev=sysconfdir ;;
1200 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1201 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001203
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1210 verbose=yes ;;
1211
Martin v. Löwis11437992002-04-12 09:54:03 +00001212 -version | --version | --versio | --versi | --vers | -V)
1213 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes32eba612021-03-19 10:29:25 +01001219 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt_orig=$ac_useropt
Christian Heimes32eba612021-03-19 10:29:25 +01001221 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 case $ac_user_opts in
1223 *"
1224"with_$ac_useropt"
1225"*) ;;
1226 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1227 ac_unrecognized_sep=', ';;
1228 esac
1229 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes32eba612021-03-19 10:29:25 +01001235 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 ac_useropt_orig=$ac_useropt
Christian Heimes32eba612021-03-19 10:29:25 +01001237 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001238 case $ac_user_opts in
1239 *"
1240"with_$ac_useropt"
1241"*) ;;
1242 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1243 ac_unrecognized_sep=', ';;
1244 esac
1245 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247 --x)
1248 # Obsolete; use --with-x.
1249 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
1251 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1252 | --x-incl | --x-inc | --x-in | --x-i)
1253 ac_prev=x_includes ;;
1254 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1255 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257
1258 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1259 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1260 ac_prev=x_libraries ;;
1261 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1262 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1266Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 ;;
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 *=*)
1270 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1271 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 case $ac_envvar in #(
1273 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 export $ac_envvar ;;
1278
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001279 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 # FIXME: should be removed in autoconf 3.0.
Christian Heimes32eba612021-03-19 10:29:25 +01001281 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Christian Heimes32eba612021-03-19 10:29:25 +01001283 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001284 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 ;;
1286
1287 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288done
1289
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001291 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001293fi
1294
Matthias Kloseb9621712010-04-24 17:59:49 +00001295if test -n "$ac_unrecognized_opts"; then
1296 case $enable_option_checking in
1297 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Christian Heimes32eba612021-03-19 10:29:25 +01001299 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 esac
1301fi
1302
1303# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1305 datadir sysconfdir sharedstatedir localstatedir includedir \
1306 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimes32eba612021-03-19 10:29:25 +01001307 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001310 # Remove trailing slashes.
1311 case $ac_val in
1312 */ )
1313 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1314 eval $ac_var=\$ac_val;;
1315 esac
1316 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 [\\/$]* | ?:[\\/]* ) continue;;
1319 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001320 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001322done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323
Martin v. Löwis11437992002-04-12 09:54:03 +00001324# There might be people who depend on the old broken behavior: `$host'
1325# used to hold the argument of --host etc.
1326# FIXME: To remove some day.
1327build=$build_alias
1328host=$host_alias
1329target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Martin v. Löwis11437992002-04-12 09:54:03 +00001331# FIXME: To remove some day.
1332if test "x$host_alias" != x; then
1333 if test "x$build_alias" = x; then
1334 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001335 elif test "x$build_alias" != "x$host_alias"; then
1336 cross_compiling=yes
1337 fi
1338fi
1339
1340ac_tool_prefix=
1341test -n "$host_alias" && ac_tool_prefix=$host_alias-
1342
1343test "$silent" = yes && exec 6>/dev/null
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346ac_pwd=`pwd` && test -n "$ac_pwd" &&
1347ac_ls_di=`ls -di .` &&
1348ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001349 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352
1353
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354# Find the source files, if location was not specified.
1355if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001356 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001357 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 ac_confdir=`$as_dirname -- "$as_myself" ||
1359$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1360 X"$as_myself" : 'X\(//\)[^/]' \| \
1361 X"$as_myself" : 'X\(//\)$' \| \
1362 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes32eba612021-03-19 10:29:25 +01001363$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\/\)[^/].*/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\/\)$/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\).*/{
1377 s//\1/
1378 q
1379 }
1380 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001381 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001383 srcdir=..
1384 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001385else
1386 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001388if test ! -r "$srcdir/$ac_unique_file"; then
1389 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001390 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001392ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1393ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001394 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 pwd)`
1396# When building in place, set srcdir=.
1397if test "$ac_abs_confdir" = "$ac_pwd"; then
1398 srcdir=.
1399fi
1400# Remove unnecessary trailing slashes from srcdir.
1401# Double slashes in file names in object file debugging info
1402# mess up M-x gdb in Emacs.
1403case $srcdir in
1404*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1405esac
1406for ac_var in $ac_precious_vars; do
1407 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1408 eval ac_env_${ac_var}_value=\$${ac_var}
1409 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1410 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1411done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001412
Martin v. Löwis11437992002-04-12 09:54:03 +00001413#
1414# Report the --help message.
1415#
1416if test "$ac_init_help" = "long"; then
1417 # Omit some internal or obsolete options to make the list less imposing.
1418 # This message is too long to be a string in the A/UX 3.1 sh.
1419 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001420\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001421
1422Usage: $0 [OPTION]... [VAR=VALUE]...
1423
1424To assign environment variables (e.g., CC, CFLAGS...), specify them as
1425VAR=VALUE. See below for descriptions of some of the useful variables.
1426
1427Defaults for the options are specified in brackets.
1428
1429Configuration:
1430 -h, --help display this help and exit
1431 --help=short display options specific to this package
1432 --help=recursive display the short help of all the included packages
1433 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001434 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 --cache-file=FILE cache test results in FILE [disabled]
1436 -C, --config-cache alias for \`--cache-file=config.cache'
1437 -n, --no-create do not create output files
1438 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1439
Martin v. Löwis11437992002-04-12 09:54:03 +00001440Installation directories:
1441 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446By default, \`make install' will install all the files in
1447\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1448an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1449for instance \`--prefix=\$HOME'.
1450
1451For better control, use the options below.
1452
1453Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001454 --bindir=DIR user executables [EPREFIX/bin]
1455 --sbindir=DIR system admin executables [EPREFIX/sbin]
1456 --libexecdir=DIR program executables [EPREFIX/libexec]
1457 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1458 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1459 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1460 --libdir=DIR object code libraries [EPREFIX/lib]
1461 --includedir=DIR C header files [PREFIX/include]
1462 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1463 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1464 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1465 --infodir=DIR info documentation [DATAROOTDIR/info]
1466 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1467 --mandir=DIR man documentation [DATAROOTDIR/man]
1468 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1469 --htmldir=DIR html documentation [DOCDIR]
1470 --dvidir=DIR dvi documentation [DOCDIR]
1471 --pdfdir=DIR pdf documentation [DOCDIR]
1472 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001473_ACEOF
1474
1475 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001476
1477System types:
1478 --build=BUILD configure for building on BUILD [guessed]
1479 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001480_ACEOF
1481fi
1482
1483if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001484 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001485 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001486 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001487 cat <<\_ACEOF
1488
1489Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001490 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1492 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001493 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001494 create a universal binary build. SDKDIR specifies
1495 which macOS SDK should be used to perform the build,
1496 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001498 create a Python.framework rather than a traditional
1499 Unix install. optional INSTALLDIR specifies the
1500 installation path. see Mac/README.rst (default is
1501 no)
1502 --enable-shared enable building a shared Python library (default is
1503 no)
1504 --enable-profiling enable C-level code profiling with gprof (default is
1505 no)
1506 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1507 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001508 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001509 support loadable extensions in _sqlite module, see
1510 Doc/library/sqlite3.rst (default is no)
1511 --enable-ipv6 enable ipv6 (with ipv4) support, see
1512 Doc/library/socket.rst (default is yes if supported)
1513 --enable-big-digits[=15|30]
1514 use big digits (30 or 15 bits) for Python longs
1515 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001516 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001517
1518Optional Packages:
1519 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1520 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001521 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001522 specify the kind of universal binary that should be
1523 created. this option is only valid when
1524 --enable-universalsdk is set; options are:
Ronald Oussoren41761932020-11-08 10:05:27 +01001525 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1526 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001527 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001528 specify the name for the python framework on macOS
1529 only valid when --enable-framework is set. see
1530 Mac/README.rst (default is 'Python')
1531 --with-cxx-main[=COMPILER]
1532 compile main() and link Python executable with C++
1533 compiler specified in COMPILER (default is $CXX)
1534 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1535 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001536 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001537 (default is no)
1538 --with-assertions build with C assertions enabled (default is no)
1539 --with-lto enable Link-Time-Optimization in any build (default
1540 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001541 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001542 select hash algorithm for use in Python/pyhash.c
1543 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001544 --with-tzpath=<list of absolute paths separated by pathsep>
1545 Select the default time zone search path for zoneinfo.TZPATH
1546
Charles-François Natalid30b0222014-05-08 23:08:51 +01001547 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001548 enable AddressSanitizer memory error detector,
1549 'asan' (default is no)
1550 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1551 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001552 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001553 enable UndefinedBehaviorSanitizer undefined
1554 behaviour detector, 'ubsan' (default is no)
1555 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001556 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001557 library, see Doc/library/pyexpat.rst (default is no)
1558 --with-system-ffi build _ctypes module using an installed ffi library,
1559 see Doc/library/ctypes.rst (default is
1560 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001561 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001562 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001563 --with-decimal-contextvar
1564 build _decimal module using a coroutine-local rather
1565 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001566 --with-tcltk-includes='-I...'
1567 override search for Tcl and Tk include files
1568 --with-tcltk-libs='-L...'
1569 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001570 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001571 override order to check db backends for dbm; a valid
1572 value is a colon separated string with the backend
1573 names `ndbm', `gdbm' and `bdb'.
1574 --with-doc-strings enable documentation strings (default is yes)
1575 --with-pymalloc enable specialized mallocs (default is yes)
1576 --with-c-locale-coercion
1577 enable C locale coercion to a UTF-8 based locale
1578 (default is yes)
1579 --with-valgrind enable Valgrind support (default is no)
1580 --with-dtrace enable DTrace support (default is no)
1581 --with-libm=STRING override libm math library to STRING (default is
1582 system-dependent)
1583 --with-libc=STRING override libc C library to STRING (default is
1584 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001585 --with-platlibdir=DIRNAME
1586 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001587 --with-wheel-pkg-dir=PATH
1588 Directory of wheel packages used by ensurepip
1589 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001590 --with(out)-readline[=editline]
1591 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001592 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001593 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001594 --with-ensurepip[=install|upgrade|no]
1595 "install" or "upgrade" using bundled pip (default is
1596 upgrade)
Christian Heimes5d6e8c12021-03-27 14:44:04 +01001597 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes32eba612021-03-19 10:29:25 +01001598 --with-openssl-rpath=[DIR|auto|no]
1599 Set runtime library directory (rpath) for OpenSSL
1600 libraries, no (default): don't set rpath, auto:
1601 auto-detect rpath from --with-openssl and
1602 pkg-config, DIR: set an explicit rpath
Christian Heimes892d66e2018-01-29 14:10:18 +01001603 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001604 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001605 Python's preferred selection (default), openssl:
1606 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001607 custom string, PROTOCOL_SSLv2 ignores the setting,
1608 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001609 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1610 builtin hash modules, md5, sha1, sha256, sha512,
1611 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001612 --with-experimental-isolated-subinterpreters
1613 better isolate subinterpreters, experimental build
1614 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001615 --without-static-libpython
1616 do not build libpythonMAJOR.MINOR.a and do not
1617 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001618
1619Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001620 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 CC C compiler command
1622 CFLAGS C compiler flags
1623 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1624 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001629 PROFILE_TASK
1630 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001631 PKG_CONFIG path to pkg-config utility
1632 PKG_CONFIG_PATH
1633 directories to add to pkg-config's search path
1634 PKG_CONFIG_LIBDIR
1635 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
1637Use these variables to override the choices made by `configure' or to help
1638it to find libraries and programs with nonstandard names/locations.
1639
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001640Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
1644
1645if test "$ac_init_help" = "recursive"; then
1646 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 test -d "$ac_dir" ||
1649 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1650 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 ac_builddir=.
1652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653case "$ac_dir" in
1654.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1655*)
Christian Heimes32eba612021-03-19 10:29:25 +01001656 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 # A ".." for each directory in $ac_dir_suffix.
Christian Heimes32eba612021-03-19 10:29:25 +01001658 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 case $ac_top_builddir_sub in
1660 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1661 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1662 esac ;;
1663esac
1664ac_abs_top_builddir=$ac_pwd
1665ac_abs_builddir=$ac_pwd$ac_dir_suffix
1666# for backward compatibility:
1667ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001668
1669case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001670 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001671 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001672 ac_top_srcdir=$ac_top_builddir_sub
1673 ac_abs_top_srcdir=$ac_pwd ;;
1674 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001675 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001676 ac_top_srcdir=$srcdir
1677 ac_abs_top_srcdir=$srcdir ;;
1678 *) # Relative name.
1679 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1680 ac_top_srcdir=$ac_top_build_prefix$srcdir
1681 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001682esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001683ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001685 cd "$ac_dir" || { ac_status=$?; continue; }
Christian Heimes32eba612021-03-19 10:29:25 +01001686 # Check for guested configure.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001687 if test -f "$ac_srcdir/configure.gnu"; then
1688 echo &&
1689 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1690 elif test -f "$ac_srcdir/configure"; then
1691 echo &&
1692 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001693 else
Christian Heimes32eba612021-03-19 10:29:25 +01001694 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695 fi || ac_status=$?
1696 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 done
1698fi
1699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001700test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001701if $ac_init_version; then
1702 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001703python configure 3.10
Christian Heimes32eba612021-03-19 10:29:25 +01001704generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001705
Christian Heimes32eba612021-03-19 10:29:25 +01001706Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001707This configure script is free software; the Free Software Foundation
1708gives unlimited permission to copy, distribute and modify it.
1709_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001710 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001712
1713## ------------------------ ##
1714## Autoconf initialization. ##
1715## ------------------------ ##
1716
1717# ac_fn_c_try_compile LINENO
1718# --------------------------
1719# Try to compile conftest.$ac_ext, and return whether this succeeded.
1720ac_fn_c_try_compile ()
1721{
1722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes32eba612021-03-19 10:29:25 +01001723 rm -f conftest.$ac_objext
Matthias Kloseb9621712010-04-24 17:59:49 +00001724 if { { ac_try="$ac_compile"
1725case "(($ac_try" in
1726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1727 *) ac_try_echo=$ac_try;;
1728esac
1729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01001730$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 (eval "$ac_compile") 2>conftest.err
1732 ac_status=$?
1733 if test -s conftest.err; then
1734 grep -v '^ *+' conftest.err >conftest.er1
1735 cat conftest.er1 >&5
1736 mv -f conftest.er1 conftest.err
1737 fi
Christian Heimes32eba612021-03-19 10:29:25 +01001738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001739 test $ac_status = 0; } && {
1740 test -z "$ac_c_werror_flag" ||
1741 test ! -s conftest.err
Christian Heimes32eba612021-03-19 10:29:25 +01001742 } && test -s conftest.$ac_objext; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 ac_retval=0
Christian Heimes32eba612021-03-19 10:29:25 +01001744else
1745 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001746sed 's/^/| /' conftest.$ac_ext >&5
1747
1748 ac_retval=1
1749fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001750 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 as_fn_set_status $ac_retval
1752
1753} # ac_fn_c_try_compile
1754
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001755# ac_fn_c_try_cpp LINENO
1756# ----------------------
1757# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1758ac_fn_c_try_cpp ()
1759{
1760 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1761 if { { ac_try="$ac_cpp conftest.$ac_ext"
1762case "(($ac_try" in
1763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1764 *) ac_try_echo=$ac_try;;
1765esac
1766eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01001767$as_echo "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001768 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1769 ac_status=$?
1770 if test -s conftest.err; then
1771 grep -v '^ *+' conftest.err >conftest.er1
1772 cat conftest.er1 >&5
1773 mv -f conftest.er1 conftest.err
1774 fi
Christian Heimes32eba612021-03-19 10:29:25 +01001775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001776 test $ac_status = 0; } > conftest.i && {
1777 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1778 test ! -s conftest.err
Christian Heimes32eba612021-03-19 10:29:25 +01001779 }; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001780 ac_retval=0
Christian Heimes32eba612021-03-19 10:29:25 +01001781else
1782 $as_echo "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001783sed 's/^/| /' conftest.$ac_ext >&5
1784
1785 ac_retval=1
1786fi
1787 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1788 as_fn_set_status $ac_retval
1789
1790} # ac_fn_c_try_cpp
1791
Matthias Kloseb9621712010-04-24 17:59:49 +00001792# ac_fn_c_try_link LINENO
1793# -----------------------
1794# Try to link conftest.$ac_ext, and return whether this succeeded.
1795ac_fn_c_try_link ()
1796{
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes32eba612021-03-19 10:29:25 +01001798 rm -f conftest.$ac_objext conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001799 if { { ac_try="$ac_link"
1800case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803esac
1804eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01001805$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 (eval "$ac_link") 2>conftest.err
1807 ac_status=$?
1808 if test -s conftest.err; then
1809 grep -v '^ *+' conftest.err >conftest.er1
1810 cat conftest.er1 >&5
1811 mv -f conftest.er1 conftest.err
1812 fi
Christian Heimes32eba612021-03-19 10:29:25 +01001813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 test $ac_status = 0; } && {
1815 test -z "$ac_c_werror_flag" ||
1816 test ! -s conftest.err
1817 } && test -s conftest$ac_exeext && {
1818 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001819 test -x conftest$ac_exeext
Christian Heimes32eba612021-03-19 10:29:25 +01001820 }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 ac_retval=0
Christian Heimes32eba612021-03-19 10:29:25 +01001822else
1823 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001824sed 's/^/| /' conftest.$ac_ext >&5
1825
1826 ac_retval=1
1827fi
1828 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1829 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1830 # interfere with the next link command; also delete a directory that is
1831 # left behind by Apple's compiler. We do this before executing the actions.
1832 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001833 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001834 as_fn_set_status $ac_retval
1835
1836} # ac_fn_c_try_link
1837
Christian Heimes32eba612021-03-19 10:29:25 +01001838# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001839# -------------------------------------------------------
Christian Heimes32eba612021-03-19 10:29:25 +01001840# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1841# the include files in INCLUDES and setting the cache variable VAR
1842# accordingly.
1843ac_fn_c_check_header_mongrel ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001844{
1845 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes32eba612021-03-19 10:29:25 +01001846 if eval \${$3+:} false; then :
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1848$as_echo_n "checking for $2... " >&6; }
1849if eval \${$3+:} false; then :
1850 $as_echo_n "(cached) " >&6
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855else
1856 # Is the header compilable?
1857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1858$as_echo_n "checking $2 usability... " >&6; }
1859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001860/* end confdefs.h. */
1861$4
1862#include <$2>
1863_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01001864if ac_fn_c_try_compile "$LINENO"; then :
1865 ac_header_compiler=yes
1866else
1867 ac_header_compiler=no
Matthias Kloseb9621712010-04-24 17:59:49 +00001868fi
Christian Heimes32eba612021-03-19 10:29:25 +01001869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1871$as_echo "$ac_header_compiler" >&6; }
1872
1873# Is the header present?
1874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1875$as_echo_n "checking $2 presence... " >&6; }
1876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878#include <$2>
1879_ACEOF
1880if ac_fn_c_try_cpp "$LINENO"; then :
1881 ac_header_preproc=yes
1882else
1883 ac_header_preproc=no
1884fi
1885rm -f conftest.err conftest.i conftest.$ac_ext
1886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1887$as_echo "$ac_header_preproc" >&6; }
1888
1889# So? What about this header?
1890case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1891 yes:no: )
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1893$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1895$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1896 ;;
1897 no:yes:* )
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1899$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1901$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1903$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1905$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1907$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1908( $as_echo "## --------------------------------------- ##
1909## Report this to https://bugs.python.org/ ##
1910## --------------------------------------- ##"
1911 ) | sed "s/^/$as_me: WARNING: /" >&2
1912 ;;
1913esac
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
1916if eval \${$3+:} false; then :
1917 $as_echo_n "(cached) " >&6
1918else
1919 eval "$3=\$ac_header_compiler"
Matthias Kloseb9621712010-04-24 17:59:49 +00001920fi
1921eval ac_res=\$$3
Christian Heimes32eba612021-03-19 10:29:25 +01001922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
1924fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
Christian Heimes32eba612021-03-19 10:29:25 +01001927} # ac_fn_c_check_header_mongrel
Matthias Kloseb9621712010-04-24 17:59:49 +00001928
1929# ac_fn_c_try_run LINENO
1930# ----------------------
Christian Heimes32eba612021-03-19 10:29:25 +01001931# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1932# that executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001933ac_fn_c_try_run ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 if { { ac_try="$ac_link"
1937case "(($ac_try" in
1938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1939 *) ac_try_echo=$ac_try;;
1940esac
1941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01001942$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 (eval "$ac_link") 2>&5
1944 ac_status=$?
Christian Heimes32eba612021-03-19 10:29:25 +01001945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001946 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1947 { { case "(($ac_try" in
1948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1949 *) ac_try_echo=$ac_try;;
1950esac
1951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01001952$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 (eval "$ac_try") 2>&5
1954 ac_status=$?
Christian Heimes32eba612021-03-19 10:29:25 +01001955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1956 test $ac_status = 0; }; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001957 ac_retval=0
Christian Heimes32eba612021-03-19 10:29:25 +01001958else
1959 $as_echo "$as_me: program exited with status $ac_status" >&5
1960 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001961sed 's/^/| /' conftest.$ac_ext >&5
1962
1963 ac_retval=$ac_status
1964fi
1965 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001966 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001967 as_fn_set_status $ac_retval
1968
1969} # ac_fn_c_try_run
1970
Christian Heimes32eba612021-03-19 10:29:25 +01001971# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1972# -------------------------------------------------------
1973# Tests whether HEADER exists and can be compiled using the include files in
1974# INCLUDES, setting the cache variable VAR accordingly.
1975ac_fn_c_check_header_compile ()
1976{
1977 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1979$as_echo_n "checking for $2... " >&6; }
1980if eval \${$3+:} false; then :
1981 $as_echo_n "(cached) " >&6
1982else
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986#include <$2>
1987_ACEOF
1988if ac_fn_c_try_compile "$LINENO"; then :
1989 eval "$3=yes"
1990else
1991 eval "$3=no"
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; }
1998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1999
2000} # ac_fn_c_check_header_compile
2001
Matthias Kloseb9621712010-04-24 17:59:49 +00002002# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2003# -------------------------------------------
2004# Tests whether TYPE exists after having included INCLUDES, setting cache
2005# variable VAR accordingly.
2006ac_fn_c_check_type ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes32eba612021-03-19 10:29:25 +01002009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2010$as_echo_n "checking for $2... " >&6; }
2011if eval \${$3+:} false; then :
2012 $as_echo_n "(cached) " >&6
2013else
Matthias Kloseb9621712010-04-24 17:59:49 +00002014 eval "$3=no"
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
Christian Heimes32eba612021-03-19 10:29:25 +01002019main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002020{
2021if (sizeof ($2))
2022 return 0;
2023 ;
2024 return 0;
2025}
2026_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002027if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
Christian Heimes32eba612021-03-19 10:29:25 +01002032main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002033{
2034if (sizeof (($2)))
2035 return 0;
2036 ;
2037 return 0;
2038}
2039_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002040if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
Christian Heimes32eba612021-03-19 10:29:25 +01002042else
Matthias Kloseb9621712010-04-24 17:59:49 +00002043 eval "$3=yes"
2044fi
Christian Heimes32eba612021-03-19 10:29:25 +01002045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002046fi
Christian Heimes32eba612021-03-19 10:29:25 +01002047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002048fi
2049eval ac_res=\$$3
Christian Heimes32eba612021-03-19 10:29:25 +01002050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2051$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002052 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002053
2054} # ac_fn_c_check_type
2055
Matthias Kloseb9621712010-04-24 17:59:49 +00002056# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2057# --------------------------------------------
2058# Tries to find the compile-time value of EXPR in a program that includes
2059# INCLUDES, setting VAR accordingly. Returns whether the value could be
2060# computed
2061ac_fn_c_compute_int ()
2062{
2063 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2064 if test "$cross_compiling" = yes; then
2065 # Depending upon the size, compute the lo and hi bounds.
2066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
Christian Heimes32eba612021-03-19 10:29:25 +01002070main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002071{
2072static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002080if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002081 ac_lo=0 ac_mid=0
2082 while :; do
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
Christian Heimes32eba612021-03-19 10:29:25 +01002087main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002097if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002098 ac_hi=$ac_mid; break
Christian Heimes32eba612021-03-19 10:29:25 +01002099else
Matthias Kloseb9621712010-04-24 17:59:49 +00002100 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2101 if test $ac_lo -le $ac_mid; then
2102 ac_lo= ac_hi=
2103 break
2104 fi
2105 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2106fi
Christian Heimes32eba612021-03-19 10:29:25 +01002107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002108 done
Christian Heimes32eba612021-03-19 10:29:25 +01002109else
Matthias Kloseb9621712010-04-24 17:59:49 +00002110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h. */
2112$4
2113int
Christian Heimes32eba612021-03-19 10:29:25 +01002114main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002115{
2116static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002117test_array [0] = 0;
2118return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002119
2120 ;
2121 return 0;
2122}
2123_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002124if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002125 ac_hi=-1 ac_mid=-1
2126 while :; do
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130int
Christian Heimes32eba612021-03-19 10:29:25 +01002131main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002132{
2133static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002134test_array [0] = 0;
2135return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002136
2137 ;
2138 return 0;
2139}
2140_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002141if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002142 ac_lo=$ac_mid; break
Christian Heimes32eba612021-03-19 10:29:25 +01002143else
Matthias Kloseb9621712010-04-24 17:59:49 +00002144 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2145 if test $ac_mid -le $ac_hi; then
2146 ac_lo= ac_hi=
2147 break
2148 fi
2149 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2150fi
Christian Heimes32eba612021-03-19 10:29:25 +01002151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002152 done
Christian Heimes32eba612021-03-19 10:29:25 +01002153else
Matthias Kloseb9621712010-04-24 17:59:49 +00002154 ac_lo= ac_hi=
2155fi
Christian Heimes32eba612021-03-19 10:29:25 +01002156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002157fi
Christian Heimes32eba612021-03-19 10:29:25 +01002158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002159# Binary search between lo and hi bounds.
2160while test "x$ac_lo" != "x$ac_hi"; do
2161 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165int
Christian Heimes32eba612021-03-19 10:29:25 +01002166main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002167{
2168static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002169test_array [0] = 0;
2170return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002171
2172 ;
2173 return 0;
2174}
2175_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002176if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 ac_hi=$ac_mid
Christian Heimes32eba612021-03-19 10:29:25 +01002178else
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2180fi
Christian Heimes32eba612021-03-19 10:29:25 +01002181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002182done
2183case $ac_lo in #((
2184?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2185'') ac_retval=1 ;;
2186esac
2187 else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
Christian Heimes32eba612021-03-19 10:29:25 +01002191static long int longval () { return $2; }
2192static unsigned long int ulongval () { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002193#include <stdio.h>
2194#include <stdlib.h>
2195int
Christian Heimes32eba612021-03-19 10:29:25 +01002196main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002197{
2198
2199 FILE *f = fopen ("conftest.val", "w");
2200 if (! f)
2201 return 1;
2202 if (($2) < 0)
2203 {
2204 long int i = longval ();
2205 if (i != ($2))
2206 return 1;
2207 fprintf (f, "%ld", i);
2208 }
2209 else
2210 {
2211 unsigned long int i = ulongval ();
2212 if (i != ($2))
2213 return 1;
2214 fprintf (f, "%lu", i);
2215 }
2216 /* Do not output a trailing newline, as this causes \r\n confusion
2217 on some platforms. */
2218 return ferror (f) || fclose (f) != 0;
2219
2220 ;
2221 return 0;
2222}
2223_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002224if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002225 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Christian Heimes32eba612021-03-19 10:29:25 +01002226else
Matthias Kloseb9621712010-04-24 17:59:49 +00002227 ac_retval=1
2228fi
2229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2230 conftest.$ac_objext conftest.beam conftest.$ac_ext
2231rm -f conftest.val
2232
2233 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235 as_fn_set_status $ac_retval
2236
2237} # ac_fn_c_compute_int
2238
2239# ac_fn_c_check_func LINENO FUNC VAR
2240# ----------------------------------
2241# Tests whether FUNC exists, setting the cache variable VAR accordingly
2242ac_fn_c_check_func ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes32eba612021-03-19 10:29:25 +01002245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2246$as_echo_n "checking for $2... " >&6; }
2247if eval \${$3+:} false; then :
2248 $as_echo_n "(cached) " >&6
2249else
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2253 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2254#define $2 innocuous_$2
2255
2256/* System header to define __stub macros and hopefully few prototypes,
Christian Heimes32eba612021-03-19 10:29:25 +01002257 which can conflict with char $2 (); below.
2258 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2259 <limits.h> exists even on freestanding compilers. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002260
Christian Heimes32eba612021-03-19 10:29:25 +01002261#ifdef __STDC__
2262# include <limits.h>
2263#else
2264# include <assert.h>
2265#endif
2266
Matthias Kloseb9621712010-04-24 17:59:49 +00002267#undef $2
2268
2269/* Override any GCC internal prototype to avoid an error.
2270 Use char because int might match the return type of a GCC
2271 builtin and then its argument prototype would still apply. */
2272#ifdef __cplusplus
2273extern "C"
2274#endif
2275char $2 ();
2276/* The GNU C library defines this for functions which it implements
2277 to always fail with ENOSYS. Some functions are actually named
2278 something starting with __ and the normal name is an alias. */
2279#if defined __stub_$2 || defined __stub___$2
2280choke me
2281#endif
2282
2283int
Christian Heimes32eba612021-03-19 10:29:25 +01002284main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002285{
2286return $2 ();
2287 ;
2288 return 0;
2289}
2290_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002291if ac_fn_c_try_link "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002292 eval "$3=yes"
Christian Heimes32eba612021-03-19 10:29:25 +01002293else
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 eval "$3=no"
2295fi
Christian Heimes32eba612021-03-19 10:29:25 +01002296rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00002297 conftest$ac_exeext conftest.$ac_ext
2298fi
2299eval ac_res=\$$3
Christian Heimes32eba612021-03-19 10:29:25 +01002300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2301$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002302 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002303
2304} # ac_fn_c_check_func
2305
Christian Heimes32eba612021-03-19 10:29:25 +01002306# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2307# ---------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002308# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Christian Heimes32eba612021-03-19 10:29:25 +01002309# accordingly.
2310ac_fn_c_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002311{
2312 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2313 as_decl_name=`echo $2|sed 's/ *(.*//'`
2314 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Christian Heimes32eba612021-03-19 10:29:25 +01002315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2316$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2317if eval \${$3+:} false; then :
2318 $as_echo_n "(cached) " >&6
2319else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$4
2323int
Christian Heimes32eba612021-03-19 10:29:25 +01002324main ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002325{
2326#ifndef $as_decl_name
2327#ifdef __cplusplus
2328 (void) $as_decl_use;
2329#else
2330 (void) $as_decl_name;
2331#endif
2332#endif
2333
2334 ;
2335 return 0;
2336}
2337_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002338if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002339 eval "$3=yes"
Christian Heimes32eba612021-03-19 10:29:25 +01002340else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002341 eval "$3=no"
2342fi
Christian Heimes32eba612021-03-19 10:29:25 +01002343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002344fi
2345eval ac_res=\$$3
Christian Heimes32eba612021-03-19 10:29:25 +01002346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002348 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2349
Christian Heimes32eba612021-03-19 10:29:25 +01002350} # ac_fn_c_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002351
Matthias Kloseb9621712010-04-24 17:59:49 +00002352# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2353# ----------------------------------------------------
2354# Tries to find if the field MEMBER exists in type AGGR, after including
2355# INCLUDES, setting cache variable VAR accordingly.
2356ac_fn_c_check_member ()
2357{
2358 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes32eba612021-03-19 10:29:25 +01002359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2360$as_echo_n "checking for $2.$3... " >&6; }
2361if eval \${$4+:} false; then :
2362 $as_echo_n "(cached) " >&6
2363else
Matthias Kloseb9621712010-04-24 17:59:49 +00002364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h. */
2366$5
2367int
Christian Heimes32eba612021-03-19 10:29:25 +01002368main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002369{
2370static $2 ac_aggr;
2371if (ac_aggr.$3)
2372return 0;
2373 ;
2374 return 0;
2375}
2376_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002377if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002378 eval "$4=yes"
Christian Heimes32eba612021-03-19 10:29:25 +01002379else
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h. */
2382$5
2383int
Christian Heimes32eba612021-03-19 10:29:25 +01002384main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002385{
2386static $2 ac_aggr;
2387if (sizeof ac_aggr.$3)
2388return 0;
2389 ;
2390 return 0;
2391}
2392_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01002393if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002394 eval "$4=yes"
Christian Heimes32eba612021-03-19 10:29:25 +01002395else
Matthias Kloseb9621712010-04-24 17:59:49 +00002396 eval "$4=no"
2397fi
Christian Heimes32eba612021-03-19 10:29:25 +01002398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002399fi
Christian Heimes32eba612021-03-19 10:29:25 +01002400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002401fi
2402eval ac_res=\$$4
Christian Heimes32eba612021-03-19 10:29:25 +01002403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2404$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002405 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002406
2407} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002409This file contains any messages produced by compilers while
2410running configure, to aid debugging if configure makes a mistake.
2411
Pablo Galindod4fe0982020-05-19 03:33:01 +01002412It was created by python $as_me 3.10, which was
Christian Heimes32eba612021-03-19 10:29:25 +01002413generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002414
Christian Heimes32eba612021-03-19 10:29:25 +01002415 $ $0 $@
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
2417_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002419{
2420cat <<_ASUNAME
2421## --------- ##
2422## Platform. ##
2423## --------- ##
2424
2425hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2426uname -m = `(uname -m) 2>/dev/null || echo unknown`
2427uname -r = `(uname -r) 2>/dev/null || echo unknown`
2428uname -s = `(uname -s) 2>/dev/null || echo unknown`
2429uname -v = `(uname -v) 2>/dev/null || echo unknown`
2430
2431/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2432/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2433
2434/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2435/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2436/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002438/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2439/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2440/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2441
2442_ASUNAME
2443
2444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2445for as_dir in $PATH
2446do
2447 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01002448 test -z "$as_dir" && as_dir=.
2449 $as_echo "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453} >&5
2454
2455cat >&5 <<_ACEOF
2456
2457
2458## ----------- ##
2459## Core tests. ##
2460## ----------- ##
2461
2462_ACEOF
2463
2464
2465# Keep a trace of the command line.
2466# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002467# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002468# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002469# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002470ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002471ac_configure_args0=
2472ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002473ac_must_keep_next=false
2474for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 for ac_arg
2477 do
2478 case $ac_arg in
2479 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2480 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2481 | -silent | --silent | --silen | --sile | --sil)
2482 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 *\'*)
Christian Heimes32eba612021-03-19 10:29:25 +01002484 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 esac
2486 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002491 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 case $ac_arg in
2494 *=* | --config-cache | -C | -disable-* | --disable-* \
2495 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2496 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2497 | -with-* | --with-* | -without-* | --without-* | --x)
2498 case "$ac_configure_args0 " in
2499 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2500 esac
2501 ;;
2502 -* ) ac_must_keep_next=true ;;
2503 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 ;;
2507 esac
2508 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002509done
Matthias Kloseb9621712010-04-24 17:59:49 +00002510{ ac_configure_args0=; unset ac_configure_args0;}
2511{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002512
2513# When interrupted or exit'd, cleanup temporary files, and complete
2514# config.log. We remove comments because anyway the quotes in there
2515# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516# WARNING: Use '\'' to represent an apostrophe within the trap.
2517# 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 +00002518trap 'exit_status=$?
2519 # Save into config.log some information that might help in debugging.
2520 {
2521 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002522
Christian Heimes32eba612021-03-19 10:29:25 +01002523 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528(
2529 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2530 eval ac_val=\$$ac_var
2531 case $ac_val in #(
2532 *${as_nl}*)
2533 case $ac_var in #(
Christian Heimes32eba612021-03-19 10:29:25 +01002534 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2535$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 esac
2537 case $ac_var in #(
2538 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2540 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 esac ;;
2542 esac
2543 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2546 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 "s/'\''/'\''\\\\'\'''\''/g;
2549 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2550 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002551 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002553 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 esac |
2555 sort
2556)
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002558
Christian Heimes32eba612021-03-19 10:29:25 +01002559 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002560## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 echo
2563 for ac_var in $ac_subst_vars
2564 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 eval ac_val=\$$ac_var
2566 case $ac_val in
Christian Heimes32eba612021-03-19 10:29:25 +01002567 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac
Christian Heimes32eba612021-03-19 10:29:25 +01002569 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 done | sort
2571 echo
2572
2573 if test -n "$ac_subst_files"; then
Christian Heimes32eba612021-03-19 10:29:25 +01002574 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 echo
2578 for ac_var in $ac_subst_files
2579 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 eval ac_val=\$$ac_var
2581 case $ac_val in
Christian Heimes32eba612021-03-19 10:29:25 +01002582 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 esac
Christian Heimes32eba612021-03-19 10:29:25 +01002584 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 done | sort
2586 echo
2587 fi
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 if test -s confdefs.h; then
Christian Heimes32eba612021-03-19 10:29:25 +01002590 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002591## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002592## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
2596 fi
2597 test "$ac_signal" != 0 &&
Christian Heimes32eba612021-03-19 10:29:25 +01002598 $as_echo "$as_me: caught signal $ac_signal"
2599 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 rm -f core *.core core.conftest.* &&
2602 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002605for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002607done
2608ac_signal=0
2609
2610# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002612
Christian Heimes32eba612021-03-19 10:29:25 +01002613$as_echo "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615# Predefined preprocessor variables.
2616
Christian Heimes32eba612021-03-19 10:29:25 +01002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_NAME "$PACKAGE_NAME"
2619_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002620
Christian Heimes32eba612021-03-19 10:29:25 +01002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2623_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002624
Christian Heimes32eba612021-03-19 10:29:25 +01002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_VERSION "$PACKAGE_VERSION"
2627_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002628
Christian Heimes32eba612021-03-19 10:29:25 +01002629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_STRING "$PACKAGE_STRING"
2631_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002632
Christian Heimes32eba612021-03-19 10:29:25 +01002633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2635_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002636
Christian Heimes32eba612021-03-19 10:29:25 +01002637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_URL "$PACKAGE_URL"
2639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00002640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641
2642# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002643# Prefer an explicitly selected file to automatically selected ones.
Christian Heimes32eba612021-03-19 10:29:25 +01002644ac_site_file1=NONE
2645ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646if test -n "$CONFIG_SITE"; then
Christian Heimes32eba612021-03-19 10:29:25 +01002647 # We do not want a PATH search for config.site.
2648 case $CONFIG_SITE in #((
2649 -*) ac_site_file1=./$CONFIG_SITE;;
2650 */*) ac_site_file1=$CONFIG_SITE;;
2651 *) ac_site_file1=./$CONFIG_SITE;;
2652 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653elif test "x$prefix" != xNONE; then
Christian Heimes32eba612021-03-19 10:29:25 +01002654 ac_site_file1=$prefix/share/config.site
2655 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656else
Christian Heimes32eba612021-03-19 10:29:25 +01002657 ac_site_file1=$ac_default_prefix/share/config.site
2658 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659fi
Christian Heimes32eba612021-03-19 10:29:25 +01002660for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661do
Christian Heimes32eba612021-03-19 10:29:25 +01002662 test "x$ac_site_file" = xNONE && continue
2663 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2665$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002667 . "$ac_site_file" \
Christian Heimes32eba612021-03-19 10:29:25 +01002668 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002670as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002671See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672 fi
2673done
2674
2675if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 # Some versions of bash will fail to source /dev/null (special files
2677 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2678 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Christian Heimes32eba612021-03-19 10:29:25 +01002679 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2680$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2683 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 esac
2685 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686else
Christian Heimes32eba612021-03-19 10:29:25 +01002687 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2688$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 >$cache_file
2690fi
2691
2692# Check that the precious variables saved in the cache have kept the same
2693# value.
2694ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2697 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2699 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 case $ac_old_set,$ac_new_set in
2701 set,)
Christian Heimes32eba612021-03-19 10:29:25 +01002702 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2703$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 +00002704 ac_cache_corrupted=: ;;
2705 ,set)
Christian Heimes32eba612021-03-19 10:29:25 +01002706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2707$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 ac_cache_corrupted=: ;;
2709 ,);;
2710 *)
2711 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 # differences in whitespace do not lead to failure.
2713 ac_old_val_w=`echo x $ac_old_val`
2714 ac_new_val_w=`echo x $ac_new_val`
2715 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Christian Heimes32eba612021-03-19 10:29:25 +01002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2717$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002718 ac_cache_corrupted=:
2719 else
Christian Heimes32eba612021-03-19 10:29:25 +01002720 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2721$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 eval $ac_var=\$ac_old_val
2723 fi
Christian Heimes32eba612021-03-19 10:29:25 +01002724 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2725$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2727$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 fi;;
2729 esac
2730 # Pass precious variables to config.status.
2731 if test "$ac_new_set" = set; then
2732 case $ac_new_val in
Christian Heimes32eba612021-03-19 10:29:25 +01002733 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 *) ac_arg=$ac_var=$ac_new_val ;;
2735 esac
2736 case " $ac_configure_args " in
2737 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 esac
2740 fi
2741done
2742if $ac_cache_corrupted; then
Christian Heimes32eba612021-03-19 10:29:25 +01002743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2746$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2747 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002749## -------------------- ##
2750## Main body of script. ##
2751## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752
Guido van Rossum7f43da71994-08-01 12:15:30 +00002753ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002754ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2757ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758
Guido van Rossum627b2d71993-12-24 10:39:16 +00002759
Michael W. Hudson54241132001-12-07 15:38:26 +00002760
Trent Nelson4d4ec652012-10-16 08:51:24 -04002761
Christian Heimesff5be6e2018-01-20 13:19:21 +01002762
2763
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002764if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002765 # If we're building out-of-tree, we need to make sure the following
2766 # resources get picked up before their $srcdir counterparts.
2767 # Objects/ -> typeslots.inc
Victor Stinner94faa072021-03-23 20:47:40 +01002768 # Include/ -> Python.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002769 # Python/ -> importlib.h
2770 # (A side effect of this is that these resources will automatically be
2771 # regenerated when building out-of-tree, regardless of whether or not
2772 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2773 # off.)
2774 BASECPPFLAGS="-IObjects -IInclude -IPython"
2775else
2776 BASECPPFLAGS=""
2777fi
2778
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779
2780
2781
2782
Victor Stinner9ed34a82017-05-02 22:35:58 +02002783if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002784then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002785# Extract the first word of "git", so it can be a program name with args.
2786set dummy git; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01002787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2788$as_echo_n "checking for $ac_word... " >&6; }
2789if ${ac_cv_prog_HAS_GIT+:} false; then :
2790 $as_echo_n "(cached) " >&6
2791else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002792 if test -n "$HAS_GIT"; then
2793 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002794else
2795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2796for as_dir in $PATH
2797do
2798 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01002799 test -z "$as_dir" && as_dir=.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002800 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01002801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002802 ac_cv_prog_HAS_GIT="found"
Christian Heimes32eba612021-03-19 10:29:25 +01002803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804 break 2
2805 fi
2806done
2807 done
2808IFS=$as_save_IFS
2809
Ned Deily5c4b0d02017-03-04 00:19:55 -05002810 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002811fi
2812fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002813HAS_GIT=$ac_cv_prog_HAS_GIT
2814if test -n "$HAS_GIT"; then
Christian Heimes32eba612021-03-19 10:29:25 +01002815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2816$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002817else
Christian Heimes32eba612021-03-19 10:29:25 +01002818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2819$as_echo "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002820fi
2821
2822
2823else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002824HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002825fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002826if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827then
Xiang Zhang4c855572018-08-20 22:36:19 +08002828 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2829 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2830 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002831else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002832 GITVERSION=""
2833 GITTAG=""
2834 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002835fi
2836
2837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002839
2840
Christian Heimes32eba612021-03-19 10:29:25 +01002841ac_aux_dir=
2842for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2843 if test -f "$ac_dir/install-sh"; then
2844 ac_aux_dir=$ac_dir
2845 ac_install_sh="$ac_aux_dir/install-sh -c"
2846 break
2847 elif test -f "$ac_dir/install.sh"; then
2848 ac_aux_dir=$ac_dir
2849 ac_install_sh="$ac_aux_dir/install.sh -c"
2850 break
2851 elif test -f "$ac_dir/shtool"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/shtool install -c"
2854 break
2855 fi
2856done
2857if test -z "$ac_aux_dir"; then
2858 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2859fi
2860
2861# These three variables are undocumented and unsupported,
2862# and are intended to be withdrawn in a future Autoconf release.
2863# They can cause serious problems if a builder's source tree is in a directory
2864# whose full name contains unusual characters.
2865ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2866ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2867ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002868
2869
Christian Heimes32eba612021-03-19 10:29:25 +01002870# Make sure we can run config.sub.
2871$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2872 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002873
Christian Heimes32eba612021-03-19 10:29:25 +01002874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2875$as_echo_n "checking build system type... " >&6; }
2876if ${ac_cv_build+:} false; then :
2877 $as_echo_n "(cached) " >&6
2878else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002879 ac_build_alias=$build_alias
2880test "x$ac_build_alias" = x &&
Christian Heimes32eba612021-03-19 10:29:25 +01002881 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002882test "x$ac_build_alias" = x &&
2883 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Christian Heimes32eba612021-03-19 10:29:25 +01002884ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002886
2887fi
Christian Heimes32eba612021-03-19 10:29:25 +01002888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2889$as_echo "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002890case $ac_cv_build in
2891*-*-*) ;;
2892*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2893esac
2894build=$ac_cv_build
2895ac_save_IFS=$IFS; IFS='-'
2896set x $ac_cv_build
2897shift
2898build_cpu=$1
2899build_vendor=$2
2900shift; shift
2901# Remember, the first character of IFS is used to create $*,
2902# except with old shells:
2903build_os=$*
2904IFS=$ac_save_IFS
2905case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2906
2907
Christian Heimes32eba612021-03-19 10:29:25 +01002908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2909$as_echo_n "checking host system type... " >&6; }
2910if ${ac_cv_host+:} false; then :
2911 $as_echo_n "(cached) " >&6
2912else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002913 if test "x$host_alias" = x; then
2914 ac_cv_host=$ac_cv_build
2915else
Christian Heimes32eba612021-03-19 10:29:25 +01002916 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2917 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002918fi
2919
2920fi
Christian Heimes32eba612021-03-19 10:29:25 +01002921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2922$as_echo "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002923case $ac_cv_host in
2924*-*-*) ;;
2925*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2926esac
2927host=$ac_cv_host
2928ac_save_IFS=$IFS; IFS='-'
2929set x $ac_cv_host
2930shift
2931host_cpu=$1
2932host_vendor=$2
2933shift; shift
2934# Remember, the first character of IFS is used to create $*,
2935# except with old shells:
2936host_os=$*
2937IFS=$ac_save_IFS
2938case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2939
2940
2941
doko@python.orga10e4a92013-01-25 18:45:12 +01002942
2943
Ned Deilyfcbc2462014-08-22 13:32:49 -07002944# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2945rm -f pybuilddir.txt
2946
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002947for ac_prog in python$PACKAGE_VERSION python3 python
2948do
2949 # Extract the first word of "$ac_prog", so it can be a program name with args.
2950set dummy $ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01002951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2952$as_echo_n "checking for $ac_word... " >&6; }
2953if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2954 $as_echo_n "(cached) " >&6
2955else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002956 if test -n "$PYTHON_FOR_REGEN"; then
2957 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002958else
2959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2960for as_dir in $PATH
2961do
2962 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01002963 test -z "$as_dir" && as_dir=.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002964 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01002965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002966 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01002967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002968 break 2
2969 fi
2970done
2971 done
2972IFS=$as_save_IFS
2973
2974fi
2975fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002976PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2977if test -n "$PYTHON_FOR_REGEN"; then
Christian Heimes32eba612021-03-19 10:29:25 +01002978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2979$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002980else
Christian Heimes32eba612021-03-19 10:29:25 +01002981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2982$as_echo "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002983fi
2984
2985
Victor Stinnera5c62a82017-05-03 18:21:48 +02002986 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002987done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002988test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002989
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002990
2991
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002992if test "$cross_compiling" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01002993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2994$as_echo_n "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002995 if test -z "$PYTHON_FOR_BUILD"; then
2996 for interp in python$PACKAGE_VERSION python3 python; do
2997 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002998 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 +02002999 break
3000 fi
3001 interp=
3002 done
3003 if test x$interp = x; then
3004 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3005 fi
Christian Heimes32eba612021-03-19 10:29:25 +01003006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3007$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003008 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 +02003009 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003010elif test "$cross_compiling" = maybe; then
3011 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003012else
3013 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3014fi
3015
3016
Martin v. Löwis11437992002-04-12 09:54:03 +00003017
Benjamin Petersond23f8222009-04-05 19:13:16 +00003018if test "$prefix" != "/"; then
3019 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3020fi
3021
3022
Martin v. Löwis11437992002-04-12 09:54:03 +00003023
3024
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003025# We don't use PACKAGE_ variables, and they cause conflicts
3026# with other autoconf-based packages that include Python.h
3027grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3028rm confdefs.h
3029mv confdefs.h.new confdefs.h
3030
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003031
Pablo Galindod4fe0982020-05-19 03:33:01 +01003032VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003033
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003034# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003035
3036SOVERSION=1.0
3037
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003038# The later defininition of _XOPEN_SOURCE disables certain features
3039# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3040
Christian Heimes32eba612021-03-19 10:29:25 +01003041$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003042
3043
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3046# them.
3047
Christian Heimes32eba612021-03-19 10:29:25 +01003048$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003049
3050
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003051# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3052# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3053# them.
3054
Christian Heimes32eba612021-03-19 10:29:25 +01003055$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003056
3057
Martin v. Löwisd6320502004-08-12 13:45:08 +00003058# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003059# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3060# them.
3061
Christian Heimes32eba612021-03-19 10:29:25 +01003062$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063
3064
3065
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003066define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003067
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003068# Arguments passed to configure.
3069
3070CONFIG_ARGS="$ac_configure_args"
3071
Christian Heimes32eba612021-03-19 10:29:25 +01003072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3073$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074# Check whether --enable-universalsdk was given.
Christian Heimes32eba612021-03-19 10:29:25 +01003075if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077 case $enableval in
3078 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003079 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003080 # information
3081 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003082 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003084 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3085 if test ! -d "${enableval}"
3086 then
3087 enableval=/
3088 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003089 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090 ;;
3091 esac
3092 case $enableval in
3093 no)
3094 UNIVERSALSDK=
3095 enable_universalsdk=
3096 ;;
3097 *)
3098 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003099 if test ! -d "${UNIVERSALSDK}"
3100 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003101 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 ;;
3104 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003105
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003106
Christian Heimes32eba612021-03-19 10:29:25 +01003107else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003108
3109 UNIVERSALSDK=
3110 enable_universalsdk=
3111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003113
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003114if test -n "${UNIVERSALSDK}"
3115then
Christian Heimes32eba612021-03-19 10:29:25 +01003116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3117$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003118else
Christian Heimes32eba612021-03-19 10:29:25 +01003119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3120$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003121fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003124
Ned Deily87adb6e2013-10-18 21:09:56 -07003125ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003126
Ned Deilycbfb9a52012-06-23 16:02:19 -07003127# For backward compatibility reasons we prefer to select '32-bit' if available,
3128# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003129UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003130if test "`uname -s`" = "Darwin"
3131then
3132 if test -n "${UNIVERSALSDK}"
3133 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003134 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003135 then
3136 UNIVERSAL_ARCHS="intel"
3137 fi
3138 fi
3139fi
3140
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003141
Christian Heimes32eba612021-03-19 10:29:25 +01003142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3143$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
3145# Check whether --with-universal-archs was given.
Christian Heimes32eba612021-03-19 10:29:25 +01003146if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003147 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003148 UNIVERSAL_ARCHS="$withval"
3149
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150fi
3151
Ned Deily87adb6e2013-10-18 21:09:56 -07003152if test -n "${UNIVERSALSDK}"
3153then
Christian Heimes32eba612021-03-19 10:29:25 +01003154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3155$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003156else
Christian Heimes32eba612021-03-19 10:29:25 +01003157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3158$as_echo "no" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003159fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003160
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003161
3162# Check whether --with-framework-name was given.
Christian Heimes32eba612021-03-19 10:29:25 +01003163if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003164 withval=$with_framework_name;
3165 PYTHONFRAMEWORK=${withval}
3166 PYTHONFRAMEWORKDIR=${withval}.framework
3167 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3168
Christian Heimes32eba612021-03-19 10:29:25 +01003169else
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003170
3171 PYTHONFRAMEWORK=Python
3172 PYTHONFRAMEWORKDIR=Python.framework
3173 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3174
3175fi
3176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177# Check whether --enable-framework was given.
Christian Heimes32eba612021-03-19 10:29:25 +01003178if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003180 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003181 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003182 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003183 esac
3184 case $enableval in
3185 no)
3186 PYTHONFRAMEWORK=
3187 PYTHONFRAMEWORKDIR=no-framework
3188 PYTHONFRAMEWORKPREFIX=
3189 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 FRAMEWORKINSTALLFIRST=
3191 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003192 FRAMEWORKALTINSTALLFIRST=
3193 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003194 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003195 if test "x${prefix}" = "xNONE"; then
3196 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3197 else
3198 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3199 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003200 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003201 ;;
3202 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003203 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003204 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003206 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003207 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3208 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003209 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003210 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003212 if test "x${prefix}" = "xNONE" ; then
3213 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003214
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 else
3216 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3217 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003218
3219 case "${enableval}" in
3220 /System*)
3221 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3222 if test "${prefix}" = "NONE" ; then
3223 # See below
3224 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3225 fi
3226 ;;
3227
3228 /Library*)
3229 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3230 ;;
3231
3232 */Library/Frameworks)
3233 MDIR="`dirname "${enableval}"`"
3234 MDIR="`dirname "${MDIR}"`"
3235 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3236
3237 if test "${prefix}" = "NONE"; then
3238 # User hasn't specified the
3239 # --prefix option, but wants to install
3240 # the framework in a non-default location,
3241 # ensure that the compatibility links get
3242 # installed relative to that prefix as well
3243 # instead of in /usr/local.
3244 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3245 fi
3246 ;;
3247
3248 *)
3249 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3250 ;;
3251 esac
3252
Jack Jansen127e56e2001-09-11 14:41:54 +00003253 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003255 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003256 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003260
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003261 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3262
3263 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3264
Jack Jansene578a632001-08-15 01:27:14 +00003265 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003266
Christian Heimes32eba612021-03-19 10:29:25 +01003267else
Martin v. Löwis11437992002-04-12 09:54:03 +00003268
Jack Jansene578a632001-08-15 01:27:14 +00003269 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003270 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003271 PYTHONFRAMEWORKPREFIX=
3272 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273 FRAMEWORKINSTALLFIRST=
3274 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003275 FRAMEWORKALTINSTALLFIRST=
3276 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003277 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003278 if test "x${prefix}" = "xNONE" ; then
3279 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3280 else
3281 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3282 fi
Jack Jansene578a632001-08-15 01:27:14 +00003283 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286fi
3287
Thomas Wouters477c8d52006-05-27 19:21:47 +00003288
3289
Michael W. Hudson54241132001-12-07 15:38:26 +00003290
3291
3292
3293
Jack Jansene578a632001-08-15 01:27:14 +00003294
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003295
3296
3297
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003298
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003299
Ned Deilyb8f944f2013-11-21 22:42:25 -08003300
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003301
Christian Heimes32eba612021-03-19 10:29:25 +01003302cat >>confdefs.h <<_ACEOF
3303#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
3304_ACEOF
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003305
3306
Jack Jansene578a632001-08-15 01:27:14 +00003307##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003308## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003309## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003310##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003311# Set name for machine-dependent library files
3312
Christian Heimes32eba612021-03-19 10:29:25 +01003313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3314$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003315if test -z "$MACHDEP"
3316then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 # avoid using uname for cross builds
3318 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003319 # ac_sys_system and ac_sys_release are used for setting
3320 # a lot of different things including 'define_xopen_source'
3321 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003323 *-*-linux-android*)
3324 ac_sys_system=Linux-android
3325 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003326 *-*-linux*)
3327 ac_sys_system=Linux
3328 ;;
3329 *-*-cygwin*)
3330 ac_sys_system=Cygwin
3331 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003332 *-*-vxworks*)
3333 ac_sys_system=VxWorks
3334 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003335 *)
3336 # for now, limit cross builds to known configurations
3337 MACHDEP="unknown"
3338 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3339 esac
3340 ac_sys_release=
3341 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003342 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003343 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003344 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003345 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003346 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003347 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003349 fi
3350 ac_md_system=`echo $ac_sys_system |
3351 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3352 ac_md_release=`echo $ac_sys_release |
3353 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3354 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003355
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003356 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003357 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003358 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003359 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003360 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003361 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003362 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003363fi
Christian Heimes32eba612021-03-19 10:29:25 +01003364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3365$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003366
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003367
3368if test "$cross_compiling" = yes; then
3369 case "$host" in
3370 *-*-linux*)
3371 case "$host_cpu" in
3372 arm*)
3373 _host_cpu=arm
3374 ;;
3375 *)
3376 _host_cpu=$host_cpu
3377 esac
3378 ;;
3379 *-*-cygwin*)
3380 _host_cpu=
3381 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003382 *-*-vxworks*)
3383 _host_cpu=$host_cpu
3384 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003385 *)
3386 # for now, limit cross builds to known configurations
3387 MACHDEP="unknown"
3388 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3389 esac
3390 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3391fi
3392
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3394# disable features if it is defined, without any means to access these
3395# features as extensions. For these systems, we skip the definition of
3396# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3397# some feature, make sure there is no alternative way to access this
3398# feature. Also, when using wildcards, make sure you have verified the
3399# need for not defining _XOPEN_SOURCE on all systems matching the
3400# wildcard, and that the wildcard does not include future systems
3401# (which may remove their limitations).
3402case $ac_sys_system/$ac_sys_release in
3403 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3404 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003405 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003406 # In addition, Stefan Krah confirms that issue #1244610 exists through
3407 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003408 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003409 define_xopen_source=no
3410 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3411 # also defined. This can be overridden by defining _BSD_SOURCE
3412 # As this has a different meaning on Linux, only define it on OpenBSD
3413
Christian Heimes32eba612021-03-19 10:29:25 +01003414$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003415
3416 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003417 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003418 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3419 # also defined. This can be overridden by defining _BSD_SOURCE
3420 # As this has a different meaning on Linux, only define it on OpenBSD
3421
Christian Heimes32eba612021-03-19 10:29:25 +01003422$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003423
3424 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003425 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3426 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3427 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003428 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 +00003429 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003430 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3431 # request to enable features supported by the standard as a request
3432 # to disable features not supported by the standard. The best way
3433 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3434 # entirely and define __EXTENSIONS__ instead.
3435 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003436 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003437 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3438 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003439 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003440 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003441 define_xopen_source=no;;
3442 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003443 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003444 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003445 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003446 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3447 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3448 # identifies itself as Darwin/7.*
3449 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3450 # disables platform specific features beyond repair.
3451 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3452 # has no effect, don't bother defining them
3453 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003454 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003455 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003456 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003457 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3458 # defining NI_NUMERICHOST.
3459 QNX/6.3.2)
3460 define_xopen_source=no
3461 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003462 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3463 # in network headers still using system V types.
3464 VxWorks/*)
3465 define_xopen_source=no
3466 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003467
Ian Nortona9edf442020-02-14 03:09:11 +00003468 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3469 # chroot() and other functions
3470 hp*|HP*)
3471 define_xopen_source=no
3472 ;;
3473
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003474esac
3475
3476if test $define_xopen_source = yes
3477then
Victor Stinner14d098d2011-09-07 22:29:43 +02003478 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003479
Christian Heimes32eba612021-03-19 10:29:25 +01003480$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003481
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003482
3483 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3484 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3485 # several APIs are not declared. Since this is also needed in some
3486 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003487
Christian Heimes32eba612021-03-19 10:29:25 +01003488$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003489
3490
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003491
Christian Heimes32eba612021-03-19 10:29:25 +01003492$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003493
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003494fi
3495
Christian Heimes647cd872013-12-07 23:39:33 +01003496# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3497case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003498 hp*|HP*)
3499 define_stdc_a1=yes;;
3500 *)
3501 define_stdc_a1=no;;
3502esac
3503
3504if test $define_stdc_a1 = yes
3505then
Christian Heimes647cd872013-12-07 23:39:33 +01003506
Christian Heimes32eba612021-03-19 10:29:25 +01003507$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
Christian Heimes647cd872013-12-07 23:39:33 +01003508
Christian Heimesb02bcae2013-12-08 15:21:08 +01003509fi
Christian Heimes647cd872013-12-07 23:39:33 +01003510
Jack Jansen6b08a402004-06-03 12:41:45 +00003511# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3512# it may influence the way we can build extensions, so distutils
3513# needs to check it
3514
Thomas Wouters477c8d52006-05-27 19:21:47 +00003515
Jack Jansen6b08a402004-06-03 12:41:45 +00003516CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003517EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003518
Guido van Rossum627b2d71993-12-24 10:39:16 +00003519# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003520
3521# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3522# for debug/optimization stuff. BASECFLAGS is for flags that are required
3523# just to get things to compile and link. Users are free to override OPT
3524# when running configure or make. The build should not break if they do.
3525# BASECFLAGS should generally not be messed with, however.
3526
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527# If the user switches compilers, we can't believe the cache
3528if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3529then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003530 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003531(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003532fi
3533
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003534# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3535# when the compiler supports them, but we don't always want -O2, and
3536# we set -g later.
3537if test -z "$CFLAGS"; then
3538 CFLAGS=
3539fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540
3541if test "$ac_sys_system" = "Darwin"
3542then
3543 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003544 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003545 # information
3546 if test -z "${CC}"
3547 then
3548 found_gcc=
3549 found_clang=
3550 as_save_IFS=$IFS; IFS=:
3551 for as_dir in $PATH
3552 do
3553 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003554 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003555 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003556 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003557 fi
3558 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003559 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003560 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003561 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003562 fi
3563 fi
3564 done
3565 IFS=$as_save_IFS
3566
3567 if test -n "$found_gcc" -a -n "$found_clang"
3568 then
3569 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3570 then
Christian Heimes32eba612021-03-19 10:29:25 +01003571 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3572$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003573 CC="$found_clang"
3574 CXX="$found_clang++"
3575 fi
3576
3577
3578 elif test -z "$found_gcc" -a -n "$found_clang"
3579 then
Christian Heimes32eba612021-03-19 10:29:25 +01003580 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3581$as_echo "$as_me: No GCC found, use CLANG" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003582 CC="$found_clang"
3583 CXX="$found_clang++"
3584
3585 elif test -z "$found_gcc" -a -z "$found_clang"
3586 then
3587 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3588 if test -n "${found_clang}"
3589 then
Christian Heimes32eba612021-03-19 10:29:25 +01003590 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3591$as_echo "$as_me: Using clang from Xcode.app" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003592 CC="${found_clang}"
3593 CXX="`/usr/bin/xcrun -find clang++`"
3594
3595 # else: use default behaviour
3596 fi
3597 fi
3598 fi
3599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003600ac_ext=c
3601ac_cpp='$CPP $CPPFLAGS'
3602ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3603ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3604ac_compiler_gnu=$ac_cv_c_compiler_gnu
3605if test -n "$ac_tool_prefix"; then
3606 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3607set dummy ${ac_tool_prefix}gcc; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3609$as_echo_n "checking for $ac_word... " >&6; }
3610if ${ac_cv_prog_CC+:} false; then :
3611 $as_echo_n "(cached) " >&6
3612else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003613 if test -n "$CC"; then
3614 ac_cv_prog_CC="$CC" # Let the user override the test.
3615else
Martin v. Löwis11437992002-04-12 09:54:03 +00003616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617for as_dir in $PATH
3618do
3619 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01003620 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01003622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Christian Heimes32eba612021-03-19 10:29:25 +01003624 $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 +00003625 break 2
3626 fi
3627done
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003630
Jack Jansendd19cf82001-12-06 22:36:17 +00003631fi
3632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003633CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003634if test -n "$CC"; then
Christian Heimes32eba612021-03-19 10:29:25 +01003635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3636$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003637else
Christian Heimes32eba612021-03-19 10:29:25 +01003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3639$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640fi
3641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644if test -z "$ac_cv_prog_CC"; then
3645 ac_ct_CC=$CC
3646 # Extract the first word of "gcc", so it can be a program name with args.
3647set dummy gcc; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01003648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
3650if ${ac_cv_prog_ac_ct_CC+:} false; then :
3651 $as_echo_n "(cached) " >&6
3652else
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 if test -n "$ac_ct_CC"; then
3654 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3655else
3656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01003660 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01003662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 ac_cv_prog_ac_ct_CC="gcc"
Christian Heimes32eba612021-03-19 10:29:25 +01003664 $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 +00003665 break 2
3666 fi
3667done
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003670
3671fi
3672fi
3673ac_ct_CC=$ac_cv_prog_ac_ct_CC
3674if test -n "$ac_ct_CC"; then
Christian Heimes32eba612021-03-19 10:29:25 +01003675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3676$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
Christian Heimes32eba612021-03-19 10:29:25 +01003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680fi
3681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 if test "x$ac_ct_CC" = x; then
3683 CC=""
3684 else
3685 case $cross_compiling:$ac_tool_warned in
3686yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01003687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689ac_tool_warned=yes ;;
3690esac
3691 CC=$ac_ct_CC
3692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693else
3694 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003695fi
3696
Jack Jansendd19cf82001-12-06 22:36:17 +00003697if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698 if test -n "$ac_tool_prefix"; then
3699 # 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 +00003700set dummy ${ac_tool_prefix}cc; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01003701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3702$as_echo_n "checking for $ac_word... " >&6; }
3703if ${ac_cv_prog_CC+:} false; then :
3704 $as_echo_n "(cached) " >&6
3705else
Jack Jansendd19cf82001-12-06 22:36:17 +00003706 if test -n "$CC"; then
3707 ac_cv_prog_CC="$CC" # Let the user override the test.
3708else
Martin v. Löwis11437992002-04-12 09:54:03 +00003709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710for as_dir in $PATH
3711do
3712 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01003713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01003715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 ac_cv_prog_CC="${ac_tool_prefix}cc"
Christian Heimes32eba612021-03-19 10:29:25 +01003717 $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 +00003718 break 2
3719 fi
3720done
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003723
3724fi
3725fi
3726CC=$ac_cv_prog_CC
3727if test -n "$CC"; then
Christian Heimes32eba612021-03-19 10:29:25 +01003728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3729$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003730else
Christian Heimes32eba612021-03-19 10:29:25 +01003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3732$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733fi
3734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738if test -z "$CC"; then
3739 # Extract the first word of "cc", so it can be a program name with args.
3740set dummy cc; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01003741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742$as_echo_n "checking for $ac_word... " >&6; }
3743if ${ac_cv_prog_CC+:} false; then :
3744 $as_echo_n "(cached) " >&6
3745else
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 if test -n "$CC"; then
3747 ac_cv_prog_CC="$CC" # Let the user override the test.
3748else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH
3752do
3753 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01003754 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01003756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3757 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 ac_prog_rejected=yes
3759 continue
3760 fi
3761 ac_cv_prog_CC="cc"
Christian Heimes32eba612021-03-19 10:29:25 +01003762 $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 +00003763 break 2
3764 fi
3765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769if test $ac_prog_rejected = yes; then
3770 # We found a bogon in the path, so make sure we never use it.
3771 set dummy $ac_cv_prog_CC
3772 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 # We chose a different compiler from the bogus one.
3775 # However, it has the same basename, so the bogon will be chosen
3776 # first if we set CC to just the basename; use the full file name.
3777 shift
Christian Heimes32eba612021-03-19 10:29:25 +01003778 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779 fi
3780fi
3781fi
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784if test -n "$CC"; then
Christian Heimes32eba612021-03-19 10:29:25 +01003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3786$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787else
Christian Heimes32eba612021-03-19 10:29:25 +01003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3789$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790fi
3791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
3794if test -z "$CC"; then
3795 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 do
3798 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3799set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
3802if ${ac_cv_prog_CC+:} false; then :
3803 $as_echo_n "(cached) " >&6
3804else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003805 if test -n "$CC"; then
3806 ac_cv_prog_CC="$CC" # Let the user override the test.
3807else
Martin v. Löwis11437992002-04-12 09:54:03 +00003808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01003812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01003814 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_CC="$ac_tool_prefix$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01003816 $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
Guido van Rossumf78abae1997-01-21 22:02:36 +00003818 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823fi
3824fi
3825CC=$ac_cv_prog_CC
3826if test -n "$CC"; then
Christian Heimes32eba612021-03-19 10:29:25 +01003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3828$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Christian Heimes32eba612021-03-19 10:29:25 +01003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003832fi
3833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$CC" && break
3836 done
3837fi
3838if test -z "$CC"; then
3839 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003841do
3842 # Extract the first word of "$ac_prog", so it can be a program name with args.
3843set dummy $ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01003844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3845$as_echo_n "checking for $ac_word... " >&6; }
3846if ${ac_cv_prog_ac_ct_CC+:} false; then :
3847 $as_echo_n "(cached) " >&6
3848else
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 if test -n "$ac_ct_CC"; then
3850 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3851else
3852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853for as_dir in $PATH
3854do
3855 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01003856 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01003858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 ac_cv_prog_ac_ct_CC="$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01003860 $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 +00003861 break 2
3862 fi
3863done
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003866
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868fi
3869ac_ct_CC=$ac_cv_prog_ac_ct_CC
3870if test -n "$ac_ct_CC"; then
Christian Heimes32eba612021-03-19 10:29:25 +01003871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3872$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003873else
Christian Heimes32eba612021-03-19 10:29:25 +01003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3875$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878
Martin v. Löwis11437992002-04-12 09:54:03 +00003879 test -n "$ac_ct_CC" && break
3880done
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882 if test "x$ac_ct_CC" = x; then
3883 CC=""
3884 else
3885 case $cross_compiling:$ac_tool_warned in
3886yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01003887{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3888$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889ac_tool_warned=yes ;;
3890esac
3891 CC=$ac_ct_CC
3892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003893fi
3894
3895fi
3896
3897
Christian Heimes32eba612021-03-19 10:29:25 +01003898test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003900as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003901See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003902
3903# Provide some information about the compiler.
Christian Heimes32eba612021-03-19 10:29:25 +01003904$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003905set X $ac_compile
3906ac_compiler=$2
Christian Heimes32eba612021-03-19 10:29:25 +01003907for ac_option in --version -v -V -qversion; do
Matthias Kloseb9621712010-04-24 17:59:49 +00003908 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909case "(($ac_try" in
3910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3911 *) ac_try_echo=$ac_try;;
3912esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01003914$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 if test -s conftest.err; then
3918 sed '10a\
3919... rest of stderr output deleted ...
3920 10q' conftest.err >conftest.er1
3921 cat conftest.er1 >&5
3922 fi
3923 rm -f conftest.er1 conftest.err
Christian Heimes32eba612021-03-19 10:29:25 +01003924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 test $ac_status = 0; }
3926done
Martin v. Löwis11437992002-04-12 09:54:03 +00003927
Matthias Kloseb9621712010-04-24 17:59:49 +00003928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003930
Martin v. Löwis11437992002-04-12 09:54:03 +00003931int
Christian Heimes32eba612021-03-19 10:29:25 +01003932main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00003933{
3934
3935 ;
3936 return 0;
3937}
3938_ACEOF
3939ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003940ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003941# Try to create an executable without -o first, disregard a.out.
3942# It will help us diagnose broken compilers, and finding out an intuition
3943# of exeext.
Christian Heimes32eba612021-03-19 10:29:25 +01003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3945$as_echo_n "checking whether the C compiler works... " >&6; }
3946ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Matthias Kloseb9621712010-04-24 17:59:49 +00003947
3948# The possible output files:
3949ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951ac_rmfiles=
3952for ac_file in $ac_files
3953do
3954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3957 esac
3958done
3959rm -f $ac_rmfiles
3960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01003967$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 ac_status=$?
Christian Heimes32eba612021-03-19 10:29:25 +01003970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3973# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3974# in a Makefile. We should not override ac_cv_exeext if it was cached,
3975# so that the user can short-circuit this test for compilers unknown to
3976# Autoconf.
3977for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003978do
3979 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982 ;;
3983 [ab].out )
3984 # We found the default executable, but exeext='' is most
3985 # certainly right.
3986 break;;
3987 *.* )
Christian Heimes32eba612021-03-19 10:29:25 +01003988 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 then :; else
3990 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3991 fi
3992 # We set ac_cv_exeext here because the later test for it is not
3993 # safe: cross compilers may not add the suffix if given an `-o'
3994 # argument, so we may need to know it at that point already.
3995 # Even if this section looks crufty: it has the advantage of
3996 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997 break;;
3998 * )
3999 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 esac
4001done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002test "$ac_cv_exeext" = no && ac_cv_exeext=
4003
Christian Heimes32eba612021-03-19 10:29:25 +01004004else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005 ac_file=''
4006fi
Christian Heimes32eba612021-03-19 10:29:25 +01004007if test -z "$ac_file"; then :
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004011sed 's/^/| /' conftest.$ac_ext >&5
4012
Christian Heimes32eba612021-03-19 10:29:25 +01004013{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004015as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004016See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes32eba612021-03-19 10:29:25 +01004017else
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4019$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004020fi
Christian Heimes32eba612021-03-19 10:29:25 +01004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4022$as_echo_n "checking for C compiler default output file name... " >&6; }
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4024$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026
Matthias Kloseb9621712010-04-24 17:59:49 +00004027rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_clean_files=$ac_clean_files_save
Christian Heimes32eba612021-03-19 10:29:25 +01004029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4030$as_echo_n "checking for suffix of executables... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004031if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01004037$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004039 ac_status=$?
Christian Heimes32eba612021-03-19 10:29:25 +01004040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4043# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4044# work properly (i.e., refer to `conftest.exe'), while it won't with
4045# `rm'.
4046for ac_file in conftest.exe conftest conftest.*; do
4047 test -f "$ac_file" || continue
4048 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4051 break;;
4052 * ) break;;
4053 esac
4054done
Christian Heimes32eba612021-03-19 10:29:25 +01004055else
4056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004058as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004059See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004061rm -f conftest conftest$ac_cv_exeext
Christian Heimes32eba612021-03-19 10:29:25 +01004062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4063$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064
4065rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004066EXEEXT=$ac_cv_exeext
4067ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4069/* end confdefs.h. */
4070#include <stdio.h>
4071int
Christian Heimes32eba612021-03-19 10:29:25 +01004072main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00004073{
4074FILE *f = fopen ("conftest.out", "w");
4075 return ferror (f) || fclose (f) != 0;
4076
4077 ;
4078 return 0;
4079}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004081ac_clean_files="$ac_clean_files conftest.out"
4082# Check that the compiler produces executables we can run. If not, either
4083# the compiler is broken, or we cross compile.
Christian Heimes32eba612021-03-19 10:29:25 +01004084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4085$as_echo_n "checking whether we are cross compiling... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004086if test "$cross_compiling" != yes; then
4087 { { ac_try="$ac_link"
4088case "(($ac_try" in
4089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090 *) ac_try_echo=$ac_try;;
4091esac
4092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01004093$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 (eval "$ac_link") 2>&5
4095 ac_status=$?
Christian Heimes32eba612021-03-19 10:29:25 +01004096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 test $ac_status = 0; }
4098 if { ac_try='./conftest$ac_cv_exeext'
4099 { { case "(($ac_try" in
4100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101 *) ac_try_echo=$ac_try;;
4102esac
4103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01004104$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 (eval "$ac_try") 2>&5
4106 ac_status=$?
Christian Heimes32eba612021-03-19 10:29:25 +01004107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 test $ac_status = 0; }; }; then
4109 cross_compiling=no
4110 else
4111 if test "$cross_compiling" = maybe; then
4112 cross_compiling=yes
4113 else
Christian Heimes32eba612021-03-19 10:29:25 +01004114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4116as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004117If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004118See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 fi
4120 fi
4121fi
Christian Heimes32eba612021-03-19 10:29:25 +01004122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4123$as_echo "$cross_compiling" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004124
4125rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4126ac_clean_files=$ac_clean_files_save
Christian Heimes32eba612021-03-19 10:29:25 +01004127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4128$as_echo_n "checking for suffix of object files... " >&6; }
4129if ${ac_cv_objext+:} false; then :
4130 $as_echo_n "(cached) " >&6
4131else
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133/* end confdefs.h. */
4134
4135int
Christian Heimes32eba612021-03-19 10:29:25 +01004136main ()
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004137{
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004144if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145case "(($ac_try" in
4146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4147 *) ac_try_echo=$ac_try;;
4148esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes32eba612021-03-19 10:29:25 +01004150$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 ac_status=$?
Christian Heimes32eba612021-03-19 10:29:25 +01004153 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4154 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 for ac_file in conftest.o conftest.obj conftest.*; do
4156 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4160 break;;
4161 esac
4162done
Christian Heimes32eba612021-03-19 10:29:25 +01004163else
4164 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004165sed 's/^/| /' conftest.$ac_ext >&5
4166
Christian Heimes32eba612021-03-19 10:29:25 +01004167{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004169as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004170See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004172rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Christian Heimes32eba612021-03-19 10:29:25 +01004174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4175$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004176OBJEXT=$ac_cv_objext
4177ac_objext=$OBJEXT
Christian Heimes32eba612021-03-19 10:29:25 +01004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4179$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4180if ${ac_cv_c_compiler_gnu+:} false; then :
4181 $as_echo_n "(cached) " >&6
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004185
Martin v. Löwis11437992002-04-12 09:54:03 +00004186int
Christian Heimes32eba612021-03-19 10:29:25 +01004187main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004188{
4189#ifndef __GNUC__
4190 choke me
4191#endif
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 ac_compiler_gnu=yes
Christian Heimes32eba612021-03-19 10:29:25 +01004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004201fi
Christian Heimes32eba612021-03-19 10:29:25 +01004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_cv_c_compiler_gnu=$ac_compiler_gnu
4204
4205fi
Christian Heimes32eba612021-03-19 10:29:25 +01004206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4207$as_echo "$ac_cv_c_compiler_gnu" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004208if test $ac_compiler_gnu = yes; then
4209 GCC=yes
4210else
4211 GCC=
4212fi
Christian Heimes32eba612021-03-19 10:29:25 +01004213ac_test_CFLAGS=${CFLAGS+set}
Martin v. Löwis11437992002-04-12 09:54:03 +00004214ac_save_CFLAGS=$CFLAGS
Christian Heimes32eba612021-03-19 10:29:25 +01004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4216$as_echo_n "checking whether $CC accepts -g... " >&6; }
4217if ${ac_cv_prog_cc_g+:} false; then :
4218 $as_echo_n "(cached) " >&6
4219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 ac_save_c_werror_flag=$ac_c_werror_flag
4221 ac_c_werror_flag=yes
4222 ac_cv_prog_cc_g=no
4223 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004226
Martin v. Löwis11437992002-04-12 09:54:03 +00004227int
Christian Heimes32eba612021-03-19 10:29:25 +01004228main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 ac_cv_prog_cc_g=yes
Christian Heimes32eba612021-03-19 10:29:25 +01004237else
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 CFLAGS=""
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240/* end confdefs.h. */
4241
4242int
Christian Heimes32eba612021-03-19 10:29:25 +01004243main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004250if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251
Christian Heimes32eba612021-03-19 10:29:25 +01004252else
Matthias Kloseb9621712010-04-24 17:59:49 +00004253 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256/* end confdefs.h. */
4257
4258int
Christian Heimes32eba612021-03-19 10:29:25 +01004259main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260{
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004266if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268fi
Christian Heimes32eba612021-03-19 10:29:25 +01004269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Christian Heimes32eba612021-03-19 10:29:25 +01004271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272fi
Christian Heimes32eba612021-03-19 10:29:25 +01004273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 ac_c_werror_flag=$ac_save_c_werror_flag
4275fi
Christian Heimes32eba612021-03-19 10:29:25 +01004276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4277$as_echo "$ac_cv_prog_cc_g" >&6; }
4278if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280elif test $ac_cv_prog_cc_g = yes; then
4281 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004282 CFLAGS="-g -O2"
4283 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285 fi
4286else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 if test "$GCC" = yes; then
4288 CFLAGS="-O2"
4289 else
4290 CFLAGS=
4291 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292fi
Christian Heimes32eba612021-03-19 10:29:25 +01004293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4294$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4295if ${ac_cv_prog_cc_c89+:} false; then :
4296 $as_echo_n "(cached) " >&6
4297else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004299ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004301/* end confdefs.h. */
Christian Heimes32eba612021-03-19 10:29:25 +01004302#include <stdarg.h>
4303#include <stdio.h>
4304struct stat;
4305/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4306struct buf { int x; };
4307FILE * (*rcsopen) (struct buf *, struct stat *, int);
4308static char *e (p, i)
4309 char **p;
4310 int i;
4311{
4312 return p[i];
4313}
4314static char *f (char * (*g) (char **, int), char **p, ...)
4315{
4316 char *s;
4317 va_list v;
4318 va_start (v,p);
4319 s = g (p, va_arg (v,int));
4320 va_end (v);
4321 return s;
4322}
4323
4324/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4325 function prototypes and stuff, but not '\xHH' hex character constants.
4326 These don't provoke an error unfortunately, instead are silently treated
4327 as 'x'. The following induces an error, until -std is added to get
4328 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4329 array size at least. It's necessary to write '\x00'==0 to get something
4330 that's true only with -std. */
4331int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4332
4333/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4334 inside strings and character constants. */
4335#define FOO(x) 'x'
4336int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4337
4338int test (int i, double x);
4339struct s1 {int (*f) (int a);};
4340struct s2 {int (*f) (double a);};
4341int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4342int argc;
4343char **argv;
4344int
4345main ()
4346{
4347return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4348 ;
4349 return 0;
4350}
Skip Montanaro6dead952003-09-25 14:50:04 +00004351_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004352for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4353 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004354do
4355 CC="$ac_save_CC $ac_arg"
Christian Heimes32eba612021-03-19 10:29:25 +01004356 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004358fi
Christian Heimes32eba612021-03-19 10:29:25 +01004359rm -f core conftest.err conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004361done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004363CC=$ac_save_CC
Skip Montanaro6dead952003-09-25 14:50:04 +00004364
Pablo Galindocc128882021-03-01 16:47:53 +00004365fi
Christian Heimes32eba612021-03-19 10:29:25 +01004366# AC_CACHE_VAL
4367case "x$ac_cv_prog_cc_c89" in
4368 x)
4369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4370$as_echo "none needed" >&6; } ;;
4371 xno)
4372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4373$as_echo "unsupported" >&6; } ;;
4374 *)
4375 CC="$CC $ac_cv_prog_cc_c89"
4376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4377$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4378esac
4379if test "x$ac_cv_prog_cc_c89" != xno; then :
4380
Matthias Kloseb9621712010-04-24 17:59:49 +00004381fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004382
Martin v. Löwis11437992002-04-12 09:54:03 +00004383ac_ext=c
4384ac_cpp='$CPP $CPPFLAGS'
4385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4387ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004389ac_ext=c
4390ac_cpp='$CPP $CPPFLAGS'
4391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4393ac_compiler_gnu=$ac_cv_c_compiler_gnu
Christian Heimes32eba612021-03-19 10:29:25 +01004394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4395$as_echo_n "checking how to run the C preprocessor... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004396# On Suns, sometimes $CPP names a directory.
4397if test -n "$CPP" && test -d "$CPP"; then
4398 CPP=
4399fi
4400if test -z "$CPP"; then
Christian Heimes32eba612021-03-19 10:29:25 +01004401 if ${ac_cv_prog_CPP+:} false; then :
4402 $as_echo_n "(cached) " >&6
4403else
4404 # Double quotes because CPP needs to be expanded
4405 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004406 do
4407 ac_preproc_ok=false
4408for ac_c_preproc_warn_flag in '' yes
4409do
4410 # Use a header file that comes with gcc, so configuring glibc
4411 # with a fresh cross-compiler works.
Christian Heimes32eba612021-03-19 10:29:25 +01004412 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4413 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004414 # On the NeXT, cc -E runs the code through the compiler's parser,
4415 # not just through cpp. "Syntax error" is here to catch this case.
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417/* end confdefs.h. */
Christian Heimes32eba612021-03-19 10:29:25 +01004418#ifdef __STDC__
4419# include <limits.h>
4420#else
4421# include <assert.h>
4422#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004423 Syntax error
4424_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004425if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004426
Christian Heimes32eba612021-03-19 10:29:25 +01004427else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004428 # Broken: fails on valid input.
4429continue
4430fi
4431rm -f conftest.err conftest.i conftest.$ac_ext
4432
4433 # OK, works on sane cases. Now check whether nonexistent headers
4434 # can be detected and how.
4435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436/* end confdefs.h. */
4437#include <ac_nonexistent.h>
4438_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004439if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004440 # Broken: success on invalid input.
4441continue
Christian Heimes32eba612021-03-19 10:29:25 +01004442else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004443 # Passes both tests.
4444ac_preproc_ok=:
4445break
4446fi
4447rm -f conftest.err conftest.i conftest.$ac_ext
4448
4449done
4450# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4451rm -f conftest.i conftest.err conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +01004452if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004453 break
4454fi
4455
4456 done
4457 ac_cv_prog_CPP=$CPP
4458
4459fi
4460 CPP=$ac_cv_prog_CPP
4461else
4462 ac_cv_prog_CPP=$CPP
4463fi
Christian Heimes32eba612021-03-19 10:29:25 +01004464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4465$as_echo "$CPP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004466ac_preproc_ok=false
4467for ac_c_preproc_warn_flag in '' yes
4468do
4469 # Use a header file that comes with gcc, so configuring glibc
4470 # with a fresh cross-compiler works.
Christian Heimes32eba612021-03-19 10:29:25 +01004471 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4472 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004473 # On the NeXT, cc -E runs the code through the compiler's parser,
4474 # not just through cpp. "Syntax error" is here to catch this case.
4475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4476/* end confdefs.h. */
Christian Heimes32eba612021-03-19 10:29:25 +01004477#ifdef __STDC__
4478# include <limits.h>
4479#else
4480# include <assert.h>
4481#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004482 Syntax error
4483_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004484if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004485
Christian Heimes32eba612021-03-19 10:29:25 +01004486else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004487 # Broken: fails on valid input.
4488continue
4489fi
4490rm -f conftest.err conftest.i conftest.$ac_ext
4491
4492 # OK, works on sane cases. Now check whether nonexistent headers
4493 # can be detected and how.
4494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495/* end confdefs.h. */
4496#include <ac_nonexistent.h>
4497_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01004498if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004499 # Broken: success on invalid input.
4500continue
Christian Heimes32eba612021-03-19 10:29:25 +01004501else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004502 # Passes both tests.
4503ac_preproc_ok=:
4504break
4505fi
4506rm -f conftest.err conftest.i conftest.$ac_ext
4507
4508done
4509# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4510rm -f conftest.i conftest.err conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +01004511if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004512
Christian Heimes32eba612021-03-19 10:29:25 +01004513else
4514 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004516as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4517See \`config.log' for more details" "$LINENO" 5; }
4518fi
4519
4520ac_ext=c
4521ac_cpp='$CPP $CPPFLAGS'
4522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4524ac_compiler_gnu=$ac_cv_c_compiler_gnu
4525
Christian Heimes32eba612021-03-19 10:29:25 +01004526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4527$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4528if ${ac_cv_path_GREP+:} false; then :
4529 $as_echo_n "(cached) " >&6
4530else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004531 if test -z "$GREP"; then
4532 ac_path_GREP_found=false
4533 # Loop through the user's path and test for each of PROGNAME-LIST
4534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4535for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4536do
4537 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01004538 test -z "$as_dir" && as_dir=.
4539 for ac_prog in grep ggrep; do
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004540 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01004541 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004542 as_fn_executable_p "$ac_path_GREP" || continue
4543# Check for GNU ac_path_GREP and select it if it is found.
4544 # Check for GNU $ac_path_GREP
4545case `"$ac_path_GREP" --version 2>&1` in
4546*GNU*)
4547 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4548*)
4549 ac_count=0
Christian Heimes32eba612021-03-19 10:29:25 +01004550 $as_echo_n 0123456789 >"conftest.in"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004551 while :
4552 do
4553 cat "conftest.in" "conftest.in" >"conftest.tmp"
4554 mv "conftest.tmp" "conftest.in"
4555 cp "conftest.in" "conftest.nl"
Christian Heimes32eba612021-03-19 10:29:25 +01004556 $as_echo 'GREP' >> "conftest.nl"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004557 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4558 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4559 as_fn_arith $ac_count + 1 && ac_count=$as_val
4560 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4561 # Best one so far, save it but keep looking for a better one
4562 ac_cv_path_GREP="$ac_path_GREP"
4563 ac_path_GREP_max=$ac_count
4564 fi
4565 # 10*(2^10) chars as input seems more than enough
4566 test $ac_count -gt 10 && break
4567 done
4568 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4569esac
4570
4571 $ac_path_GREP_found && break 3
4572 done
4573 done
4574 done
4575IFS=$as_save_IFS
4576 if test -z "$ac_cv_path_GREP"; then
4577 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4578 fi
4579else
4580 ac_cv_path_GREP=$GREP
4581fi
4582
4583fi
Christian Heimes32eba612021-03-19 10:29:25 +01004584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4585$as_echo "$ac_cv_path_GREP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004586 GREP="$ac_cv_path_GREP"
4587
4588
Christian Heimes32eba612021-03-19 10:29:25 +01004589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4590$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4591if ${ac_cv_path_SED+:} false; then :
4592 $as_echo_n "(cached) " >&6
4593else
Łukasz Langaa785c872016-09-09 17:37:37 -07004594 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4595 for ac_i in 1 2 3 4 5 6 7; do
4596 ac_script="$ac_script$as_nl$ac_script"
4597 done
4598 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4599 { ac_script=; unset ac_script;}
4600 if test -z "$SED"; then
4601 ac_path_SED_found=false
4602 # Loop through the user's path and test for each of PROGNAME-LIST
4603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604for as_dir in $PATH
4605do
4606 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01004607 test -z "$as_dir" && as_dir=.
4608 for ac_prog in sed gsed; do
Łukasz Langaa785c872016-09-09 17:37:37 -07004609 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01004610 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
Łukasz Langaa785c872016-09-09 17:37:37 -07004611 as_fn_executable_p "$ac_path_SED" || continue
4612# Check for GNU ac_path_SED and select it if it is found.
4613 # Check for GNU $ac_path_SED
4614case `"$ac_path_SED" --version 2>&1` in
4615*GNU*)
4616 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4617*)
4618 ac_count=0
Christian Heimes32eba612021-03-19 10:29:25 +01004619 $as_echo_n 0123456789 >"conftest.in"
Łukasz Langaa785c872016-09-09 17:37:37 -07004620 while :
4621 do
4622 cat "conftest.in" "conftest.in" >"conftest.tmp"
4623 mv "conftest.tmp" "conftest.in"
4624 cp "conftest.in" "conftest.nl"
Christian Heimes32eba612021-03-19 10:29:25 +01004625 $as_echo '' >> "conftest.nl"
Łukasz Langaa785c872016-09-09 17:37:37 -07004626 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4627 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4628 as_fn_arith $ac_count + 1 && ac_count=$as_val
4629 if test $ac_count -gt ${ac_path_SED_max-0}; then
4630 # Best one so far, save it but keep looking for a better one
4631 ac_cv_path_SED="$ac_path_SED"
4632 ac_path_SED_max=$ac_count
4633 fi
4634 # 10*(2^10) chars as input seems more than enough
4635 test $ac_count -gt 10 && break
4636 done
4637 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4638esac
4639
4640 $ac_path_SED_found && break 3
4641 done
4642 done
4643 done
4644IFS=$as_save_IFS
4645 if test -z "$ac_cv_path_SED"; then
4646 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4647 fi
4648else
4649 ac_cv_path_SED=$SED
4650fi
4651
4652fi
Christian Heimes32eba612021-03-19 10:29:25 +01004653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4654$as_echo "$ac_cv_path_SED" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -07004655 SED="$ac_cv_path_SED"
4656 rm -f conftest.sed
4657
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004658
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660
Christian Heimes32eba612021-03-19 10:29:25 +01004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4662$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004664# Check whether --with-cxx_main was given.
Christian Heimes32eba612021-03-19 10:29:25 +01004665if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004666 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
4668 case $withval in
4669 no) with_cxx_main=no
4670 MAINCC='$(CC)';;
4671 yes) with_cxx_main=yes
4672 MAINCC='$(CXX)';;
4673 *) with_cxx_main=yes
4674 MAINCC=$withval
4675 if test -z "$CXX"
4676 then
4677 CXX=$withval
4678 fi;;
4679 esac
Christian Heimes32eba612021-03-19 10:29:25 +01004680else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681
4682 with_cxx_main=no
4683 MAINCC='$(CC)'
4684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004685fi
4686
Christian Heimes32eba612021-03-19 10:29:25 +01004687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4688$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689
4690preset_cxx="$CXX"
4691if test -z "$CXX"
4692then
4693 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004694 gcc) if test -n "$ac_tool_prefix"; then
4695 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4696set dummy ${ac_tool_prefix}g++; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01004697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if ${ac_cv_path_CXX+:} false; then :
4700 $as_echo_n "(cached) " >&6
4701else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004702 case $CXX in
4703 [\\/]* | ?:[\\/]*)
4704 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4705 ;;
4706 *)
4707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in notfound
4709do
4710 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01004711 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004712 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01004713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4714 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004716 break 2
4717 fi
4718done
4719 done
4720IFS=$as_save_IFS
4721
4722 ;;
4723esac
4724fi
4725CXX=$ac_cv_path_CXX
4726if test -n "$CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01004727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4728$as_echo "$CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004729else
Christian Heimes32eba612021-03-19 10:29:25 +01004730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004732fi
4733
4734
4735fi
4736if test -z "$ac_cv_path_CXX"; then
4737 ac_pt_CXX=$CXX
4738 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739set dummy g++; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if ${ac_cv_path_ac_pt_CXX+:} false; then :
4743 $as_echo_n "(cached) " >&6
4744else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745 case $ac_pt_CXX in
4746 [\\/]* | ?:[\\/]*)
4747 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4748 ;;
4749 *)
4750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in notfound
4752do
4753 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01004754 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004755 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01004756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4757 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004759 break 2
4760 fi
4761done
4762 done
4763IFS=$as_save_IFS
4764
4765 ;;
4766esac
4767fi
4768ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4769if test -n "$ac_pt_CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01004770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4771$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004772else
Christian Heimes32eba612021-03-19 10:29:25 +01004773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775fi
4776
4777 if test "x$ac_pt_CXX" = x; then
4778 CXX="g++"
4779 else
4780 case $cross_compiling:$ac_tool_warned in
4781yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01004782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784ac_tool_warned=yes ;;
4785esac
4786 CXX=$ac_pt_CXX
4787 fi
4788else
4789 CXX="$ac_cv_path_CXX"
4790fi
4791 ;;
4792 cc) if test -n "$ac_tool_prefix"; then
4793 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4794set dummy ${ac_tool_prefix}c++; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01004795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796$as_echo_n "checking for $ac_word... " >&6; }
4797if ${ac_cv_path_CXX+:} false; then :
4798 $as_echo_n "(cached) " >&6
4799else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 case $CXX in
4801 [\\/]* | ?:[\\/]*)
4802 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4803 ;;
4804 *)
4805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in notfound
4807do
4808 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01004809 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01004811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4812 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 break 2
4815 fi
4816done
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004818IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820 ;;
4821esac
4822fi
4823CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004824if test -n "$CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01004825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4826$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827else
Christian Heimes32eba612021-03-19 10:29:25 +01004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004831
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832
4833fi
4834if test -z "$ac_cv_path_CXX"; then
4835 ac_pt_CXX=$CXX
4836 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837set dummy c++; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4839$as_echo_n "checking for $ac_word... " >&6; }
4840if ${ac_cv_path_ac_pt_CXX+:} false; then :
4841 $as_echo_n "(cached) " >&6
4842else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 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 +00004846 ;;
4847 *)
4848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4849for as_dir in notfound
4850do
4851 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01004852 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01004854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4855 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 break 2
4858 fi
4859done
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004861IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
4864esac
4865fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004866ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4867if test -n "$ac_pt_CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01004868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4869$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004870else
Christian Heimes32eba612021-03-19 10:29:25 +01004871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004874
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 if test "x$ac_pt_CXX" = x; then
4876 CXX="c++"
4877 else
4878 case $cross_compiling:$ac_tool_warned in
4879yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01004880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882ac_tool_warned=yes ;;
4883esac
4884 CXX=$ac_pt_CXX
4885 fi
4886else
4887 CXX="$ac_cv_path_CXX"
4888fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004889 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004890 clang|*/clang) if test -n "$ac_tool_prefix"; then
4891 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4892set dummy ${ac_tool_prefix}clang++; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01004893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if ${ac_cv_path_CXX+:} false; then :
4896 $as_echo_n "(cached) " >&6
4897else
Ned Deilycbfb9a52012-06-23 16:02:19 -07004898 case $CXX in
4899 [\\/]* | ?:[\\/]*)
4900 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4901 ;;
4902 *)
4903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in notfound
4905do
4906 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01004907 test -z "$as_dir" && as_dir=.
Ned Deilycbfb9a52012-06-23 16:02:19 -07004908 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01004909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4910 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Ned Deilycbfb9a52012-06-23 16:02:19 -07004912 break 2
4913 fi
4914done
4915 done
4916IFS=$as_save_IFS
4917
Ned Deilycbfb9a52012-06-23 16:02:19 -07004918 ;;
4919esac
4920fi
4921CXX=$ac_cv_path_CXX
4922if test -n "$CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01004923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4924$as_echo "$CXX" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004925else
Christian Heimes32eba612021-03-19 10:29:25 +01004926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004928fi
4929
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004930
4931fi
4932if test -z "$ac_cv_path_CXX"; then
4933 ac_pt_CXX=$CXX
4934 # Extract the first word of "clang++", so it can be a program name with args.
4935set dummy clang++; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01004936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if ${ac_cv_path_ac_pt_CXX+:} false; then :
4939 $as_echo_n "(cached) " >&6
4940else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004941 case $ac_pt_CXX in
4942 [\\/]* | ?:[\\/]*)
4943 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4944 ;;
4945 *)
4946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947for as_dir in notfound
4948do
4949 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01004950 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004951 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01004952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4953 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004955 break 2
4956 fi
4957done
4958 done
4959IFS=$as_save_IFS
4960
4961 ;;
4962esac
4963fi
4964ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4965if test -n "$ac_pt_CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01004966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4967$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004968else
Christian Heimes32eba612021-03-19 10:29:25 +01004969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004971fi
4972
4973 if test "x$ac_pt_CXX" = x; then
4974 CXX="clang++"
4975 else
4976 case $cross_compiling:$ac_tool_warned in
4977yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01004978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004980ac_tool_warned=yes ;;
4981esac
4982 CXX=$ac_pt_CXX
4983 fi
4984else
4985 CXX="$ac_cv_path_CXX"
4986fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004987 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004988 icc|*/icc) if test -n "$ac_tool_prefix"; then
4989 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4990set dummy ${ac_tool_prefix}icpc; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01004991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_CXX+:} false; then :
4994 $as_echo_n "(cached) " >&6
4995else
Zachary Ware5af85642015-12-21 12:09:17 -06004996 case $CXX in
4997 [\\/]* | ?:[\\/]*)
4998 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4999 ;;
5000 *)
5001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in notfound
5003do
5004 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01005005 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005006 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01005007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005010 break 2
5011 fi
5012done
5013 done
5014IFS=$as_save_IFS
5015
5016 ;;
5017esac
5018fi
5019CXX=$ac_cv_path_CXX
5020if test -n "$CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01005021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5022$as_echo "$CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005023else
Christian Heimes32eba612021-03-19 10:29:25 +01005024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005026fi
5027
5028
5029fi
5030if test -z "$ac_cv_path_CXX"; then
5031 ac_pt_CXX=$CXX
5032 # Extract the first word of "icpc", so it can be a program name with args.
5033set dummy icpc; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if ${ac_cv_path_ac_pt_CXX+:} false; then :
5037 $as_echo_n "(cached) " >&6
5038else
Zachary Ware5af85642015-12-21 12:09:17 -06005039 case $ac_pt_CXX in
5040 [\\/]* | ?:[\\/]*)
5041 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5042 ;;
5043 *)
5044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in notfound
5046do
5047 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01005048 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005049 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01005050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5051 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005053 break 2
5054 fi
5055done
5056 done
5057IFS=$as_save_IFS
5058
5059 ;;
5060esac
5061fi
5062ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5063if test -n "$ac_pt_CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01005064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5065$as_echo "$ac_pt_CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005066else
Christian Heimes32eba612021-03-19 10:29:25 +01005067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005069fi
5070
5071 if test "x$ac_pt_CXX" = x; then
5072 CXX="icpc"
5073 else
5074 case $cross_compiling:$ac_tool_warned in
5075yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01005076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Zachary Ware5af85642015-12-21 12:09:17 -06005078ac_tool_warned=yes ;;
5079esac
5080 CXX=$ac_pt_CXX
5081 fi
5082else
5083 CXX="$ac_cv_path_CXX"
5084fi
5085 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086 esac
5087 if test "$CXX" = "notfound"
5088 then
5089 CXX=""
5090 fi
5091fi
5092if test -z "$CXX"
5093then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005094 if test -n "$ac_tool_prefix"; then
5095 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5096 do
5097 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01005099{ $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_CXX+:} false; then :
5102 $as_echo_n "(cached) " >&6
5103else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104 if test -n "$CXX"; then
5105 ac_cv_prog_CXX="$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
Christian Heimes32eba612021-03-19 10:29:25 +01005111 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01005113 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_CXX="$ac_tool_prefix$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01005115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116 break 2
5117 fi
5118done
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122fi
5123fi
5124CXX=$ac_cv_prog_CXX
5125if test -n "$CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5127$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128else
Christian Heimes32eba612021-03-19 10:29:25 +01005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131fi
5132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 test -n "$CXX" && break
5135 done
5136fi
5137if test -z "$CXX"; then
5138 ac_ct_CXX=$CXX
5139 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5140do
5141 # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01005143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5146 $as_echo_n "(cached) " >&6
5147else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005148 if test -n "$ac_ct_CXX"; then
5149 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5150else
5151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01005155 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005156 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01005157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005158 ac_cv_prog_ac_ct_CXX="$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01005159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005160 break 2
5161 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005162done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005163 done
5164IFS=$as_save_IFS
5165
5166fi
5167fi
5168ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5169if test -n "$ac_ct_CXX"; then
Christian Heimes32eba612021-03-19 10:29:25 +01005170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5171$as_echo "$ac_ct_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005172else
Christian Heimes32eba612021-03-19 10:29:25 +01005173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005175fi
5176
5177
5178 test -n "$ac_ct_CXX" && break
5179done
5180
5181 if test "x$ac_ct_CXX" = x; then
5182 CXX="notfound"
5183 else
5184 case $cross_compiling:$ac_tool_warned in
5185yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01005186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005188ac_tool_warned=yes ;;
5189esac
5190 CXX=$ac_ct_CXX
5191 fi
5192fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193
5194 if test "$CXX" = "notfound"
5195 then
5196 CXX=""
5197 fi
5198fi
5199if test "$preset_cxx" != "$CXX"
5200then
Christian Heimes32eba612021-03-19 10:29:25 +01005201 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005202
5203 By default, distutils will build C++ extension modules with \"$CXX\".
5204 If this is not intended, then set CXX on the configure command line.
5205 " >&5
Christian Heimes32eba612021-03-19 10:29:25 +01005206$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005207
5208 By default, distutils will build C++ extension modules with \"$CXX\".
5209 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005210 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005211fi
5212
5213
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5215
5216
Christian Heimes32eba612021-03-19 10:29:25 +01005217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5218$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005219cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005220#undef bfin
5221#undef cris
5222#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005223#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005224#undef hppa
5225#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005228#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005229#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005231#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005232 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005233#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005234# if defined(__x86_64__) && defined(__LP64__)
5235 x86_64-linux-gnu
5236# elif defined(__x86_64__) && defined(__ILP32__)
5237 x86_64-linux-gnux32
5238# elif defined(__i386__)
5239 i386-linux-gnu
5240# elif defined(__aarch64__) && defined(__AARCH64EL__)
5241# if defined(__ILP32__)
5242 aarch64_ilp32-linux-gnu
5243# else
5244 aarch64-linux-gnu
5245# endif
5246# elif defined(__aarch64__) && defined(__AARCH64EB__)
5247# if defined(__ILP32__)
5248 aarch64_be_ilp32-linux-gnu
5249# else
5250 aarch64_be-linux-gnu
5251# endif
5252# elif defined(__alpha__)
5253 alpha-linux-gnu
5254# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5255# if defined(__ARMEL__)
5256 arm-linux-gnueabihf
5257# else
5258 armeb-linux-gnueabihf
5259# endif
5260# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5261# if defined(__ARMEL__)
5262 arm-linux-gnueabi
5263# else
5264 armeb-linux-gnueabi
5265# endif
5266# elif defined(__hppa__)
5267 hppa-linux-gnu
5268# elif defined(__ia64__)
5269 ia64-linux-gnu
5270# elif defined(__m68k__) && !defined(__mcoldfire__)
5271 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005272# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5273# if _MIPS_SIM == _ABIO32
5274 mipsisa32r6el-linux-gnu
5275# elif _MIPS_SIM == _ABIN32
5276 mipsisa64r6el-linux-gnuabin32
5277# elif _MIPS_SIM == _ABI64
5278 mipsisa64r6el-linux-gnuabi64
5279# else
5280# error unknown platform triplet
5281# endif
5282# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5283# if _MIPS_SIM == _ABIO32
5284 mipsisa32r6-linux-gnu
5285# elif _MIPS_SIM == _ABIN32
5286 mipsisa64r6-linux-gnuabin32
5287# elif _MIPS_SIM == _ABI64
5288 mipsisa64r6-linux-gnuabi64
5289# else
5290# error unknown platform triplet
5291# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005292# elif defined(__mips_hard_float) && defined(_MIPSEL)
5293# if _MIPS_SIM == _ABIO32
5294 mipsel-linux-gnu
5295# elif _MIPS_SIM == _ABIN32
5296 mips64el-linux-gnuabin32
5297# elif _MIPS_SIM == _ABI64
5298 mips64el-linux-gnuabi64
5299# else
5300# error unknown platform triplet
5301# endif
5302# elif defined(__mips_hard_float)
5303# if _MIPS_SIM == _ABIO32
5304 mips-linux-gnu
5305# elif _MIPS_SIM == _ABIN32
5306 mips64-linux-gnuabin32
5307# elif _MIPS_SIM == _ABI64
5308 mips64-linux-gnuabi64
5309# else
5310# error unknown platform triplet
5311# endif
5312# elif defined(__or1k__)
5313 or1k-linux-gnu
5314# elif defined(__powerpc__) && defined(__SPE__)
5315 powerpc-linux-gnuspe
5316# elif defined(__powerpc64__)
5317# if defined(__LITTLE_ENDIAN__)
5318 powerpc64le-linux-gnu
5319# else
5320 powerpc64-linux-gnu
5321# endif
5322# elif defined(__powerpc__)
5323 powerpc-linux-gnu
5324# elif defined(__s390x__)
5325 s390x-linux-gnu
5326# elif defined(__s390__)
5327 s390-linux-gnu
5328# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5329 sh4-linux-gnu
5330# elif defined(__sparc__) && defined(__arch64__)
5331 sparc64-linux-gnu
5332# elif defined(__sparc__)
5333 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005334# elif defined(__riscv)
5335# if __riscv_xlen == 32
5336 riscv32-linux-gnu
5337# elif __riscv_xlen == 64
5338 riscv64-linux-gnu
5339# else
5340# error unknown platform triplet
5341# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005342# else
5343# error unknown platform triplet
5344# endif
5345#elif defined(__FreeBSD_kernel__)
5346# if defined(__LP64__)
5347 x86_64-kfreebsd-gnu
5348# elif defined(__i386__)
5349 i386-kfreebsd-gnu
5350# else
5351# error unknown platform triplet
5352# endif
5353#elif defined(__gnu_hurd__)
5354 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005355#elif defined(__APPLE__)
5356 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005357#elif defined(__VXWORKS__)
5358 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359#else
5360# error unknown platform triplet
5361#endif
5362
5363EOF
5364
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005365if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005366 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
Christian Heimes32eba612021-03-19 10:29:25 +01005367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5368$as_echo "$PLATFORM_TRIPLET" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005369else
Christian Heimes32eba612021-03-19 10:29:25 +01005370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5371$as_echo "none" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005372fi
5373rm -f conftest.c conftest.out
5374
5375if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5376 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5377 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5378 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005379elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5380 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005381fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005382
doko@ubuntu.com55532312016-06-14 08:55:19 +02005383if test x$MULTIARCH != x; then
5384 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5385fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005386
5387
Christian Heimes32eba612021-03-19 10:29:25 +01005388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5389$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005390save_LDFLAGS="$LDFLAGS"
5391LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005392
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5394/* end confdefs.h. */
5395
5396int
Christian Heimes32eba612021-03-19 10:29:25 +01005397main ()
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005398{
5399
5400 ;
5401 return 0;
5402}
5403_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01005404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005405 NO_AS_NEEDED="-Wl,--no-as-needed"
Christian Heimes32eba612021-03-19 10:29:25 +01005406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5407$as_echo "yes" >&6; }
5408else
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005409 NO_AS_NEEDED=""
Christian Heimes32eba612021-03-19 10:29:25 +01005410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005412fi
Christian Heimes32eba612021-03-19 10:29:25 +01005413rm -f core conftest.err conftest.$ac_objext \
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005414 conftest$ac_exeext conftest.$ac_ext
5415LDFLAGS="$save_LDFLAGS"
5416
5417
5418
5419# checks for UNIX variants that set C preprocessor variables
Christian Heimes32eba612021-03-19 10:29:25 +01005420
5421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5422$as_echo_n "checking for egrep... " >&6; }
5423if ${ac_cv_path_EGREP+:} false; then :
5424 $as_echo_n "(cached) " >&6
5425else
5426 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5427 then ac_cv_path_EGREP="$GREP -E"
5428 else
5429 if test -z "$EGREP"; then
5430 ac_path_EGREP_found=false
5431 # Loop through the user's path and test for each of PROGNAME-LIST
5432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434do
Christian Heimes32eba612021-03-19 10:29:25 +01005435 IFS=$as_save_IFS
5436 test -z "$as_dir" && as_dir=.
5437 for ac_prog in egrep; do
5438 for ac_exec_ext in '' $ac_executable_extensions; do
5439 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5440 as_fn_executable_p "$ac_path_EGREP" || continue
5441# Check for GNU ac_path_EGREP and select it if it is found.
5442 # Check for GNU $ac_path_EGREP
5443case `"$ac_path_EGREP" --version 2>&1` in
5444*GNU*)
5445 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5446*)
5447 ac_count=0
5448 $as_echo_n 0123456789 >"conftest.in"
5449 while :
5450 do
5451 cat "conftest.in" "conftest.in" >"conftest.tmp"
5452 mv "conftest.tmp" "conftest.in"
5453 cp "conftest.in" "conftest.nl"
5454 $as_echo 'EGREP' >> "conftest.nl"
5455 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5456 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5457 as_fn_arith $ac_count + 1 && ac_count=$as_val
5458 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5459 # Best one so far, save it but keep looking for a better one
5460 ac_cv_path_EGREP="$ac_path_EGREP"
5461 ac_path_EGREP_max=$ac_count
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005462 fi
Christian Heimes32eba612021-03-19 10:29:25 +01005463 # 10*(2^10) chars as input seems more than enough
5464 test $ac_count -gt 10 && break
5465 done
5466 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5467esac
5468
5469 $ac_path_EGREP_found && break 3
5470 done
5471 done
5472 done
5473IFS=$as_save_IFS
5474 if test -z "$ac_cv_path_EGREP"; then
5475 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 +00005476 fi
Christian Heimes32eba612021-03-19 10:29:25 +01005477else
5478 ac_cv_path_EGREP=$EGREP
5479fi
5480
5481 fi
5482fi
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5484$as_echo "$ac_cv_path_EGREP" >&6; }
5485 EGREP="$ac_cv_path_EGREP"
5486
5487
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5489$as_echo_n "checking for ANSI C header files... " >&6; }
5490if ${ac_cv_header_stdc+:} false; then :
5491 $as_echo_n "(cached) " >&6
5492else
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h. */
5495#include <stdlib.h>
5496#include <stdarg.h>
5497#include <string.h>
5498#include <float.h>
5499
5500int
5501main ()
5502{
5503
5504 ;
5505 return 0;
5506}
5507_ACEOF
5508if ac_fn_c_try_compile "$LINENO"; then :
5509 ac_cv_header_stdc=yes
5510else
5511 ac_cv_header_stdc=no
5512fi
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514
5515if test $ac_cv_header_stdc = yes; then
5516 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518/* end confdefs.h. */
5519#include <string.h>
5520
5521_ACEOF
5522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5523 $EGREP "memchr" >/dev/null 2>&1; then :
5524
5525else
5526 ac_cv_header_stdc=no
5527fi
5528rm -f conftest*
5529
5530fi
5531
5532if test $ac_cv_header_stdc = yes; then
5533 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5535/* end confdefs.h. */
5536#include <stdlib.h>
5537
5538_ACEOF
5539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5540 $EGREP "free" >/dev/null 2>&1; then :
5541
5542else
5543 ac_cv_header_stdc=no
5544fi
5545rm -f conftest*
5546
5547fi
5548
5549if test $ac_cv_header_stdc = yes; then
5550 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5551 if test "$cross_compiling" = yes; then :
5552 :
5553else
5554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5555/* end confdefs.h. */
5556#include <ctype.h>
5557#include <stdlib.h>
5558#if ((' ' & 0x0FF) == 0x020)
5559# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5560# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5561#else
5562# define ISLOWER(c) \
5563 (('a' <= (c) && (c) <= 'i') \
5564 || ('j' <= (c) && (c) <= 'r') \
5565 || ('s' <= (c) && (c) <= 'z'))
5566# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5567#endif
5568
5569#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5570int
5571main ()
5572{
5573 int i;
5574 for (i = 0; i < 256; i++)
5575 if (XOR (islower (i), ISLOWER (i))
5576 || toupper (i) != TOUPPER (i))
5577 return 2;
5578 return 0;
5579}
5580_ACEOF
5581if ac_fn_c_try_run "$LINENO"; then :
5582
5583else
5584 ac_cv_header_stdc=no
5585fi
5586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5587 conftest.$ac_objext conftest.beam conftest.$ac_ext
5588fi
5589
5590fi
5591fi
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5593$as_echo "$ac_cv_header_stdc" >&6; }
5594if test $ac_cv_header_stdc = yes; then
5595
5596$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5597
5598fi
5599
5600# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5601for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5602 inttypes.h stdint.h unistd.h
5603do :
5604 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5605ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5606"
5607if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5608 cat >>confdefs.h <<_ACEOF
5609#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5610_ACEOF
5611
5612fi
5613
Matthias Kloseb9621712010-04-24 17:59:49 +00005614done
5615
5616
5617
Christian Heimes32eba612021-03-19 10:29:25 +01005618 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5619if test "x$ac_cv_header_minix_config_h" = xyes; then :
5620 MINIX=yes
5621else
5622 MINIX=
Matthias Kloseb9621712010-04-24 17:59:49 +00005623fi
5624
5625
Christian Heimes32eba612021-03-19 10:29:25 +01005626 if test "$MINIX" = yes; then
5627
5628$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005629
5630
Christian Heimes32eba612021-03-19 10:29:25 +01005631$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005632
5633
Christian Heimes32eba612021-03-19 10:29:25 +01005634$as_echo "#define _MINIX 1" >>confdefs.h
5635
5636 fi
5637
5638
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5640$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5641if ${ac_cv_safe_to_define___extensions__+:} false; then :
5642 $as_echo_n "(cached) " >&6
5643else
Matthias Kloseb9621712010-04-24 17:59:49 +00005644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645/* end confdefs.h. */
5646
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005647# define __EXTENSIONS__ 1
5648 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005649int
Christian Heimes32eba612021-03-19 10:29:25 +01005650main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{
5652
5653 ;
5654 return 0;
5655}
5656_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01005657if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 ac_cv_safe_to_define___extensions__=yes
Christian Heimes32eba612021-03-19 10:29:25 +01005659else
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 ac_cv_safe_to_define___extensions__=no
5661fi
Christian Heimes32eba612021-03-19 10:29:25 +01005662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005663fi
Christian Heimes32eba612021-03-19 10:29:25 +01005664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5665$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5666 test $ac_cv_safe_to_define___extensions__ = yes &&
5667 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005668
Christian Heimes32eba612021-03-19 10:29:25 +01005669 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005670
Christian Heimes32eba612021-03-19 10:29:25 +01005671 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005672
Christian Heimes32eba612021-03-19 10:29:25 +01005673 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005674
Christian Heimes32eba612021-03-19 10:29:25 +01005675 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005676
5677
Christian Heimes32eba612021-03-19 10:29:25 +01005678
5679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5680$as_echo_n "checking for the Android API level... " >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005681cat >> conftest.c <<EOF
5682#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005683android_api = __ANDROID_API__
5684arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005685#else
5686#error not Android
5687#endif
5688EOF
5689
5690if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005691 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5692 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Christian Heimes32eba612021-03-19 10:29:25 +01005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5694$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005695 if test -z "$ANDROID_API_LEVEL"; then
5696 echo 'Fatal: you must define __ANDROID_API__'
5697 exit 1
5698 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005699
Christian Heimes32eba612021-03-19 10:29:25 +01005700cat >>confdefs.h <<_ACEOF
5701#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5702_ACEOF
Xavier de Gaye95750b12016-07-09 11:05:42 +02005703
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005704
Christian Heimes32eba612021-03-19 10:29:25 +01005705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5706$as_echo_n "checking for the Android arm ABI... " >&6; }
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5708$as_echo "$_arm_arch" >&6; }
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005709 if test "$_arm_arch" = 7; then
5710 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5711 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5712 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005713else
Christian Heimes32eba612021-03-19 10:29:25 +01005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5715$as_echo "not Android" >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005716fi
5717rm -f conftest.c conftest.out
5718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719# Check for unsupported systems
5720case $ac_sys_system/$ac_sys_release in
5721atheos*|Linux*/1*)
5722 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5723 echo See README for details.
5724 exit 1;;
5725esac
5726
5727
Christian Heimes32eba612021-03-19 10:29:25 +01005728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5729$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731# Check whether --with-suffix was given.
Christian Heimes32eba612021-03-19 10:29:25 +01005732if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 withval=$with_suffix;
5734 case $withval in
5735 no) EXEEXT=;;
5736 yes) EXEEXT=.exe;;
5737 *) EXEEXT=$withval;;
5738 esac
5739fi
5740
Christian Heimes32eba612021-03-19 10:29:25 +01005741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5742$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743
5744# Test whether we're running on a non-case-sensitive system, in which
5745# case we give a warning if no ext is given
5746
Christian Heimes32eba612021-03-19 10:29:25 +01005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5748$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749if test ! -d CaseSensitiveTestDir; then
5750mkdir CaseSensitiveTestDir
5751fi
5752
5753if test -d casesensitivetestdir
5754then
Christian Heimes32eba612021-03-19 10:29:25 +01005755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5756$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 BUILDEXEEXT=.exe
5758else
Christian Heimes32eba612021-03-19 10:29:25 +01005759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5760$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761 BUILDEXEEXT=$EXEEXT
5762fi
5763rmdir CaseSensitiveTestDir
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765case $ac_sys_system in
5766hp*|HP*)
5767 case $CC in
5768 cc|*/cc) CC="$CC -Ae";;
5769 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770esac
5771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772
Christian Heimes32eba612021-03-19 10:29:25 +01005773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5774$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775if test -z "$LIBRARY"
5776then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005777 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778fi
Christian Heimes32eba612021-03-19 10:29:25 +01005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5780$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# LDLIBRARY is the name of the library to link against (as opposed to the
5783# name of the library into which to insert object files). BLDLIBRARY is also
5784# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5785# is blank as the main program is not linked directly against LDLIBRARY.
5786# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5787# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5788# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5789# DLLLIBRARY is the shared (i.e., DLL) library.
5790#
5791# RUNSHARED is used to run shared python without installed libraries
5792#
5793# INSTSONAME is the name of the shared library that will be use to install
5794# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005795#
5796# LDVERSION is the shared library version number, normally the Python version
5797# with the ABI build flags appended.
5798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799
5800
5801
5802
5803
5804
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005805
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806LDLIBRARY="$LIBRARY"
5807BLDLIBRARY='$(LDLIBRARY)'
5808INSTSONAME='$(LDLIBRARY)'
5809DLLLIBRARY=''
5810LDLIBRARYDIR=''
5811RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005812LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813
5814# LINKCC is the command that links the python executable -- default is $(CC).
5815# If CXX is set, and if it is needed to link a main function that was
5816# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5817# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818
Christian Heimes32eba612021-03-19 10:29:25 +01005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5820$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821if test -z "$LINKCC"
5822then
5823 LINKCC='$(PURIFY) $(MAINCC)'
5824 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825 QNX*)
5826 # qcc must be used because the other compilers do not
5827 # support -N.
5828 LINKCC=qcc;;
5829 esac
5830fi
Christian Heimes32eba612021-03-19 10:29:25 +01005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5832$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
Stefan Krahe6dcd372020-08-29 17:00:08 +02005834# EXPORTSYMS holds the list of exported symbols for AIX.
5835# EXPORTSFROM holds the module name exporting symbols on AIX.
5836EXPORTSYMS=
5837EXPORTSFROM=
5838
5839
Christian Heimes32eba612021-03-19 10:29:25 +01005840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5841$as_echo_n "checking EXPORTSYMS... " >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005842case $ac_sys_system in
5843AIX*)
5844 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005845 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005846 ;;
5847esac
Christian Heimes32eba612021-03-19 10:29:25 +01005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5849$as_echo "$EXPORTSYMS" >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5852# make sure we default having it set to "no": this is used by
5853# distutils.unixccompiler to know if it should add --enable-new-dtags
5854# to linker command lines, and failing to detect GNU ld simply results
5855# in the same bahaviour as before.
5856
Christian Heimes32eba612021-03-19 10:29:25 +01005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5858$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859ac_prog=ld
5860if test "$GCC" = yes; then
5861 ac_prog=`$CC -print-prog-name=ld`
5862fi
5863case `"$ac_prog" -V 2>&1 < /dev/null` in
5864 *GNU*)
5865 GNULD=yes;;
5866 *)
5867 GNULD=no;;
5868esac
Christian Heimes32eba612021-03-19 10:29:25 +01005869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5870$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871
Christian Heimes32eba612021-03-19 10:29:25 +01005872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5873$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874# Check whether --enable-shared was given.
Christian Heimes32eba612021-03-19 10:29:25 +01005875if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 enableval=$enable_shared;
5877fi
5878
5879
5880if test -z "$enable_shared"
5881then
5882 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005883 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 enable_shared="yes";;
5885 *)
5886 enable_shared="no";;
5887 esac
5888fi
Christian Heimes32eba612021-03-19 10:29:25 +01005889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5890$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891
Christian Heimes32eba612021-03-19 10:29:25 +01005892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5893$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894# Check whether --enable-profiling was given.
Christian Heimes32eba612021-03-19 10:29:25 +01005895if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896 enableval=$enable_profiling;
5897fi
5898
5899if test "x$enable_profiling" = xyes; then
5900 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005901 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903/* end confdefs.h. */
5904int main() { return 0; }
5905_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01005906if ac_fn_c_try_link "$LINENO"; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005907
Christian Heimes32eba612021-03-19 10:29:25 +01005908else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005909 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
Christian Heimes32eba612021-03-19 10:29:25 +01005911rm -f core conftest.err conftest.$ac_objext \
doko@ubuntu.comba015832012-06-30 16:52:05 +02005912 conftest$ac_exeext conftest.$ac_ext
5913 CC="$ac_save_cc"
5914else
5915 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916fi
Christian Heimes32eba612021-03-19 10:29:25 +01005917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5918$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
doko@ubuntu.comba015832012-06-30 16:52:05 +02005920if test "x$enable_profiling" = xyes; then
5921 BASECFLAGS="-pg $BASECFLAGS"
5922 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923fi
5924
Christian Heimes32eba612021-03-19 10:29:25 +01005925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5926$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
5928# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5929# library that we build, but we do not want to link against it (we
5930# will find it with a -framework option). For this reason there is an
5931# extra variable BLDLIBRARY against which Python and the extension
5932# modules are linked, BLDLIBRARY. This is normally the same as
5933# LDLIBRARY, but empty for MacOSX framework builds.
5934if test "$enable_framework"
5935then
5936 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005937 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 BLDLIBRARY=''
5939else
5940 BLDLIBRARY='$(LDLIBRARY)'
5941fi
5942
5943# Other platforms follow
5944if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005945 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946
Christian Heimes32eba612021-03-19 10:29:25 +01005947$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948
5949 case $ac_sys_system in
5950 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).dll.a'
5952 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 ;;
5954 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005955 LDLIBRARY='libpython$(LDVERSION).so'
5956 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005957 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005959 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005960 then
5961 PY3LIBRARY=libpython3.so
5962 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
pxinwrc1174262020-12-15 06:14:43 +08005964 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005965 LDLIBRARY='libpython$(LDVERSION).so'
5966 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005967 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005969 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005970 then
5971 PY3LIBRARY=libpython3.so
5972 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 ;;
5974 hp*|HP*)
5975 case `uname -m` in
5976 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005977 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978 ;;
5979 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005980 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ;;
5982 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005983 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005984 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005987 LDLIBRARY='libpython$(LDVERSION).dylib'
5988 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005989 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005991 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005992 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005993 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005994 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995
5996 esac
5997else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005998 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999 case $ac_sys_system in
6000 CYGWIN*)
6001 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006002 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 ;;
6004 esac
6005fi
6006
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006007if test "$cross_compiling" = yes; then
6008 RUNSHARED=
6009fi
6010
Christian Heimes32eba612021-03-19 10:29:25 +01006011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6012$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006015if test -n "$ac_tool_prefix"; then
6016 for ac_prog in ar aal
6017 do
6018 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01006020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6021$as_echo_n "checking for $ac_word... " >&6; }
6022if ${ac_cv_prog_AR+:} false; then :
6023 $as_echo_n "(cached) " >&6
6024else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025 if test -n "$AR"; then
6026 ac_cv_prog_AR="$AR" # Let the user override the test.
6027else
6028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6029for as_dir in $PATH
6030do
6031 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006035 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01006036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 break 2
6038 fi
6039done
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041IFS=$as_save_IFS
6042
6043fi
6044fi
6045AR=$ac_cv_prog_AR
6046if test -n "$AR"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6048$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049else
Christian Heimes32eba612021-03-19 10:29:25 +01006050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6051$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
6053
6054
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006055 test -n "$AR" && break
6056 done
6057fi
6058if test -z "$AR"; then
6059 ac_ct_AR=$AR
6060 for ac_prog in ar aal
6061do
6062 # Extract the first word of "$ac_prog", so it can be a program name with args.
6063set dummy $ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01006064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6065$as_echo_n "checking for $ac_word... " >&6; }
6066if ${ac_cv_prog_ac_ct_AR+:} false; then :
6067 $as_echo_n "(cached) " >&6
6068else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006069 if test -n "$ac_ct_AR"; then
6070 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6071else
6072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6073for as_dir in $PATH
6074do
6075 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006076 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006077 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006079 ac_cv_prog_ac_ct_AR="$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01006080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006081 break 2
6082 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006084 done
6085IFS=$as_save_IFS
6086
6087fi
6088fi
6089ac_ct_AR=$ac_cv_prog_ac_ct_AR
6090if test -n "$ac_ct_AR"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6092$as_echo "$ac_ct_AR" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006093else
Christian Heimes32eba612021-03-19 10:29:25 +01006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006096fi
6097
6098
6099 test -n "$ac_ct_AR" && break
6100done
6101
6102 if test "x$ac_ct_AR" = x; then
6103 AR="ar"
6104 else
6105 case $cross_compiling:$ac_tool_warned in
6106yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01006107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006109ac_tool_warned=yes ;;
6110esac
6111 AR=$ac_ct_AR
6112 fi
6113fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114
6115
6116# tweak ARFLAGS only if the user didn't set it on the command line
6117
6118if test -z "$ARFLAGS"
6119then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006120 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121fi
6122
doko@ubuntu.com58844492012-06-30 18:25:32 +02006123if test -n "$ac_tool_prefix"; then
6124 for ac_prog in readelf
6125 do
6126 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6127set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01006128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6129$as_echo_n "checking for $ac_word... " >&6; }
6130if ${ac_cv_prog_READELF+:} false; then :
6131 $as_echo_n "(cached) " >&6
6132else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006133 if test -n "$READELF"; then
6134 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6135else
6136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6137for as_dir in $PATH
6138do
6139 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006140 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006141 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006143 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01006144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006145 break 2
6146 fi
6147done
6148 done
6149IFS=$as_save_IFS
6150
6151fi
6152fi
6153READELF=$ac_cv_prog_READELF
6154if test -n "$READELF"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6156$as_echo "$READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006157else
Christian Heimes32eba612021-03-19 10:29:25 +01006158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6159$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006160fi
6161
6162
6163 test -n "$READELF" && break
6164 done
6165fi
6166if test -z "$READELF"; then
6167 ac_ct_READELF=$READELF
6168 for ac_prog in readelf
6169do
6170 # Extract the first word of "$ac_prog", so it can be a program name with args.
6171set dummy $ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01006172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6173$as_echo_n "checking for $ac_word... " >&6; }
6174if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6175 $as_echo_n "(cached) " >&6
6176else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006177 if test -n "$ac_ct_READELF"; then
6178 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6179else
6180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6181for as_dir in $PATH
6182do
6183 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006184 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006185 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006187 ac_cv_prog_ac_ct_READELF="$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +01006188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006189 break 2
6190 fi
6191done
6192 done
6193IFS=$as_save_IFS
6194
6195fi
6196fi
6197ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6198if test -n "$ac_ct_READELF"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6200$as_echo "$ac_ct_READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006201else
Christian Heimes32eba612021-03-19 10:29:25 +01006202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006204fi
6205
6206
6207 test -n "$ac_ct_READELF" && break
6208done
6209
6210 if test "x$ac_ct_READELF" = x; then
6211 READELF=":"
6212 else
6213 case $cross_compiling:$ac_tool_warned in
6214yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01006215{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6216$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com58844492012-06-30 18:25:32 +02006217ac_tool_warned=yes ;;
6218esac
6219 READELF=$ac_ct_READELF
6220 fi
6221fi
6222
6223if test "$cross_compiling" = yes; then
6224 case "$READELF" in
6225 readelf|:)
6226 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6227 ;;
6228 esac
6229fi
6230
6231
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006234hp*|HP*)
6235 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236 if test -z "$INSTALL"
6237 then
6238 INSTALL="${srcdir}/install-sh -c"
6239 fi
6240esac
Christian Heimes32eba612021-03-19 10:29:25 +01006241# Find a good install program. We prefer a C program (faster),
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242# so one script is as good as another. But avoid the broken or
6243# incompatible versions:
6244# SysV /etc/install, /usr/sbin/install
6245# SunOS /usr/etc/install
6246# IRIX /sbin/install
6247# AIX /bin/install
6248# AmigaOS /C/install, which installs bootblocks on floppy discs
6249# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6250# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6251# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6252# OS/2's system install, which has a completely different semantic
6253# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006254# Reject install programs that cannot install multiple files.
Christian Heimes32eba612021-03-19 10:29:25 +01006255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6256$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006257if test -z "$INSTALL"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006258if ${ac_cv_path_install+:} false; then :
6259 $as_echo_n "(cached) " >&6
6260else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6262for as_dir in $PATH
6263do
6264 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006265 test -z "$as_dir" && as_dir=.
6266 # Account for people who put trailing slashes in PATH elements.
6267case $as_dir/ in #((
6268 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271 /usr/ucb/* ) ;;
6272 *)
6273 # OSF1 and SCO ODT 3.0 have their own names for install.
6274 # Don't use installbsd from OSF since it installs stuff as root
6275 # by default.
6276 for ac_prog in ginstall scoinst install; do
6277 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006278 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279 if test $ac_prog = install &&
Christian Heimes32eba612021-03-19 10:29:25 +01006280 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 # AIX install. It has an incompatible calling convention.
6282 :
6283 elif test $ac_prog = install &&
Christian Heimes32eba612021-03-19 10:29:25 +01006284 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285 # program-specific install script used by HP pwplus--don't use.
6286 :
6287 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 rm -rf conftest.one conftest.two conftest.dir
6289 echo one > conftest.one
6290 echo two > conftest.two
6291 mkdir conftest.dir
Christian Heimes32eba612021-03-19 10:29:25 +01006292 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
Matthias Kloseb9621712010-04-24 17:59:49 +00006293 test -s conftest.one && test -s conftest.two &&
6294 test -s conftest.dir/conftest.one &&
6295 test -s conftest.dir/conftest.two
6296 then
Christian Heimes32eba612021-03-19 10:29:25 +01006297 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 break 3
6299 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300 fi
6301 fi
6302 done
6303 done
6304 ;;
6305esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006306
6307 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308IFS=$as_save_IFS
6309
Matthias Kloseb9621712010-04-24 17:59:49 +00006310rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311
6312fi
Christian Heimes32eba612021-03-19 10:29:25 +01006313 if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314 INSTALL=$ac_cv_path_install
6315 else
6316 # As a last resort, use the slow shell script. Don't cache a
6317 # value for INSTALL within a source directory, because that will
6318 # break other packages using the cache if that directory is
6319 # removed, or if the value is a relative name.
6320 INSTALL=$ac_install_sh
6321 fi
6322fi
Christian Heimes32eba612021-03-19 10:29:25 +01006323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6324$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
6326# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6327# It thinks the first close brace ends the variable substitution.
6328test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6329
6330test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6331
6332test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6333
Christian Heimes32eba612021-03-19 10:29:25 +01006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6335$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006336if test -z "$MKDIR_P"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006337 if ${ac_cv_path_mkdir+:} false; then :
6338 $as_echo_n "(cached) " >&6
6339else
Matthias Klose93a0ef12012-03-15 18:08:34 +01006340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6342do
6343 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006344 test -z "$as_dir" && as_dir=.
Matthias Klose93a0ef12012-03-15 18:08:34 +01006345 for ac_prog in mkdir gmkdir; do
6346 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006347 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6348 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6349 'mkdir (GNU coreutils) '* | \
6350 'mkdir (coreutils) '* | \
Matthias Klose93a0ef12012-03-15 18:08:34 +01006351 'mkdir (fileutils) '4.1*)
Christian Heimes32eba612021-03-19 10:29:25 +01006352 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
Matthias Klose93a0ef12012-03-15 18:08:34 +01006353 break 3;;
6354 esac
6355 done
6356 done
6357 done
6358IFS=$as_save_IFS
6359
6360fi
6361
6362 test -d ./--version && rmdir ./--version
Christian Heimes32eba612021-03-19 10:29:25 +01006363 if test "${ac_cv_path_mkdir+set}" = set; then
Matthias Klose93a0ef12012-03-15 18:08:34 +01006364 MKDIR_P="$ac_cv_path_mkdir -p"
6365 else
6366 # As a last resort, use the slow shell script. Don't cache a
6367 # value for MKDIR_P within a source directory, because that will
6368 # break other packages using the cache if that directory is
6369 # removed, or if the value is a relative name.
6370 MKDIR_P="$ac_install_sh -d"
6371 fi
6372fi
Christian Heimes32eba612021-03-19 10:29:25 +01006373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6374$as_echo "$MKDIR_P" >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006375
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
6377# Not every filesystem supports hard links
6378
6379if test -z "$LN" ; then
6380 case $ac_sys_system in
6381 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382 *) LN=ln;;
6383 esac
6384fi
6385
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006386# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006387
6388ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006389
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006390# Check for --with-pydebug
Christian Heimes32eba612021-03-19 10:29:25 +01006391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6392$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393
6394# Check whether --with-pydebug was given.
Christian Heimes32eba612021-03-19 10:29:25 +01006395if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396 withval=$with_pydebug;
6397if test "$withval" != no
6398then
6399
Christian Heimes32eba612021-03-19 10:29:25 +01006400$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401
Christian Heimes32eba612021-03-19 10:29:25 +01006402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006404 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006405 ABIFLAGS="${ABIFLAGS}d"
Christian Heimes32eba612021-03-19 10:29:25 +01006406else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408fi
Christian Heimes32eba612021-03-19 10:29:25 +01006409else
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412fi
6413
6414
Victor Stinnerf4e47032019-04-25 00:56:28 +02006415# Check for --with-trace-refs
6416# --with-trace-refs
Christian Heimes32eba612021-03-19 10:29:25 +01006417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6418$as_echo_n "checking for --with-trace-refs... " >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006419
6420# Check whether --with-trace-refs was given.
Christian Heimes32eba612021-03-19 10:29:25 +01006421if test "${with_trace_refs+set}" = set; then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02006422 withval=$with_trace_refs;
Christian Heimes32eba612021-03-19 10:29:25 +01006423else
Victor Stinnerf4e47032019-04-25 00:56:28 +02006424 with_trace_refs=no
6425fi
6426
Christian Heimes32eba612021-03-19 10:29:25 +01006427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6428$as_echo "$with_trace_refs" >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006429
6430if test "$with_trace_refs" = "yes"
6431then
6432
Christian Heimes32eba612021-03-19 10:29:25 +01006433$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
Victor Stinnerf4e47032019-04-25 00:56:28 +02006434
6435fi
6436
6437# Check for --with-assertions.
6438# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006439assertions='false'
Christian Heimes32eba612021-03-19 10:29:25 +01006440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6441$as_echo_n "checking for --with-assertions... " >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006442
6443# Check whether --with-assertions was given.
Christian Heimes32eba612021-03-19 10:29:25 +01006444if test "${with_assertions+set}" = set; then :
T. Woutersddbfa2c2017-05-23 01:30:49 +02006445 withval=$with_assertions;
6446if test "$withval" != no
6447then
6448 assertions='true'
6449fi
6450fi
6451
6452if test "$assertions" = 'true'; then
Christian Heimes32eba612021-03-19 10:29:25 +01006453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6454$as_echo "yes" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006455elif test "$Py_DEBUG" = 'true'; then
6456 assertions='true'
Christian Heimes32eba612021-03-19 10:29:25 +01006457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6458$as_echo "implied by --with-pydebug" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006459else
Christian Heimes32eba612021-03-19 10:29:25 +01006460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006462fi
6463
Brett Cannon63d98bc2016-09-06 17:12:40 -07006464# Enable optimization flags
6465
6466
6467Py_OPT='false'
Christian Heimes32eba612021-03-19 10:29:25 +01006468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6469$as_echo_n "checking for --enable-optimizations... " >&6; }
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006470# Check whether --enable-optimizations was given.
Christian Heimes32eba612021-03-19 10:29:25 +01006471if test "${enable_optimizations+set}" = set; then :
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006472 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006473if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006474then
6475 Py_OPT='true'
Christian Heimes32eba612021-03-19 10:29:25 +01006476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6477$as_echo "yes" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006478else
6479 Py_OPT='false'
Christian Heimes32eba612021-03-19 10:29:25 +01006480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006482fi
Christian Heimes32eba612021-03-19 10:29:25 +01006483else
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; }
Brett Cannon63d98bc2016-09-06 17:12:40 -07006486fi
6487
6488if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006489 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6490 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006491 # 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 +00006492 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006493 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006494 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006495 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006496 case $CC in
6497 *gcc*)
Christian Heimes32eba612021-03-19 10:29:25 +01006498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6499$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6500if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6501 $as_echo_n "(cached) " >&6
6502else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006503
6504 ax_check_save_flags=$CFLAGS
6505 CFLAGS="$CFLAGS -fno-semantic-interposition"
6506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6507/* end confdefs.h. */
6508
6509int
Christian Heimes32eba612021-03-19 10:29:25 +01006510main ()
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006511{
6512
6513 ;
6514 return 0;
6515}
6516_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01006517if ac_fn_c_try_compile "$LINENO"; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006518 ax_cv_check_cflags___fno_semantic_interposition=yes
Christian Heimes32eba612021-03-19 10:29:25 +01006519else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006520 ax_cv_check_cflags___fno_semantic_interposition=no
6521fi
Christian Heimes32eba612021-03-19 10:29:25 +01006522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006523 CFLAGS=$ax_check_save_flags
6524fi
Christian Heimes32eba612021-03-19 10:29:25 +01006525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6526$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6527if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006528
Pablo Galindob451b0e2020-10-21 22:46:52 +01006529 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6530 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006531
Christian Heimes32eba612021-03-19 10:29:25 +01006532else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006533 :
6534fi
6535
Pablo Galindob451b0e2020-10-21 22:46:52 +01006536 ;;
6537 esac
6538
6539
Brett Cannon63d98bc2016-09-06 17:12:40 -07006540else
6541 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006542 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006543 DEF_MAKE_RULE="all"
6544fi
6545
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006546
Christian Heimes32eba612021-03-19 10:29:25 +01006547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6548$as_echo_n "checking PROFILE_TASK... " >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006549if test -z "$PROFILE_TASK"
6550then
Victor Stinner67900052021-01-27 11:16:15 +01006551 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006552fi
Christian Heimes32eba612021-03-19 10:29:25 +01006553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6554$as_echo "$PROFILE_TASK" >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006555
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006556# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6557# normal names in the default $PATH (ie: Ubuntu). They exist under the
6558# non-suffixed name in their versioned llvm directory.
6559
6560llvm_bin_dir=''
6561llvm_path="${PATH}"
6562if test "${CC}" = "clang"
6563then
6564 clang_bin=`which clang`
6565 # Some systems install clang elsewhere as a symlink to the real path
6566 # which is where the related llvm tools are located.
6567 if test -L "${clang_bin}"
6568 then
6569 clang_dir=`dirname "${clang_bin}"`
6570 clang_bin=`readlink "${clang_bin}"`
6571 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6572 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6573 fi
6574fi
6575
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006576# Enable LTO flags
Christian Heimes32eba612021-03-19 10:29:25 +01006577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6578$as_echo_n "checking for --with-lto... " >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006579
6580# Check whether --with-lto was given.
Christian Heimes32eba612021-03-19 10:29:25 +01006581if test "${with_lto+set}" = set; then :
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006582 withval=$with_lto;
6583if test "$withval" != no
6584then
6585 Py_LTO='true'
Christian Heimes32eba612021-03-19 10:29:25 +01006586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6587$as_echo "yes" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006588else
6589 Py_LTO='false'
Christian Heimes32eba612021-03-19 10:29:25 +01006590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006592fi
Christian Heimes32eba612021-03-19 10:29:25 +01006593else
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6595$as_echo "no" >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006596fi
6597
6598if test "$Py_LTO" = 'true' ; then
6599 case $CC in
6600 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006601
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006602 if test -n "$ac_tool_prefix"; then
6603 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6604set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01006605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6606$as_echo_n "checking for $ac_word... " >&6; }
6607if ${ac_cv_path_LLVM_AR+:} false; then :
6608 $as_echo_n "(cached) " >&6
6609else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006610 case $LLVM_AR in
6611 [\\/]* | ?:[\\/]*)
6612 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6613 ;;
6614 *)
6615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6616for as_dir in ${llvm_path}
6617do
6618 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006619 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006620 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6622 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006624 break 2
6625 fi
6626done
6627 done
6628IFS=$as_save_IFS
6629
6630 ;;
6631esac
6632fi
6633LLVM_AR=$ac_cv_path_LLVM_AR
6634if test -n "$LLVM_AR"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6636$as_echo "$LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006637else
Christian Heimes32eba612021-03-19 10:29:25 +01006638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6639$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006640fi
6641
6642
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006643fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006644if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006645 ac_pt_LLVM_AR=$LLVM_AR
6646 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006647set dummy llvm-ar; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01006648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6649$as_echo_n "checking for $ac_word... " >&6; }
6650if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6651 $as_echo_n "(cached) " >&6
6652else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006653 case $ac_pt_LLVM_AR in
6654 [\\/]* | ?:[\\/]*)
6655 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6656 ;;
6657 *)
6658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6659for as_dir in ${llvm_path}
6660do
6661 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006662 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006663 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6665 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006667 break 2
6668 fi
6669done
6670 done
6671IFS=$as_save_IFS
6672
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006673 ;;
6674esac
6675fi
6676ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6677if test -n "$ac_pt_LLVM_AR"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6679$as_echo "$ac_pt_LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006680else
Christian Heimes32eba612021-03-19 10:29:25 +01006681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6682$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006683fi
6684
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006685 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006686 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006687 else
6688 case $cross_compiling:$ac_tool_warned in
6689yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01006690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006692ac_tool_warned=yes ;;
6693esac
6694 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006695 fi
6696else
6697 LLVM_AR="$ac_cv_path_LLVM_AR"
6698fi
6699
6700
6701 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6702 then
6703 LLVM_AR_FOUND="found"
6704 else
6705 LLVM_AR_FOUND="not-found"
6706 fi
6707 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6708 then
6709 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6710 if test -n "${found_llvm_ar}"
6711 then
6712 LLVM_AR='/usr/bin/xcrun llvm-ar'
6713 LLVM_AR_FOUND=found
Christian Heimes32eba612021-03-19 10:29:25 +01006714 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6715$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006716 fi
6717 fi
6718 if test $LLVM_AR_FOUND = not-found
6719 then
6720 LLVM_PROFR_ERR=yes
6721 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6722 else
6723 LLVM_AR_ERR=no
6724 fi
6725 AR="${LLVM_AR}"
6726 case $ac_sys_system in
6727 Darwin*)
6728 # Any changes made here should be reflected in the GCC+Darwin case below
6729 LTOFLAGS="-flto -Wl,-export_dynamic"
6730 ;;
6731 *)
6732 LTOFLAGS="-flto"
6733 ;;
6734 esac
6735 ;;
6736 *gcc*)
6737 case $ac_sys_system in
6738 Darwin*)
6739 LTOFLAGS="-flto -Wl,-export_dynamic"
6740 ;;
6741 *)
6742 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6743 ;;
6744 esac
6745 ;;
6746 esac
6747
6748 if test "$ac_cv_prog_cc_g" = "yes"
6749 then
6750 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6751 # to get debug symbols.
6752 LTOFLAGS="$LTOFLAGS -g"
6753 fi
6754
stratakisf92c7aa2018-12-04 15:54:01 +01006755 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006756 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006757fi
6758
6759# Enable PGO flags.
6760
6761
6762
6763
6764
6765
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006766if test -n "$ac_tool_prefix"; then
6767 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6768set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01006769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6770$as_echo_n "checking for $ac_word... " >&6; }
6771if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6772 $as_echo_n "(cached) " >&6
6773else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006774 case $LLVM_PROFDATA in
6775 [\\/]* | ?:[\\/]*)
6776 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6777 ;;
6778 *)
6779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6780for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006781do
6782 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006783 test -z "$as_dir" && as_dir=.
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6786 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07006788 break 2
6789 fi
6790done
6791 done
6792IFS=$as_save_IFS
6793
Gregory P. Smith799520c2016-09-07 16:10:00 -07006794 ;;
6795esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006796fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006797LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6798if test -n "$LLVM_PROFDATA"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6800$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801else
Christian Heimes32eba612021-03-19 10:29:25 +01006802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6803$as_echo "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006804fi
6805
6806
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006807fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006808if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006809 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6810 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006811set dummy llvm-profdata; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +01006812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6813$as_echo_n "checking for $ac_word... " >&6; }
6814if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6815 $as_echo_n "(cached) " >&6
6816else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006817 case $ac_pt_LLVM_PROFDATA in
6818 [\\/]* | ?:[\\/]*)
6819 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6820 ;;
6821 *)
6822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6823for as_dir in ${llvm_path}
6824do
6825 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +01006826 test -z "$as_dir" && as_dir=.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006827 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +01006828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6829 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006831 break 2
6832 fi
6833done
6834 done
6835IFS=$as_save_IFS
6836
Gregory P. Smith799520c2016-09-07 16:10:00 -07006837 ;;
6838esac
6839fi
6840ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6841if test -n "$ac_pt_LLVM_PROFDATA"; then
Christian Heimes32eba612021-03-19 10:29:25 +01006842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6843$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006844else
Christian Heimes32eba612021-03-19 10:29:25 +01006845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6846$as_echo "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006847fi
6848
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006849 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006850 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006851 else
6852 case $cross_compiling:$ac_tool_warned in
6853yes:)
Christian Heimes32eba612021-03-19 10:29:25 +01006854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006856ac_tool_warned=yes ;;
6857esac
6858 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006859 fi
6860else
6861 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6862fi
6863
6864
6865if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6866then
6867 LLVM_PROF_FOUND="found"
6868else
6869 LLVM_PROF_FOUND="not-found"
6870fi
6871if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6872then
6873 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6874 if test -n "${found_llvm_profdata}"
6875 then
6876 # llvm-profdata isn't directly in $PATH in some cases.
6877 # https://apple.stackexchange.com/questions/197053/
6878 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6879 LLVM_PROF_FOUND=found
Christian Heimes32eba612021-03-19 10:29:25 +01006880 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6881$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07006882 fi
6883fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006884LLVM_PROF_ERR=no
6885case $CC in
6886 *clang*)
6887 # Any changes made here should be reflected in the GCC+Darwin case below
6888 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6889 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006890 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006891 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6892 if test $LLVM_PROF_FOUND = not-found
6893 then
6894 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006895 if test "${REQUIRE_PGO}" = "yes"
6896 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006897 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 -07006898 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006899 fi
6900 ;;
6901 *gcc*)
6902 case $ac_sys_system in
6903 Darwin*)
6904 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6905 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006906 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006907 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006908 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006909 then
6910 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006911 if test "${REQUIRE_PGO}" = "yes"
6912 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006913 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 -07006914 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006915 fi
6916 ;;
6917 *)
6918 PGO_PROF_GEN_FLAG="-fprofile-generate"
6919 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6920 LLVM_PROF_MERGER="true"
6921 LLVM_PROF_FILE=""
6922 ;;
6923 esac
6924 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006925 *icc*)
6926 PGO_PROF_GEN_FLAG="-prof-gen"
6927 PGO_PROF_USE_FLAG="-prof-use"
6928 LLVM_PROF_MERGER="true"
6929 LLVM_PROF_FILE=""
6930 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006931esac
6932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6934# merged with this chunk of code?
6935
6936# Optimizer/debugger flags
6937# ------------------------
6938# (The following bit of code is complicated enough - please keep things
6939# indented properly. Just pretend you're editing Python code. ;-)
6940
6941# There are two parallel sets of case statements below, one that checks to
6942# see if OPT was set and one that does BASECFLAGS setting based upon
6943# compiler and platform. BASECFLAGS tweaks need to be made even if the
6944# user set OPT.
6945
Victor Stinner23a683a2019-04-12 21:27:37 +02006946case $CC in
6947 *clang*)
6948 cc_is_clang=1
6949 ;;
6950 *)
6951 if $CC --version 2>&1 | grep -q clang
6952 then
6953 cc_is_clang=1
6954 else
6955 cc_is_clang=
6956 fi
6957esac
6958
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959# tweak OPT based on compiler and platform, only if the user didn't set
6960# it on the command line
6961
Victor Stinner9ed34a82017-05-02 22:35:58 +02006962
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006963if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964then
6965 case $GCC in
6966 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6968 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6969 WRAP="-fwrapv"
6970 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006971
Victor Stinner35f3d242017-04-21 12:35:24 +02006972 if test -n "${cc_is_clang}"
6973 then
6974 # Clang also needs -fwrapv
6975 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006976 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6977 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006978 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006979 fi
6980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981 case $ac_cv_prog_cc_g in
6982 yes)
6983 if test "$Py_DEBUG" = 'true' ; then
6984 # Optimization messes up debuggers, so turn it off for
6985 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006986 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006987 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006988 else
Victor Stinner28205b22017-04-21 11:24:34 +02006989 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006990 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991 else
Victor Stinner28205b22017-04-21 11:24:34 +02006992 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993 fi
6994 ;;
6995 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006996 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997 ;;
6998 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 case $ac_sys_system in
7001 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7002 ;;
7003 esac
7004 ;;
7005
7006 *)
7007 OPT="-O"
7008 ;;
7009 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010fi
7011
7012
7013
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007014
stratakiscf10a752018-12-19 18:19:01 +01007015
Ronald Oussoren41761932020-11-08 10:05:27 +01007016# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017UNIVERSAL_ARCH_FLAGS=
7018
7019
7020# tweak BASECFLAGS based on compiler and platform
7021case $GCC in
7022yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007023 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007024
Christian Heimes32eba612021-03-19 10:29:25 +01007025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7026$as_echo_n "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007027 ac_save_cc="$CC"
7028 CC="$CC -Wextra -Werror"
Christian Heimes32eba612021-03-19 10:29:25 +01007029 if ${ac_cv_extra_warnings+:} false; then :
7030 $as_echo_n "(cached) " >&6
7031else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033/* end confdefs.h. */
7034
7035
7036int
Christian Heimes32eba612021-03-19 10:29:25 +01007037main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007038{
7039
7040 ;
7041 return 0;
7042}
7043
7044_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007045if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007046
7047 ac_cv_extra_warnings=yes
7048
Christian Heimes32eba612021-03-19 10:29:25 +01007049else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007050
7051 ac_cv_extra_warnings=no
7052
7053fi
Christian Heimes32eba612021-03-19 10:29:25 +01007054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007055fi
7056
7057 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7059$as_echo "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007060
7061 if test $ac_cv_extra_warnings = yes
7062 then
7063 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7064 fi
7065
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007066 # Python doesn't violate C99 aliasing rules, but older versions of
7067 # GCC produce warnings for legal Python code. Enable
7068 # -fno-strict-aliasing on versions of GCC that support but produce
7069 # warnings. See Issue3326
Christian Heimes32eba612021-03-19 10:29:25 +01007070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7071$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007072 ac_save_cc="$CC"
7073 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007074 save_CFLAGS="$CFLAGS"
Christian Heimes32eba612021-03-19 10:29:25 +01007075 if ${ac_cv_no_strict_aliasing+:} false; then :
7076 $as_echo_n "(cached) " >&6
7077else
Matthias Kloseb9621712010-04-24 17:59:49 +00007078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007079/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007080
Matthias Kloseb159a552010-04-25 21:00:44 +00007081
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007082int
Christian Heimes32eba612021-03-19 10:29:25 +01007083main ()
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007084{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007085
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007086 ;
7087 return 0;
7088}
Matthias Kloseb159a552010-04-25 21:00:44 +00007089
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007090_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007091if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007092
7093 CC="$ac_save_cc -fstrict-aliasing"
7094 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007096/* end confdefs.h. */
7097
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007098 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007099int
Christian Heimes32eba612021-03-19 10:29:25 +01007100main ()
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007101{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007102double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007103 ;
7104 return 0;
7105}
Matthias Kloseb159a552010-04-25 21:00:44 +00007106
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007107_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007108if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007109
7110 ac_cv_no_strict_aliasing=no
7111
Christian Heimes32eba612021-03-19 10:29:25 +01007112else
Matthias Kloseb159a552010-04-25 21:00:44 +00007113
7114 ac_cv_no_strict_aliasing=yes
7115
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007116fi
Christian Heimes32eba612021-03-19 10:29:25 +01007117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007118
Christian Heimes32eba612021-03-19 10:29:25 +01007119else
Matthias Kloseb159a552010-04-25 21:00:44 +00007120
7121 ac_cv_no_strict_aliasing=no
7122
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123fi
Christian Heimes32eba612021-03-19 10:29:25 +01007124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007125fi
7126
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007127 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007128 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7130$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007131 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007132 then
7133 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7134 fi
7135
Zachary Ware5af85642015-12-21 12:09:17 -06007136 # ICC doesn't recognize the option, but only emits a warning
7137 ## XXX does it emit an unused result warning and can it be disabled?
7138 case "$CC" in
7139 *icc*)
7140 ac_cv_disable_unused_result_warning=no
7141 ;;
7142 *)
Christian Heimes32eba612021-03-19 10:29:25 +01007143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7144$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007145 ac_save_cc="$CC"
7146 CC="$CC -Wunused-result -Werror"
7147 save_CFLAGS="$CFLAGS"
Christian Heimes32eba612021-03-19 10:29:25 +01007148 if ${ac_cv_disable_unused_result_warning+:} false; then :
7149 $as_echo_n "(cached) " >&6
7150else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152/* end confdefs.h. */
7153
7154
7155int
Christian Heimes32eba612021-03-19 10:29:25 +01007156main ()
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007157{
7158
7159 ;
7160 return 0;
7161}
7162
7163_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007164if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007165
7166 ac_cv_disable_unused_result_warning=yes
7167
Christian Heimes32eba612021-03-19 10:29:25 +01007168else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007169
7170 ac_cv_disable_unused_result_warning=no
7171
7172fi
Christian Heimes32eba612021-03-19 10:29:25 +01007173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007174fi
7175
7176 CFLAGS="$save_CFLAGS"
7177 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7179$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007180 ;;
7181 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007182
7183 if test $ac_cv_disable_unused_result_warning = yes
7184 then
7185 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007186 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7187 fi
7188
Christian Heimes32eba612021-03-19 10:29:25 +01007189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7190$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007191 ac_save_cc="$CC"
7192 CC="$CC -Wunused-parameter -Werror"
Christian Heimes32eba612021-03-19 10:29:25 +01007193 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7194 $as_echo_n "(cached) " >&6
7195else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7197/* end confdefs.h. */
7198
7199
7200int
Christian Heimes32eba612021-03-19 10:29:25 +01007201main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007202{
7203
7204 ;
7205 return 0;
7206}
7207
7208_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007209if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007210
7211 ac_cv_disable_unused_parameter_warning=yes
7212
Christian Heimes32eba612021-03-19 10:29:25 +01007213else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007214
7215 ac_cv_disable_unused_parameter_warning=no
7216
7217fi
Christian Heimes32eba612021-03-19 10:29:25 +01007218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007219fi
7220
7221 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7223$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007224
7225 if test $ac_cv_disable_unused_parameter_warning = yes
7226 then
7227 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7228 fi
7229
Christian Heimes32eba612021-03-19 10:29:25 +01007230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7231$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007232 ac_save_cc="$CC"
7233 CC="$CC -Wmissing-field-initializers -Werror"
Christian Heimes32eba612021-03-19 10:29:25 +01007234 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7235 $as_echo_n "(cached) " >&6
7236else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7238/* end confdefs.h. */
7239
7240
7241int
Christian Heimes32eba612021-03-19 10:29:25 +01007242main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007243{
7244
7245 ;
7246 return 0;
7247}
7248
7249_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007250if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007251
7252 ac_cv_disable_missing_field_initializers=yes
7253
Christian Heimes32eba612021-03-19 10:29:25 +01007254else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007255
7256 ac_cv_disable_missing_field_initializers=no
7257
7258fi
Christian Heimes32eba612021-03-19 10:29:25 +01007259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007260fi
7261
7262 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7264$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007265
7266 if test $ac_cv_disable_missing_field_initializers = yes
7267 then
7268 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007269 fi
7270
Christian Heimes32eba612021-03-19 10:29:25 +01007271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7272$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007273 ac_save_cc="$CC"
7274 CC="$CC -Wsign-compare"
7275 save_CFLAGS="$CFLAGS"
Christian Heimes32eba612021-03-19 10:29:25 +01007276 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7277 $as_echo_n "(cached) " >&6
7278else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7280/* end confdefs.h. */
7281
7282
7283int
Christian Heimes32eba612021-03-19 10:29:25 +01007284main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007285{
7286
7287 ;
7288 return 0;
7289}
7290
7291_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007292if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007293
7294 ac_cv_enable_sign_compare_warning=yes
7295
Christian Heimes32eba612021-03-19 10:29:25 +01007296else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007297
7298 ac_cv_enable_sign_compare_warning=no
7299
7300fi
Christian Heimes32eba612021-03-19 10:29:25 +01007301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007302fi
7303
7304 CFLAGS="$save_CFLAGS"
7305 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7307$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007308
7309 if test $ac_cv_enable_sign_compare_warning = yes
7310 then
7311 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7312 fi
7313
Christian Heimes32eba612021-03-19 10:29:25 +01007314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7315$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007316 ac_save_cc="$CC"
7317 CC="$CC -Wunreachable-code"
7318 save_CFLAGS="$CFLAGS"
Christian Heimes32eba612021-03-19 10:29:25 +01007319 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7320 $as_echo_n "(cached) " >&6
7321else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323/* end confdefs.h. */
7324
7325
7326int
Christian Heimes32eba612021-03-19 10:29:25 +01007327main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007328{
7329
7330 ;
7331 return 0;
7332}
7333
7334_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007335if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007336
7337 ac_cv_enable_unreachable_code_warning=yes
7338
Christian Heimes32eba612021-03-19 10:29:25 +01007339else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007340
7341 ac_cv_enable_unreachable_code_warning=no
7342
7343fi
Christian Heimes32eba612021-03-19 10:29:25 +01007344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007345fi
7346
7347 CFLAGS="$save_CFLAGS"
7348 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007349
7350 # Don't enable unreachable code warning in debug mode, since it usually
7351 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007352 # Issue #24324: Unfortunately, the unreachable code warning does not work
7353 # correctly on gcc and has been silently removed from the compiler.
7354 # It is supported on clang but on OS X systems gcc may be an alias
7355 # for clang. Try to determine if the compiler is not really gcc and,
7356 # if so, only then enable the warning.
7357 if test $ac_cv_enable_unreachable_code_warning = yes && \
7358 test "$Py_DEBUG" != "true" && \
7359 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007360 then
7361 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007362 else
7363 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007364 fi
Christian Heimes32eba612021-03-19 10:29:25 +01007365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7366$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007367
Christian Heimes32eba612021-03-19 10:29:25 +01007368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7369$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007370 ac_save_cc="$CC"
7371 CC="$CC -Werror -Wstrict-prototypes"
Christian Heimes32eba612021-03-19 10:29:25 +01007372 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7373 $as_echo_n "(cached) " >&6
7374else
INADA Naokie3364842018-06-05 20:40:53 +09007375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376/* end confdefs.h. */
7377
7378
7379int
Christian Heimes32eba612021-03-19 10:29:25 +01007380main ()
INADA Naokie3364842018-06-05 20:40:53 +09007381{
7382
7383 ;
7384 return 0;
7385}
7386
7387_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007388if ac_fn_c_try_compile "$LINENO"; then :
INADA Naokie3364842018-06-05 20:40:53 +09007389
7390 ac_cv_enable_strict_prototypes_warning=yes
7391
Christian Heimes32eba612021-03-19 10:29:25 +01007392else
INADA Naokie3364842018-06-05 20:40:53 +09007393
7394 ac_cv_enable_strict_prototypes_warning=no
7395
7396fi
Christian Heimes32eba612021-03-19 10:29:25 +01007397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09007398fi
7399
7400 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7402$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007403
7404 if test $ac_cv_enable_strict_prototypes_warning = yes
7405 then
7406 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7407 fi
7408
Christian Heimes32eba612021-03-19 10:29:25 +01007409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7410$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007411 ac_save_cc="$CC"
7412 CC="$CC -Werror=implicit-function-declaration"
Christian Heimes32eba612021-03-19 10:29:25 +01007413 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7414 $as_echo_n "(cached) " >&6
7415else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417/* end confdefs.h. */
7418
7419
7420int
Christian Heimes32eba612021-03-19 10:29:25 +01007421main ()
Victor Stinner193ee0a2017-02-06 14:24:00 +01007422{
7423
7424 ;
7425 return 0;
7426}
7427
7428_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007429if ac_fn_c_try_compile "$LINENO"; then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01007430
7431 ac_cv_enable_implicit_function_declaration_error=yes
7432
Christian Heimes32eba612021-03-19 10:29:25 +01007433else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007434
7435 ac_cv_enable_implicit_function_declaration_error=no
7436
7437fi
Christian Heimes32eba612021-03-19 10:29:25 +01007438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01007439fi
7440
7441 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7443$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007444
7445 if test $ac_cv_enable_implicit_function_declaration_error = yes
7446 then
7447 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7448 fi
7449
Christian Heimes32eba612021-03-19 10:29:25 +01007450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7451$as_echo_n "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007452 ac_save_cc="$CC"
7453 CC="$CC -fvisibility=hidden"
Christian Heimes32eba612021-03-19 10:29:25 +01007454 if ${ac_cv_enable_visibility+:} false; then :
7455 $as_echo_n "(cached) " >&6
7456else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7458/* end confdefs.h. */
7459
7460
7461int
Christian Heimes32eba612021-03-19 10:29:25 +01007462main ()
Vinay Sajip0b60f642019-10-15 08:26:12 +01007463{
7464
7465 ;
7466 return 0;
7467}
7468
7469_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007470if ac_fn_c_try_compile "$LINENO"; then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01007471
7472 ac_cv_enable_visibility=yes
7473
Christian Heimes32eba612021-03-19 10:29:25 +01007474else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007475
7476 ac_cv_enable_visibility=no
7477
7478fi
Christian Heimes32eba612021-03-19 10:29:25 +01007479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01007480fi
7481
7482 CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +01007483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7484$as_echo "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007485
7486 if test $ac_cv_enable_visibility = yes
7487 then
7488 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7489 fi
7490
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7492 # support. Without this, treatment of subnormals doesn't follow
7493 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007494 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495 alpha*)
7496 BASECFLAGS="$BASECFLAGS -mieee"
7497 ;;
7498 esac
7499
7500 case $ac_sys_system in
7501 SCO_SV*)
7502 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7503 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007504
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 Darwin*)
7506 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7507 # used to be here, but non-Apple gcc doesn't accept them.
7508 if test "${CC}" = gcc
7509 then
Christian Heimes32eba612021-03-19 10:29:25 +01007510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
7511$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007512 case "${UNIVERSALSDK}" in
7513 */MacOSX10.4u.sdk)
7514 # Build using 10.4 SDK, force usage of gcc when the
7515 # compiler is gcc, otherwise the user will get very
7516 # confusing error messages when building on OSX 10.6
7517 CC=gcc-4.0
7518 CPP=cpp-4.0
7519 ;;
7520 esac
Christian Heimes32eba612021-03-19 10:29:25 +01007521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7522$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007523 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524
Ned Deily87adb6e2013-10-18 21:09:56 -07007525 if test "${enable_universalsdk}"
7526 then
7527 case "$UNIVERSAL_ARCHS" in
7528 32-bit)
7529 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7530 LIPO_32BIT_FLAGS=""
7531 ARCH_RUN_32BIT=""
7532 ;;
7533 64-bit)
7534 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7535 LIPO_32BIT_FLAGS=""
7536 ARCH_RUN_32BIT="true"
7537 ;;
7538 all)
7539 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7540 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7541 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7542 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007543 universal2)
7544 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7545 LIPO_32BIT_FLAGS=""
7546 ARCH_RUN_32BIT="true"
7547 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007548 intel)
7549 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7550 LIPO_32BIT_FLAGS="-extract i386"
7551 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7552 ;;
7553 intel-32)
7554 UNIVERSAL_ARCH_FLAGS="-arch i386"
7555 LIPO_32BIT_FLAGS=""
7556 ARCH_RUN_32BIT=""
7557 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007558 intel-64)
7559 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7560 LIPO_32BIT_FLAGS=""
7561 ARCH_RUN_32BIT="true"
7562 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007563 3-way)
7564 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7565 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7566 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7567 ;;
7568 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007569 as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007570 ;;
7571 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572
Ned Deily87adb6e2013-10-18 21:09:56 -07007573 if test "${UNIVERSALSDK}" != "/"
7574 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007575 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7576 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007577 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007578 else
7579 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7580 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007581 fi
7582 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583
Ned Deily87adb6e2013-10-18 21:09:56 -07007584 # Calculate an appropriate deployment target for this build:
7585 # The deployment target value is used explicitly to enable certain
7586 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007587 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007588 # component of the string returned by distutils.get_platform().
7589 #
7590 # Use the value from:
7591 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7592 # 2. the operating system version of the build machine if >= 10.6
7593 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7594 # below to pick either 10.3, 10.4, or 10.5 as the target.
7595 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596
Christian Heimes32eba612021-03-19 10:29:25 +01007597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7598$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007599 cur_target_major=`sw_vers -productVersion | \
7600 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7601 cur_target_minor=`sw_vers -productVersion | \
7602 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7603 cur_target="${cur_target_major}.${cur_target_minor}"
7604 if test ${cur_target_major} -eq 10 && \
7605 test ${cur_target_minor} -ge 3 && \
7606 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007607 then
Ned Deily36820b62014-06-25 13:44:22 -07007608 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007609 cur_target=10.3
7610 if test ${enable_universalsdk}
7611 then
7612 case "$UNIVERSAL_ARCHS" in
7613 all|3-way|intel|64-bit)
7614 # These configurations were first supported in 10.5
7615 cur_target='10.5'
7616 ;;
7617 esac
7618 else
7619 if test `/usr/bin/arch` = "i386"
7620 then
7621 # 10.4 was the first release to support Intel archs
7622 cur_target="10.4"
7623 fi
7624 fi
7625 fi
7626 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007627
Ned Deily87adb6e2013-10-18 21:09:56 -07007628 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7629 # environment with a value that is the same as what we'll use
7630 # in the Makefile to ensure that we'll get the same compiler
7631 # environment during configure and build time.
7632 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7633 export MACOSX_DEPLOYMENT_TARGET
7634 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Christian Heimes32eba612021-03-19 10:29:25 +01007635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7636$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007637
Christian Heimes32eba612021-03-19 10:29:25 +01007638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7639$as_echo_n "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7641/* end confdefs.h. */
7642#include <stdio.h>
7643int
Christian Heimes32eba612021-03-19 10:29:25 +01007644main ()
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007645{
7646printf("%d", 42);
7647 ;
7648 return 0;
7649}
7650_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007651if ac_fn_c_try_link "$LINENO"; then :
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7653$as_echo "yes" >&6; }
7654else
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7656$as_echo "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007657 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7658
7659fi
Christian Heimes32eba612021-03-19 10:29:25 +01007660rm -f core conftest.err conftest.$ac_objext \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007661 conftest$ac_exeext conftest.$ac_ext
7662
Ned Deily87adb6e2013-10-18 21:09:56 -07007663 # end of Darwin* tests
7664 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665 esac
7666 ;;
7667
7668*)
7669 case $ac_sys_system in
7670 OpenUNIX*|UnixWare*)
7671 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7672 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673 SCO_SV*)
7674 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7675 ;;
7676 esac
7677 ;;
7678esac
7679
Zachary Ware5af85642015-12-21 12:09:17 -06007680case "$CC" in
7681*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007682 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007683 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7684 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007685*xlc*)
7686 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7687 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007688esac
7689
T. Woutersddbfa2c2017-05-23 01:30:49 +02007690if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691 :
7692else
7693 OPT="-DNDEBUG $OPT"
7694fi
7695
7696if test "$ac_arch_flags"
7697then
7698 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7699fi
7700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701# On some compilers, pthreads are available without further options
7702# (e.g. MacOS X). On some of these systems, the compiler will not
7703# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7704# So we have to see first whether pthreads are available without
7705# options before we can check whether -Kpthread improves anything.
Christian Heimes32eba612021-03-19 10:29:25 +01007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7707$as_echo_n "checking whether pthreads are available without options... " >&6; }
7708if ${ac_cv_pthread_is_default+:} false; then :
7709 $as_echo_n "(cached) " >&6
7710else
7711 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712 ac_cv_pthread_is_default=no
Christian Heimes32eba612021-03-19 10:29:25 +01007713else
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715/* end confdefs.h. */
7716
Stefan Krah7dba5942012-11-22 22:49:11 +01007717#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718#include <pthread.h>
7719
7720void* routine(void* p){return NULL;}
7721
7722int main(){
7723 pthread_t p;
7724 if(pthread_create(&p,NULL,routine,NULL)!=0)
7725 return 1;
7726 (void)pthread_detach(p);
7727 return 0;
7728}
7729
7730_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007731if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732
7733 ac_cv_pthread_is_default=yes
7734 ac_cv_kthread=no
7735 ac_cv_pthread=no
7736
Christian Heimes32eba612021-03-19 10:29:25 +01007737else
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742fi
7743
7744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745fi
7746
Christian Heimes32eba612021-03-19 10:29:25 +01007747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7748$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749
7750
7751if test $ac_cv_pthread_is_default = yes
7752then
7753 ac_cv_kpthread=no
7754else
7755# -Kpthread, if available, provides the right #defines
7756# and linker options to make pthread_create available
7757# Some compilers won't report that they do not support -Kpthread,
7758# so we need to run a program to see whether it really made the
7759# function available.
Christian Heimes32eba612021-03-19 10:29:25 +01007760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7761$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
7762if ${ac_cv_kpthread+:} false; then :
7763 $as_echo_n "(cached) " >&6
7764else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765 ac_save_cc="$CC"
7766CC="$CC -Kpthread"
Christian Heimes32eba612021-03-19 10:29:25 +01007767if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768 ac_cv_kpthread=no
Christian Heimes32eba612021-03-19 10:29:25 +01007769else
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771/* end confdefs.h. */
7772
Stefan Krah7dba5942012-11-22 22:49:11 +01007773#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774#include <pthread.h>
7775
7776void* routine(void* p){return NULL;}
7777
7778int main(){
7779 pthread_t p;
7780 if(pthread_create(&p,NULL,routine,NULL)!=0)
7781 return 1;
7782 (void)pthread_detach(p);
7783 return 0;
7784}
7785
7786_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007788 ac_cv_kpthread=yes
Christian Heimes32eba612021-03-19 10:29:25 +01007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794fi
7795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796CC="$ac_save_cc"
7797fi
7798
Christian Heimes32eba612021-03-19 10:29:25 +01007799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7800$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801fi
7802
7803if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7804then
7805# -Kthread, if available, provides the right #defines
7806# and linker options to make pthread_create available
7807# Some compilers won't report that they do not support -Kthread,
7808# so we need to run a program to see whether it really made the
7809# function available.
Christian Heimes32eba612021-03-19 10:29:25 +01007810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7811$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
7812if ${ac_cv_kthread+:} false; then :
7813 $as_echo_n "(cached) " >&6
7814else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007815 ac_save_cc="$CC"
7816CC="$CC -Kthread"
Christian Heimes32eba612021-03-19 10:29:25 +01007817if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818 ac_cv_kthread=no
Christian Heimes32eba612021-03-19 10:29:25 +01007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821/* end confdefs.h. */
7822
Stefan Krah7dba5942012-11-22 22:49:11 +01007823#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824#include <pthread.h>
7825
7826void* routine(void* p){return NULL;}
7827
7828int main(){
7829 pthread_t p;
7830 if(pthread_create(&p,NULL,routine,NULL)!=0)
7831 return 1;
7832 (void)pthread_detach(p);
7833 return 0;
7834}
7835
7836_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007837if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007838 ac_cv_kthread=yes
Christian Heimes32eba612021-03-19 10:29:25 +01007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844fi
7845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846CC="$ac_save_cc"
7847fi
7848
Christian Heimes32eba612021-03-19 10:29:25 +01007849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7850$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851fi
7852
7853if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7854then
7855# -pthread, if available, provides the right #defines
7856# and linker options to make pthread_create available
7857# Some compilers won't report that they do not support -pthread,
7858# so we need to run a program to see whether it really made the
7859# function available.
Christian Heimes32eba612021-03-19 10:29:25 +01007860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7861$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
7862if ${ac_cv_pthread+:} false; then :
7863 $as_echo_n "(cached) " >&6
7864else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865 ac_save_cc="$CC"
7866CC="$CC -pthread"
Christian Heimes32eba612021-03-19 10:29:25 +01007867if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868 ac_cv_pthread=no
Christian Heimes32eba612021-03-19 10:29:25 +01007869else
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007871/* end confdefs.h. */
7872
Stefan Krah7dba5942012-11-22 22:49:11 +01007873#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007874#include <pthread.h>
7875
7876void* routine(void* p){return NULL;}
7877
7878int main(){
7879 pthread_t p;
7880 if(pthread_create(&p,NULL,routine,NULL)!=0)
7881 return 1;
7882 (void)pthread_detach(p);
7883 return 0;
7884}
7885
7886_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01007887if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007888 ac_cv_pthread=yes
Christian Heimes32eba612021-03-19 10:29:25 +01007889else
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007894fi
7895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007896CC="$ac_save_cc"
7897fi
7898
Christian Heimes32eba612021-03-19 10:29:25 +01007899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7900$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007901fi
7902
7903# If we have set a CC compiler flag for thread support then
7904# check if it works for CXX, too.
7905ac_cv_cxx_thread=no
7906if test ! -z "$CXX"
7907then
Christian Heimes32eba612021-03-19 10:29:25 +01007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7909$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007910ac_save_cxx="$CXX"
7911
7912if test "$ac_cv_kpthread" = "yes"
7913then
7914 CXX="$CXX -Kpthread"
7915 ac_cv_cxx_thread=yes
7916elif test "$ac_cv_kthread" = "yes"
7917then
7918 CXX="$CXX -Kthread"
7919 ac_cv_cxx_thread=yes
7920elif test "$ac_cv_pthread" = "yes"
7921then
7922 CXX="$CXX -pthread"
7923 ac_cv_cxx_thread=yes
7924fi
7925
7926if test $ac_cv_cxx_thread = yes
7927then
7928 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7929 $CXX -c conftest.$ac_ext 2>&5
7930 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7931 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7932 then
7933 ac_cv_cxx_thread=yes
7934 else
7935 ac_cv_cxx_thread=no
7936 fi
7937 rm -fr conftest*
7938fi
Christian Heimes32eba612021-03-19 10:29:25 +01007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7940$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941fi
7942CXX="$ac_save_cxx"
7943
7944
7945# checks for header files
Christian Heimes32eba612021-03-19 10:29:25 +01007946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7947$as_echo_n "checking for ANSI C header files... " >&6; }
7948if ${ac_cv_header_stdc+:} false; then :
7949 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007950else
Christian Heimes32eba612021-03-19 10:29:25 +01007951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7952/* end confdefs.h. */
7953#include <stdlib.h>
7954#include <stdarg.h>
7955#include <string.h>
7956#include <float.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007957
Christian Heimes32eba612021-03-19 10:29:25 +01007958int
7959main ()
7960{
Pablo Galindocc128882021-03-01 16:47:53 +00007961
Christian Heimes32eba612021-03-19 10:29:25 +01007962 ;
7963 return 0;
7964}
7965_ACEOF
7966if ac_fn_c_try_compile "$LINENO"; then :
7967 ac_cv_header_stdc=yes
7968else
7969 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007970fi
Christian Heimes32eba612021-03-19 10:29:25 +01007971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007972
Christian Heimes32eba612021-03-19 10:29:25 +01007973if test $ac_cv_header_stdc = yes; then
7974 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7976/* end confdefs.h. */
7977#include <string.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007978
Christian Heimes32eba612021-03-19 10:29:25 +01007979_ACEOF
7980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7981 $EGREP "memchr" >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007982
Christian Heimes32eba612021-03-19 10:29:25 +01007983else
7984 ac_cv_header_stdc=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007985fi
Christian Heimes32eba612021-03-19 10:29:25 +01007986rm -f conftest*
Martin v. Löwis11437992002-04-12 09:54:03 +00007987
Pablo Galindocc128882021-03-01 16:47:53 +00007988fi
Pablo Galindocc128882021-03-01 16:47:53 +00007989
Christian Heimes32eba612021-03-19 10:29:25 +01007990if test $ac_cv_header_stdc = yes; then
7991 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7993/* end confdefs.h. */
7994#include <stdlib.h>
Pablo Galindocc128882021-03-01 16:47:53 +00007995
Christian Heimes32eba612021-03-19 10:29:25 +01007996_ACEOF
7997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7998 $EGREP "free" >/dev/null 2>&1; then :
Pablo Galindocc128882021-03-01 16:47:53 +00007999
Christian Heimes32eba612021-03-19 10:29:25 +01008000else
8001 ac_cv_header_stdc=no
Pablo Galindocc128882021-03-01 16:47:53 +00008002fi
Christian Heimes32eba612021-03-19 10:29:25 +01008003rm -f conftest*
Pablo Galindocc128882021-03-01 16:47:53 +00008004
8005fi
Pablo Galindocc128882021-03-01 16:47:53 +00008006
Christian Heimes32eba612021-03-19 10:29:25 +01008007if test $ac_cv_header_stdc = yes; then
8008 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8009 if test "$cross_compiling" = yes; then :
8010 :
8011else
8012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8013/* end confdefs.h. */
8014#include <ctype.h>
8015#include <stdlib.h>
8016#if ((' ' & 0x0FF) == 0x020)
8017# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8018# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8019#else
8020# define ISLOWER(c) \
8021 (('a' <= (c) && (c) <= 'i') \
8022 || ('j' <= (c) && (c) <= 'r') \
8023 || ('s' <= (c) && (c) <= 'z'))
8024# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8025#endif
Pablo Galindocc128882021-03-01 16:47:53 +00008026
Christian Heimes32eba612021-03-19 10:29:25 +01008027#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8028int
8029main ()
8030{
8031 int i;
8032 for (i = 0; i < 256; i++)
8033 if (XOR (islower (i), ISLOWER (i))
8034 || toupper (i) != TOUPPER (i))
8035 return 2;
8036 return 0;
8037}
8038_ACEOF
8039if ac_fn_c_try_run "$LINENO"; then :
Pablo Galindocc128882021-03-01 16:47:53 +00008040
Christian Heimes32eba612021-03-19 10:29:25 +01008041else
8042 ac_cv_header_stdc=no
Pablo Galindocc128882021-03-01 16:47:53 +00008043fi
Christian Heimes32eba612021-03-19 10:29:25 +01008044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +00008046fi
Pablo Galindocc128882021-03-01 16:47:53 +00008047
8048fi
Pablo Galindocc128882021-03-01 16:47:53 +00008049fi
Christian Heimes32eba612021-03-19 10:29:25 +01008050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8051$as_echo "$ac_cv_header_stdc" >&6; }
8052if test $ac_cv_header_stdc = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00008053
Christian Heimes32eba612021-03-19 10:29:25 +01008054$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Pablo Galindocc128882021-03-01 16:47:53 +00008055
8056fi
Pablo Galindocc128882021-03-01 16:47:53 +00008057
Christian Heimes32eba612021-03-19 10:29:25 +01008058for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
8059fcntl.h grp.h \
8060ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
8061sched.h shadow.h signal.h stropts.h termios.h \
8062utime.h \
8063poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
8064sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
8065sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
8066sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
8067sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
8068sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
8069libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
8070linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
8071sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8072sys/mman.h sys/eventfd.h
8073do :
8074 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8075ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8076if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8077 cat >>confdefs.h <<_ACEOF
8078#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8079_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008080
8081fi
Pablo Galindocc128882021-03-01 16:47:53 +00008082
Christian Heimes32eba612021-03-19 10:29:25 +01008083done
Guido van Rossum627b2d71993-12-24 10:39:16 +00008084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008085ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008086for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Christian Heimes32eba612021-03-19 10:29:25 +01008087 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8089$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8090if eval \${$as_ac_Header+:} false; then :
8091 $as_echo_n "(cached) " >&6
8092else
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008095#include <sys/types.h>
8096#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008097
Martin v. Löwis11437992002-04-12 09:54:03 +00008098int
Christian Heimes32eba612021-03-19 10:29:25 +01008099main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008100{
8101if ((DIR *) 0)
8102return 0;
8103 ;
8104 return 0;
8105}
8106_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01008107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 eval "$as_ac_Header=yes"
Christian Heimes32eba612021-03-19 10:29:25 +01008109else
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008111fi
Christian Heimes32eba612021-03-19 10:29:25 +01008112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008114eval ac_res=\$$as_ac_Header
Christian Heimes32eba612021-03-19 10:29:25 +01008115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8116$as_echo "$ac_res" >&6; }
8117if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 cat >>confdefs.h <<_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01008119#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008120_ACEOF
8121
8122ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008124
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008125done
8126# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8127if test $ac_header_dirent = dirent.h; then
Christian Heimes32eba612021-03-19 10:29:25 +01008128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8129$as_echo_n "checking for library containing opendir... " >&6; }
8130if ${ac_cv_search_opendir+:} false; then :
8131 $as_echo_n "(cached) " >&6
8132else
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137/* Override any GCC internal prototype to avoid an error.
8138 Use char because int might match the return type of a GCC
8139 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +01008140#ifdef __cplusplus
8141extern "C"
8142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008143char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008144int
Christian Heimes32eba612021-03-19 10:29:25 +01008145main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ;
8149 return 0;
8150}
8151_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01008152for ac_lib in '' dir; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 if test -z "$ac_lib"; then
8154 ac_res="none required"
8155 else
8156 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008157 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 fi
Christian Heimes32eba612021-03-19 10:29:25 +01008159 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008161fi
Christian Heimes32eba612021-03-19 10:29:25 +01008162rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 conftest$ac_exeext
Christian Heimes32eba612021-03-19 10:29:25 +01008164 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167done
Christian Heimes32eba612021-03-19 10:29:25 +01008168if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008169
Christian Heimes32eba612021-03-19 10:29:25 +01008170else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171 ac_cv_search_opendir=no
8172fi
8173rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174LIBS=$ac_func_search_save_LIBS
8175fi
Christian Heimes32eba612021-03-19 10:29:25 +01008176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8177$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178ac_res=$ac_cv_search_opendir
Christian Heimes32eba612021-03-19 10:29:25 +01008179if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008183
Michael W. Hudson54241132001-12-07 15:38:26 +00008184else
Christian Heimes32eba612021-03-19 10:29:25 +01008185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8186$as_echo_n "checking for library containing opendir... " >&6; }
8187if ${ac_cv_search_opendir+:} false; then :
8188 $as_echo_n "(cached) " >&6
8189else
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194/* Override any GCC internal prototype to avoid an error.
8195 Use char because int might match the return type of a GCC
8196 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +01008197#ifdef __cplusplus
8198extern "C"
8199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008200char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008201int
Christian Heimes32eba612021-03-19 10:29:25 +01008202main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 ;
8206 return 0;
8207}
8208_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01008209for ac_lib in '' x; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 if test -z "$ac_lib"; then
8211 ac_res="none required"
8212 else
8213 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008214 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 fi
Christian Heimes32eba612021-03-19 10:29:25 +01008216 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008218fi
Christian Heimes32eba612021-03-19 10:29:25 +01008219rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 conftest$ac_exeext
Christian Heimes32eba612021-03-19 10:29:25 +01008221 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224done
Christian Heimes32eba612021-03-19 10:29:25 +01008225if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008226
Christian Heimes32eba612021-03-19 10:29:25 +01008227else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 ac_cv_search_opendir=no
8229fi
8230rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008231LIBS=$ac_func_search_save_LIBS
8232fi
Christian Heimes32eba612021-03-19 10:29:25 +01008233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8234$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235ac_res=$ac_cv_search_opendir
Christian Heimes32eba612021-03-19 10:29:25 +01008236if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008239fi
8240
8241fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008242
Christian Heimes32eba612021-03-19 10:29:25 +01008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8244$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
8245if ${ac_cv_header_sys_types_h_makedev+:} false; then :
8246 $as_echo_n "(cached) " >&6
8247else
8248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8249/* end confdefs.h. */
8250#include <sys/types.h>
8251int
8252main ()
8253{
8254return makedev(0, 0);
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259if ac_fn_c_try_link "$LINENO"; then :
8260 ac_cv_header_sys_types_h_makedev=yes
8261else
8262 ac_cv_header_sys_types_h_makedev=no
8263fi
8264rm -f core conftest.err conftest.$ac_objext \
8265 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008266
Christian Heimes32eba612021-03-19 10:29:25 +01008267fi
8268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8269$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008270
Christian Heimes32eba612021-03-19 10:29:25 +01008271if test $ac_cv_header_sys_types_h_makedev = no; then
8272ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8273if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
8274
8275$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008276
8277fi
8278
8279
Christian Heimes32eba612021-03-19 10:29:25 +01008280
8281 if test $ac_cv_header_sys_mkdev_h = no; then
8282 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
8283if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
8284
8285$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008286
8287fi
8288
Christian Heimes32eba612021-03-19 10:29:25 +01008289
8290 fi
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008291fi
8292
Michael W. Hudson54241132001-12-07 15:38:26 +00008293
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008294# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8295# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8296SAVE_CFLAGS=$CFLAGS
8297CFLAGS="-std=c99 $CFLAGS"
Christian Heimes32eba612021-03-19 10:29:25 +01008298for ac_header in bluetooth/bluetooth.h
8299do :
8300 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8301if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8302 cat >>confdefs.h <<_ACEOF
8303#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8304_ACEOF
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008305
8306fi
8307
Christian Heimes32eba612021-03-19 10:29:25 +01008308done
8309
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008310CFLAGS=$SAVE_CFLAGS
8311
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008312# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Christian Heimes32eba612021-03-19 10:29:25 +01008313for ac_header in net/if.h
8314do :
8315 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008316#ifdef STDC_HEADERS
8317# include <stdlib.h>
8318# include <stddef.h>
8319#else
8320# ifdef HAVE_STDLIB_H
8321# include <stdlib.h>
8322# endif
8323#endif
8324#ifdef HAVE_SYS_SOCKET_H
8325# include <sys/socket.h>
8326#endif
8327
8328"
Christian Heimes32eba612021-03-19 10:29:25 +01008329if test "x$ac_cv_header_net_if_h" = xyes; then :
8330 cat >>confdefs.h <<_ACEOF
8331#define HAVE_NET_IF_H 1
8332_ACEOF
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008333
8334fi
8335
Christian Heimes32eba612021-03-19 10:29:25 +01008336done
8337
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008338
Martin v. Löwis11017b12006-01-14 18:12:57 +00008339# On Linux, netlink.h requires asm/types.h
Christian Heimes32eba612021-03-19 10:29:25 +01008340for ac_header in linux/netlink.h
8341do :
8342 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 +00008343#ifdef HAVE_ASM_TYPES_H
8344#include <asm/types.h>
8345#endif
8346#ifdef HAVE_SYS_SOCKET_H
8347#include <sys/socket.h>
8348#endif
8349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350"
Christian Heimes32eba612021-03-19 10:29:25 +01008351if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
8352 cat >>confdefs.h <<_ACEOF
8353#define HAVE_LINUX_NETLINK_H 1
8354_ACEOF
Martin v. Löwis11017b12006-01-14 18:12:57 +00008355
8356fi
8357
Christian Heimes32eba612021-03-19 10:29:25 +01008358done
8359
Martin v. Löwis11017b12006-01-14 18:12:57 +00008360
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008361# On Linux, qrtr.h requires asm/types.h
Christian Heimes32eba612021-03-19 10:29:25 +01008362for ac_header in linux/qrtr.h
8363do :
8364 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008365#ifdef HAVE_ASM_TYPES_H
8366#include <asm/types.h>
8367#endif
8368#ifdef HAVE_SYS_SOCKET_H
8369#include <sys/socket.h>
8370#endif
8371
8372"
Christian Heimes32eba612021-03-19 10:29:25 +01008373if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8374 cat >>confdefs.h <<_ACEOF
8375#define HAVE_LINUX_QRTR_H 1
8376_ACEOF
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008377
8378fi
8379
Christian Heimes32eba612021-03-19 10:29:25 +01008380done
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008381
Christian Heimes32eba612021-03-19 10:29:25 +01008382
8383for ac_header in linux/vm_sockets.h
8384do :
8385 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04008386#ifdef HAVE_SYS_SOCKET_H
8387#include <sys/socket.h>
8388#endif
8389
8390"
Christian Heimes32eba612021-03-19 10:29:25 +01008391if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8392 cat >>confdefs.h <<_ACEOF
8393#define HAVE_LINUX_VM_SOCKETS_H 1
8394_ACEOF
caaveryeffc12f2017-09-06 18:18:10 -04008395
8396fi
8397
Christian Heimes32eba612021-03-19 10:29:25 +01008398done
8399
caaveryeffc12f2017-09-06 18:18:10 -04008400
karl ding360371f2020-04-29 15:31:19 -07008401# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Christian Heimes32eba612021-03-19 10:29:25 +01008402for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
8403do :
8404 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8405ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
Charles-François Natali47413c12011-10-06 19:47:44 +02008406#ifdef HAVE_SYS_SOCKET_H
8407#include <sys/socket.h>
8408#endif
8409
8410"
Christian Heimes32eba612021-03-19 10:29:25 +01008411if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8412 cat >>confdefs.h <<_ACEOF
8413#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8414_ACEOF
Charles-François Natali47413c12011-10-06 19:47:44 +02008415
8416fi
8417
Christian Heimes32eba612021-03-19 10:29:25 +01008418done
Charles-François Natali47413c12011-10-06 19:47:44 +02008419
8420
Guido van Rossum627b2d71993-12-24 10:39:16 +00008421# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008422was_it_defined=no
Christian Heimes32eba612021-03-19 10:29:25 +01008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8424$as_echo_n "checking for clock_t in time.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008427#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
8429_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +01008431 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008432 was_it_defined=yes
Christian Heimes32eba612021-03-19 10:29:25 +01008433else
Martin v. Löwis11437992002-04-12 09:54:03 +00008434
8435
Christian Heimes32eba612021-03-19 10:29:25 +01008436$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008437
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008438
Guido van Rossum627b2d71993-12-24 10:39:16 +00008439fi
Christian Heimes32eba612021-03-19 10:29:25 +01008440rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008441
Christian Heimes32eba612021-03-19 10:29:25 +01008442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8443$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008444
Christian Heimes32eba612021-03-19 10:29:25 +01008445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8446$as_echo_n "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008448/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008449
Jesus Cea740f53a2010-04-28 11:35:30 +00008450#if defined(MAJOR_IN_MKDEV)
8451#include <sys/mkdev.h>
8452#elif defined(MAJOR_IN_SYSMACROS)
8453#include <sys/sysmacros.h>
8454#else
8455#include <sys/types.h>
8456#endif
8457
Neal Norwitz11690112002-07-30 01:08:28 +00008458int
Christian Heimes32eba612021-03-19 10:29:25 +01008459main ()
Neal Norwitz11690112002-07-30 01:08:28 +00008460{
Jesus Cea740f53a2010-04-28 11:35:30 +00008461
8462 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008463 ;
8464 return 0;
8465}
Matthias Kloseb159a552010-04-25 21:00:44 +00008466
Neal Norwitz11690112002-07-30 01:08:28 +00008467_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01008468if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008469 ac_cv_has_makedev=yes
Christian Heimes32eba612021-03-19 10:29:25 +01008470else
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008472fi
Christian Heimes32eba612021-03-19 10:29:25 +01008473rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +01008475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8476$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008477if test "$ac_cv_has_makedev" = "yes"; then
8478
Christian Heimes32eba612021-03-19 10:29:25 +01008479$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008480
8481fi
8482
Christian Heimes985ecdc2013-11-20 11:46:18 +01008483# byte swapping
Christian Heimes32eba612021-03-19 10:29:25 +01008484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8485$as_echo_n "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8487/* end confdefs.h. */
8488
8489#ifdef HAVE_ENDIAN_H
8490#include <endian.h>
8491#elif defined(HAVE_SYS_ENDIAN_H)
8492#include <sys/endian.h>
8493#endif
8494
8495int
Christian Heimes32eba612021-03-19 10:29:25 +01008496main ()
Christian Heimes985ecdc2013-11-20 11:46:18 +01008497{
8498
8499 le64toh(1)
8500 ;
8501 return 0;
8502}
8503
8504_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01008505if ac_fn_c_try_link "$LINENO"; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01008506 ac_cv_has_le64toh=yes
Christian Heimes32eba612021-03-19 10:29:25 +01008507else
Christian Heimes985ecdc2013-11-20 11:46:18 +01008508 ac_cv_has_le64toh=no
8509fi
Christian Heimes32eba612021-03-19 10:29:25 +01008510rm -f core conftest.err conftest.$ac_objext \
Christian Heimes985ecdc2013-11-20 11:46:18 +01008511 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +01008512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8513$as_echo "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008514if test "$ac_cv_has_le64toh" = "yes"; then
8515
Christian Heimes32eba612021-03-19 10:29:25 +01008516$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01008517
8518fi
8519
Martin v. Löwis399a6892002-10-04 10:22:02 +00008520use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008521# Don't use largefile support for GNU/Hurd
8522case $ac_sys_system in GNU*)
8523 use_lfs=no
8524esac
8525
Martin v. Löwis399a6892002-10-04 10:22:02 +00008526if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008527# Two defines needed to enable largefile support on various platforms
8528# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008529case $ac_sys_system/$ac_sys_release in
8530AIX*)
8531
Christian Heimes32eba612021-03-19 10:29:25 +01008532$as_echo "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00008533
8534 ;;
8535esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008536
Christian Heimes32eba612021-03-19 10:29:25 +01008537$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008538
8539
Christian Heimes32eba612021-03-19 10:29:25 +01008540$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008541
Martin v. Löwis399a6892002-10-04 10:22:02 +00008542fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008543
Guido van Rossum84e7b241996-08-19 21:59:00 +00008544# Add some code to confdefs.h so that the test for off_t works on SCO
8545cat >> confdefs.h <<\EOF
8546#if defined(SCO_DS)
8547#undef _OFF_T
8548#endif
8549EOF
8550
Guido van Rossumef2255b2000-03-10 22:30:29 +00008551# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008552ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +01008553if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008554
Christian Heimes32eba612021-03-19 10:29:25 +01008555else
Martin v. Löwis11437992002-04-12 09:54:03 +00008556
Christian Heimes32eba612021-03-19 10:29:25 +01008557cat >>confdefs.h <<_ACEOF
8558#define mode_t int
8559_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008560
8561fi
8562
Matthias Kloseb9621712010-04-24 17:59:49 +00008563ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +01008564if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008565
Christian Heimes32eba612021-03-19 10:29:25 +01008566else
Martin v. Löwis11437992002-04-12 09:54:03 +00008567
Christian Heimes32eba612021-03-19 10:29:25 +01008568cat >>confdefs.h <<_ACEOF
8569#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008570_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01008571
Pablo Galindocc128882021-03-01 16:47:53 +00008572fi
Pablo Galindocc128882021-03-01 16:47:53 +00008573
Christian Heimes32eba612021-03-19 10:29:25 +01008574ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8575if test "x$ac_cv_type_pid_t" = xyes; then :
Pablo Galindocc128882021-03-01 16:47:53 +00008576
Christian Heimes32eba612021-03-19 10:29:25 +01008577else
8578
8579cat >>confdefs.h <<_ACEOF
8580#define pid_t int
8581_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008582
8583fi
8584
8585
Christian Heimes32eba612021-03-19 10:29:25 +01008586cat >>confdefs.h <<_ACEOF
8587#define RETSIGTYPE void
8588_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008589
Matthias Kloseb9621712010-04-24 17:59:49 +00008590ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +01008591if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008592
Christian Heimes32eba612021-03-19 10:29:25 +01008593else
Martin v. Löwis11437992002-04-12 09:54:03 +00008594
Christian Heimes32eba612021-03-19 10:29:25 +01008595cat >>confdefs.h <<_ACEOF
8596#define size_t unsigned int
8597_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
8599fi
8600
Christian Heimes32eba612021-03-19 10:29:25 +01008601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8602$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8603if ${ac_cv_type_uid_t+:} false; then :
8604 $as_echo_n "(cached) " >&6
8605else
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008607/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008608#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
8610_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +01008612 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008613 ac_cv_type_uid_t=yes
Christian Heimes32eba612021-03-19 10:29:25 +01008614else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008615 ac_cv_type_uid_t=no
8616fi
Christian Heimes32eba612021-03-19 10:29:25 +01008617rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008618
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008619fi
Christian Heimes32eba612021-03-19 10:29:25 +01008620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8621$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008622if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008623
Christian Heimes32eba612021-03-19 10:29:25 +01008624$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008625
8626
Christian Heimes32eba612021-03-19 10:29:25 +01008627$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008628
8629fi
8630
Mark Dickinson983bc162012-12-02 12:11:38 +00008631
Matthias Kloseb9621712010-04-24 17:59:49 +00008632ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +01008633if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634
Christian Heimes32eba612021-03-19 10:29:25 +01008635$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008636
8637fi
8638
Stefan Krah1919b7e2012-03-21 18:25:23 +01008639ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +01008640if test "x$ac_cv_type___uint128_t" = xyes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01008641
Christian Heimes32eba612021-03-19 10:29:25 +01008642$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01008643
8644fi
8645
Jack Jansendd19cf82001-12-06 22:36:17 +00008646
Michael W. Hudson54241132001-12-07 15:38:26 +00008647# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008648# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649# The cast to long int works around a bug in the HP C Compiler
8650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8652# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8654$as_echo_n "checking size of int... " >&6; }
8655if ${ac_cv_sizeof_int+:} false; then :
8656 $as_echo_n "(cached) " >&6
8657else
8658 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 +00008659
Christian Heimes32eba612021-03-19 10:29:25 +01008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 if test "$ac_cv_type_int" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008664as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008665See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 else
8667 ac_cv_sizeof_int=0
8668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671fi
Christian Heimes32eba612021-03-19 10:29:25 +01008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8673$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674
8675
8676
Christian Heimes32eba612021-03-19 10:29:25 +01008677cat >>confdefs.h <<_ACEOF
8678#define SIZEOF_INT $ac_cv_sizeof_int
8679_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008680
8681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682# The cast to long int works around a bug in the HP C Compiler
8683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8685# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8687$as_echo_n "checking size of long... " >&6; }
8688if ${ac_cv_sizeof_long+:} false; then :
8689 $as_echo_n "(cached) " >&6
8690else
8691 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 +00008692
Christian Heimes32eba612021-03-19 10:29:25 +01008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 if test "$ac_cv_type_long" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008697as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008698See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699 else
8700 ac_cv_sizeof_long=0
8701 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008703
Martin v. Löwis11437992002-04-12 09:54:03 +00008704fi
Christian Heimes32eba612021-03-19 10:29:25 +01008705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8706$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707
8708
8709
Christian Heimes32eba612021-03-19 10:29:25 +01008710cat >>confdefs.h <<_ACEOF
8711#define SIZEOF_LONG $ac_cv_sizeof_long
8712_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008713
8714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715# The cast to long int works around a bug in the HP C Compiler
8716# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8717# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8718# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8720$as_echo_n "checking size of long long... " >&6; }
8721if ${ac_cv_sizeof_long_long+:} false; then :
8722 $as_echo_n "(cached) " >&6
8723else
8724 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008725
Christian Heimes32eba612021-03-19 10:29:25 +01008726else
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008727 if test "$ac_cv_type_long_long" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008728 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8729$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008730as_fn_error 77 "cannot compute sizeof (long long)
8731See \`config.log' for more details" "$LINENO" 5; }
8732 else
8733 ac_cv_sizeof_long_long=0
8734 fi
8735fi
8736
8737fi
Christian Heimes32eba612021-03-19 10:29:25 +01008738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8739$as_echo "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008740
8741
8742
Christian Heimes32eba612021-03-19 10:29:25 +01008743cat >>confdefs.h <<_ACEOF
8744#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8745_ACEOF
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008746
8747
8748# The cast to long int works around a bug in the HP C Compiler
8749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8751# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8753$as_echo_n "checking size of void *... " >&6; }
8754if ${ac_cv_sizeof_void_p+:} false; then :
8755 $as_echo_n "(cached) " >&6
8756else
8757 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 +00008758
Christian Heimes32eba612021-03-19 10:29:25 +01008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 if test "$ac_cv_type_void_p" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008763as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008764See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765 else
8766 ac_cv_sizeof_void_p=0
8767 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769
Martin v. Löwis11437992002-04-12 09:54:03 +00008770fi
Christian Heimes32eba612021-03-19 10:29:25 +01008771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8772$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773
8774
8775
Christian Heimes32eba612021-03-19 10:29:25 +01008776cat >>confdefs.h <<_ACEOF
8777#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
8778_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008779
8780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781# The cast to long int works around a bug in the HP C Compiler
8782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8784# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8786$as_echo_n "checking size of short... " >&6; }
8787if ${ac_cv_sizeof_short+:} false; then :
8788 $as_echo_n "(cached) " >&6
8789else
8790 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 +00008791
Christian Heimes32eba612021-03-19 10:29:25 +01008792else
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 if test "$ac_cv_type_short" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008796as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008797See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798 else
8799 ac_cv_sizeof_short=0
8800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802
Martin v. Löwis11437992002-04-12 09:54:03 +00008803fi
Christian Heimes32eba612021-03-19 10:29:25 +01008804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8805$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806
8807
8808
Christian Heimes32eba612021-03-19 10:29:25 +01008809cat >>confdefs.h <<_ACEOF
8810#define SIZEOF_SHORT $ac_cv_sizeof_short
8811_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008812
8813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008814# The cast to long int works around a bug in the HP C Compiler
8815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8817# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8819$as_echo_n "checking size of float... " >&6; }
8820if ${ac_cv_sizeof_float+:} false; then :
8821 $as_echo_n "(cached) " >&6
8822else
8823 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 +00008824
Christian Heimes32eba612021-03-19 10:29:25 +01008825else
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 if test "$ac_cv_type_float" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008827 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008829as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008830See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 else
8832 ac_cv_sizeof_float=0
8833 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008835
Martin v. Löwis11437992002-04-12 09:54:03 +00008836fi
Christian Heimes32eba612021-03-19 10:29:25 +01008837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8838$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008839
8840
8841
Christian Heimes32eba612021-03-19 10:29:25 +01008842cat >>confdefs.h <<_ACEOF
8843#define SIZEOF_FLOAT $ac_cv_sizeof_float
8844_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008845
8846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847# The cast to long int works around a bug in the HP C Compiler
8848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8850# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8852$as_echo_n "checking size of double... " >&6; }
8853if ${ac_cv_sizeof_double+:} false; then :
8854 $as_echo_n "(cached) " >&6
8855else
8856 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 +00008857
Christian Heimes32eba612021-03-19 10:29:25 +01008858else
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 if test "$ac_cv_type_double" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008862as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008863See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864 else
8865 ac_cv_sizeof_double=0
8866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008868
Martin v. Löwis11437992002-04-12 09:54:03 +00008869fi
Christian Heimes32eba612021-03-19 10:29:25 +01008870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8871$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872
8873
8874
Christian Heimes32eba612021-03-19 10:29:25 +01008875cat >>confdefs.h <<_ACEOF
8876#define SIZEOF_DOUBLE $ac_cv_sizeof_double
8877_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008878
8879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880# The cast to long int works around a bug in the HP C Compiler
8881# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8882# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8883# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8885$as_echo_n "checking size of fpos_t... " >&6; }
8886if ${ac_cv_sizeof_fpos_t+:} false; then :
8887 $as_echo_n "(cached) " >&6
8888else
8889 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 +00008890
Christian Heimes32eba612021-03-19 10:29:25 +01008891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 if test "$ac_cv_type_fpos_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008895as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008896See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 else
8898 ac_cv_sizeof_fpos_t=0
8899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901
Martin v. Löwis11437992002-04-12 09:54:03 +00008902fi
Christian Heimes32eba612021-03-19 10:29:25 +01008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8904$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008905
8906
8907
Christian Heimes32eba612021-03-19 10:29:25 +01008908cat >>confdefs.h <<_ACEOF
8909#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
8910_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008911
Michael W. Hudson54241132001-12-07 15:38:26 +00008912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008913# The cast to long int works around a bug in the HP C Compiler
8914# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8915# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8916# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8918$as_echo_n "checking size of size_t... " >&6; }
8919if ${ac_cv_sizeof_size_t+:} false; then :
8920 $as_echo_n "(cached) " >&6
8921else
8922 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 +00008923
Christian Heimes32eba612021-03-19 10:29:25 +01008924else
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 if test "$ac_cv_type_size_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008926 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008928as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008929See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930 else
8931 ac_cv_sizeof_size_t=0
8932 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008934
Martin v. Löwis18e16552006-02-15 17:27:45 +00008935fi
Christian Heimes32eba612021-03-19 10:29:25 +01008936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8937$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938
8939
8940
Christian Heimes32eba612021-03-19 10:29:25 +01008941cat >>confdefs.h <<_ACEOF
8942#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8943_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00008944
8945
Christian Heimes400adb02008-02-01 08:12:03 +00008946# The cast to long int works around a bug in the HP C Compiler
8947# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8948# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8949# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8951$as_echo_n "checking size of pid_t... " >&6; }
8952if ${ac_cv_sizeof_pid_t+:} false; then :
8953 $as_echo_n "(cached) " >&6
8954else
8955 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 +00008956
Christian Heimes32eba612021-03-19 10:29:25 +01008957else
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 if test "$ac_cv_type_pid_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008959 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008961as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008962See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008963 else
8964 ac_cv_sizeof_pid_t=0
8965 fi
8966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008967
Christian Heimes400adb02008-02-01 08:12:03 +00008968fi
Christian Heimes32eba612021-03-19 10:29:25 +01008969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8970$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008971
8972
8973
Christian Heimes32eba612021-03-19 10:29:25 +01008974cat >>confdefs.h <<_ACEOF
8975#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8976_ACEOF
Christian Heimes400adb02008-02-01 08:12:03 +00008977
8978
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008979# The cast to long int works around a bug in the HP C Compiler
8980# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8981# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8982# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01008983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8984$as_echo_n "checking size of uintptr_t... " >&6; }
8985if ${ac_cv_sizeof_uintptr_t+:} false; then :
8986 $as_echo_n "(cached) " >&6
8987else
8988 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008989
Christian Heimes32eba612021-03-19 10:29:25 +01008990else
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008991 if test "$ac_cv_type_uintptr_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01008992 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008994as_fn_error 77 "cannot compute sizeof (uintptr_t)
8995See \`config.log' for more details" "$LINENO" 5; }
8996 else
8997 ac_cv_sizeof_uintptr_t=0
8998 fi
8999fi
9000
9001fi
Christian Heimes32eba612021-03-19 10:29:25 +01009002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
9003$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009004
9005
9006
Christian Heimes32eba612021-03-19 10:29:25 +01009007cat >>confdefs.h <<_ACEOF
9008#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
9009_ACEOF
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009010
9011
Michael W. Hudson54241132001-12-07 15:38:26 +00009012
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009013
Christian Heimes32eba612021-03-19 10:29:25 +01009014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
9015$as_echo_n "checking for long double... " >&6; }
9016if ${ac_cv_type_long_double+:} false; then :
9017 $as_echo_n "(cached) " >&6
9018else
Eitan Adler3055c942018-05-15 22:58:09 -07009019 if test "$GCC" = yes; then
9020 ac_cv_type_long_double=yes
9021 else
9022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9023/* end confdefs.h. */
9024/* The Stardent Vistra knows sizeof (long double), but does
9025 not support it. */
9026 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009027int
Christian Heimes32eba612021-03-19 10:29:25 +01009028main ()
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009029{
Eitan Adler3055c942018-05-15 22:58:09 -07009030static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9031 sizeof (double) <= sizeof (long double))];
9032test_array [0] = 0;
9033return test_array [0];
9034
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009035 ;
9036 return 0;
9037}
9038_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009039if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009040 ac_cv_type_long_double=yes
Christian Heimes32eba612021-03-19 10:29:25 +01009041else
Eitan Adler3055c942018-05-15 22:58:09 -07009042 ac_cv_type_long_double=no
9043fi
Christian Heimes32eba612021-03-19 10:29:25 +01009044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -07009045 fi
9046fi
Christian Heimes32eba612021-03-19 10:29:25 +01009047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9048$as_echo "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -07009049 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009050
Christian Heimes32eba612021-03-19 10:29:25 +01009051$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009052
Eitan Adler3055c942018-05-15 22:58:09 -07009053 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009054
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009055# The cast to long int works around a bug in the HP C Compiler
9056# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9057# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9058# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01009059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9060$as_echo_n "checking size of long double... " >&6; }
9061if ${ac_cv_sizeof_long_double+:} false; then :
9062 $as_echo_n "(cached) " >&6
9063else
9064 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 +00009065
Christian Heimes32eba612021-03-19 10:29:25 +01009066else
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 if test "$ac_cv_type_long_double" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01009068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009070as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009071See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009072 else
9073 ac_cv_sizeof_long_double=0
9074 fi
9075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009076
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009077fi
Christian Heimes32eba612021-03-19 10:29:25 +01009078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9079$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009080
9081
9082
Christian Heimes32eba612021-03-19 10:29:25 +01009083cat >>confdefs.h <<_ACEOF
9084#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9085_ACEOF
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009086
9087
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089# The cast to long int works around a bug in the HP C Compiler
9090# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9091# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9092# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01009093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9094$as_echo_n "checking size of _Bool... " >&6; }
9095if ${ac_cv_sizeof__Bool+:} false; then :
9096 $as_echo_n "(cached) " >&6
9097else
9098 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 +00009099
Christian Heimes32eba612021-03-19 10:29:25 +01009100else
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 if test "$ac_cv_type__Bool" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01009102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009104as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009105See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106 else
9107 ac_cv_sizeof__Bool=0
9108 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009110
Thomas Woutersb2137042007-02-01 18:02:27 +00009111fi
Christian Heimes32eba612021-03-19 10:29:25 +01009112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9113$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114
9115
9116
Christian Heimes32eba612021-03-19 10:29:25 +01009117cat >>confdefs.h <<_ACEOF
9118#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9119_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +00009120
9121
Thomas Woutersb2137042007-02-01 18:02:27 +00009122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009123# The cast to long int works around a bug in the HP C Compiler
9124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9126# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01009127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9128$as_echo_n "checking size of off_t... " >&6; }
9129if ${ac_cv_sizeof_off_t+:} false; then :
9130 $as_echo_n "(cached) " >&6
9131else
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009133#ifdef HAVE_SYS_TYPES_H
9134#include <sys/types.h>
9135#endif
9136
Christian Heimes32eba612021-03-19 10:29:25 +01009137"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009138
Christian Heimes32eba612021-03-19 10:29:25 +01009139else
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 if test "$ac_cv_type_off_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01009141 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009143as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009144See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009145 else
9146 ac_cv_sizeof_off_t=0
9147 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009149
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009150fi
Christian Heimes32eba612021-03-19 10:29:25 +01009151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9152$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009154
9155
Christian Heimes32eba612021-03-19 10:29:25 +01009156cat >>confdefs.h <<_ACEOF
9157#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
9158_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009159
Michael W. Hudson54241132001-12-07 15:38:26 +00009160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009161
Christian Heimes32eba612021-03-19 10:29:25 +01009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9163$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009164if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009165 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009166
Christian Heimes32eba612021-03-19 10:29:25 +01009167$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009168
Christian Heimes32eba612021-03-19 10:29:25 +01009169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9170$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009171else
Christian Heimes32eba612021-03-19 10:29:25 +01009172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009174fi
9175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009176# The cast to long int works around a bug in the HP C Compiler
9177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9179# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9181$as_echo_n "checking size of time_t... " >&6; }
9182if ${ac_cv_sizeof_time_t+:} false; then :
9183 $as_echo_n "(cached) " >&6
9184else
Matthias Kloseb9621712010-04-24 17:59:49 +00009185 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009186#ifdef HAVE_SYS_TYPES_H
9187#include <sys/types.h>
9188#endif
9189#ifdef HAVE_TIME_H
9190#include <time.h>
9191#endif
9192
Christian Heimes32eba612021-03-19 10:29:25 +01009193"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009194
Christian Heimes32eba612021-03-19 10:29:25 +01009195else
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 if test "$ac_cv_type_time_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01009197 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9198$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009199as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009200See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009201 else
9202 ac_cv_sizeof_time_t=0
9203 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009205
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009206fi
Christian Heimes32eba612021-03-19 10:29:25 +01009207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9208$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009210
9211
Christian Heimes32eba612021-03-19 10:29:25 +01009212cat >>confdefs.h <<_ACEOF
9213#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
9214_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009215
Michael W. Hudson54241132001-12-07 15:38:26 +00009216
9217
Trent Mick635f6fb2000-08-23 21:33:05 +00009218# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009219ac_save_cc="$CC"
9220if test "$ac_cv_kpthread" = "yes"
9221then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009222elif test "$ac_cv_kthread" = "yes"
9223then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009224elif test "$ac_cv_pthread" = "yes"
9225then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009226fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009227
Christian Heimes32eba612021-03-19 10:29:25 +01009228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9229$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009230have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009232/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009233
9234 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
Christian Heimes32eba612021-03-19 10:29:25 +01009236main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009237{
Guido van Rossum12580492000-09-24 16:47:19 +00009238pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 ;
9240 return 0;
9241}
Matthias Kloseb159a552010-04-25 21:00:44 +00009242
Martin v. Löwis11437992002-04-12 09:54:03 +00009243_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009244if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009245 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009246fi
Christian Heimes32eba612021-03-19 10:29:25 +01009247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9249$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009250if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9254# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9256$as_echo_n "checking size of pthread_t... " >&6; }
9257if ${ac_cv_sizeof_pthread_t+:} false; then :
9258 $as_echo_n "(cached) " >&6
9259else
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009261#ifdef HAVE_PTHREAD_H
9262#include <pthread.h>
9263#endif
9264
Christian Heimes32eba612021-03-19 10:29:25 +01009265"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009266
Christian Heimes32eba612021-03-19 10:29:25 +01009267else
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 if test "$ac_cv_type_pthread_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01009269 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009271as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009272See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009273 else
9274 ac_cv_sizeof_pthread_t=0
9275 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009277
Trent Mick635f6fb2000-08-23 21:33:05 +00009278fi
Christian Heimes32eba612021-03-19 10:29:25 +01009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9280$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009282
9283
Christian Heimes32eba612021-03-19 10:29:25 +01009284cat >>confdefs.h <<_ACEOF
9285#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
9286_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009287
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009288
Trent Mick635f6fb2000-08-23 21:33:05 +00009289fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009290
9291# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9292# This checking will be unnecessary after removing deprecated TLS API.
9293# The cast to long int works around a bug in the HP C Compiler
9294# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9295# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9296# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +01009297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9298$as_echo_n "checking size of pthread_key_t... " >&6; }
9299if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9300 $as_echo_n "(cached) " >&6
9301else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009302 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
Christian Heimes32eba612021-03-19 10:29:25 +01009303"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009304
Christian Heimes32eba612021-03-19 10:29:25 +01009305else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009306 if test "$ac_cv_type_pthread_key_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +01009307 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009309as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9310See \`config.log' for more details" "$LINENO" 5; }
9311 else
9312 ac_cv_sizeof_pthread_key_t=0
9313 fi
9314fi
9315
9316fi
Christian Heimes32eba612021-03-19 10:29:25 +01009317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9318$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009319
9320
9321
Christian Heimes32eba612021-03-19 10:29:25 +01009322cat >>confdefs.h <<_ACEOF
9323#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9324_ACEOF
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009325
9326
Christian Heimes32eba612021-03-19 10:29:25 +01009327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9328$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009329if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9331/* end confdefs.h. */
9332#include <pthread.h>
9333int
Christian Heimes32eba612021-03-19 10:29:25 +01009334main ()
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009335{
9336pthread_key_t k; k * 1;
9337 ;
9338 return 0;
9339}
9340_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009341if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009342 ac_pthread_key_t_is_arithmetic_type=yes
Christian Heimes32eba612021-03-19 10:29:25 +01009343else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009344 ac_pthread_key_t_is_arithmetic_type=no
9345
9346fi
Christian Heimes32eba612021-03-19 10:29:25 +01009347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9349$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009350 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9351
Christian Heimes32eba612021-03-19 10:29:25 +01009352$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009353
9354 fi
9355else
Christian Heimes32eba612021-03-19 10:29:25 +01009356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357$as_echo "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009358fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009359CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009360
Michael W. Hudson54241132001-12-07 15:38:26 +00009361
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009362case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009363 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009364 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9365 ;;
9366 Darwin/*)
9367 OTHER_LIBTOOL_OPT=""
9368 ;;
9369esac
9370
9371
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009372
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009373case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009374 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009375 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9376 if test "${enable_universalsdk}"; then
9377 :
9378 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009379 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009380 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009381 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009382 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009383 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009384 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009385 if test ${gcc_version} '<' 4.0
9386 then
9387 LIBTOOL_CRUFT="-lcc_dynamic"
9388 else
9389 LIBTOOL_CRUFT=""
9390 fi
Christian Heimes32eba612021-03-19 10:29:25 +01009391 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009392 ac_osx_32bit=yes
Christian Heimes32eba612021-03-19 10:29:25 +01009393else
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009395/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009396
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009397 #include <unistd.h>
9398 int main(int argc, char*argv[])
9399 {
9400 if (sizeof(long) == 4) {
9401 return 0;
9402 } else {
9403 return 1;
9404 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009405 }
9406
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009407_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009408if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009409 ac_osx_32bit=yes
Christian Heimes32eba612021-03-19 10:29:25 +01009410else
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009415fi
9416
9417
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009418 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009419 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009420 i386)
9421 MACOSX_DEFAULT_ARCH="i386"
9422 ;;
9423 ppc)
9424 MACOSX_DEFAULT_ARCH="ppc"
9425 ;;
9426 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009427 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009428 ;;
9429 esac
9430 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009431 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009432 i386)
9433 MACOSX_DEFAULT_ARCH="x86_64"
9434 ;;
9435 ppc)
9436 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009437 ;;
9438 arm64)
9439 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009440 ;;
9441 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009442 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009443 ;;
9444 esac
9445
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009446 fi
9447
9448 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009449 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009450 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009451esac
Christian Heimes32eba612021-03-19 10:29:25 +01009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9453$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009454if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009455then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009456 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009458 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009459
Christian Heimes32eba612021-03-19 10:29:25 +01009460$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
Christian Heimes32eba612021-03-19 10:29:25 +01009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9463$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009464 if test $enable_shared = "yes"
9465 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009466 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 +00009467 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009468else
Christian Heimes32eba612021-03-19 10:29:25 +01009469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009471fi
9472
Christian Heimes32eba612021-03-19 10:29:25 +01009473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9474$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009475case $ac_sys_system/$ac_sys_release in
9476 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009477
Christian Heimes32eba612021-03-19 10:29:25 +01009478$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009479
Christian Heimes32eba612021-03-19 10:29:25 +01009480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9481$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009482 ;;
9483 *)
Christian Heimes32eba612021-03-19 10:29:25 +01009484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009486 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009487esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009488
Guido van Rossum0a516c91994-09-12 10:58:40 +00009489# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009490
Michael W. Hudson54241132001-12-07 15:38:26 +00009491
9492
9493
9494
Benjamin Peterson99f03762010-04-11 22:15:28 +00009495
Thomas Wouters477c8d52006-05-27 19:21:47 +00009496
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009497# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9498# -- usually .so, .sl on HP-UX, .dll on Cygwin
Christian Heimes32eba612021-03-19 10:29:25 +01009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9500$as_echo_n "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009501if test -z "$SHLIB_SUFFIX"; then
9502 case $ac_sys_system in
9503 hp*|HP*)
9504 case `uname -m` in
9505 ia64) SHLIB_SUFFIX=.so;;
9506 *) SHLIB_SUFFIX=.sl;;
9507 esac
9508 ;;
9509 CYGWIN*) SHLIB_SUFFIX=.dll;;
9510 *) SHLIB_SUFFIX=.so;;
9511 esac
9512fi
Christian Heimes32eba612021-03-19 10:29:25 +01009513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9514$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009515
Guido van Rossum0a516c91994-09-12 10:58:40 +00009516# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009517# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009518# (Shared libraries in this instance are shared modules to be loaded into
9519# Python, as opposed to building Python itself as a shared library.)
Christian Heimes32eba612021-03-19 10:29:25 +01009520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9521$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009522if test -z "$LDSHARED"
9523then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009524 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009525 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009526 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009527 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009528 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009530 if test "$GCC" = "yes" ; then
9531 LDSHARED='$(CC) -shared'
9532 LDCXXSHARED='$(CXX) -shared'
9533 else
9534 LDSHARED='$(CC) -G'
9535 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009536 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009537 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009538 if test "$GCC" = "yes" ; then
9539 LDSHARED='$(CC) -shared'
9540 LDCXXSHARED='$(CXX) -shared'
9541 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009542 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009543 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009544 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009545 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009546 LDSHARED='$(CC) -bundle'
9547 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009548 if test "$enable_framework" ; then
9549 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009550 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9551 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009552 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009553 else
9554 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009555 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009556 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009557 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009558 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009559 LDSHARED='$(CC) -bundle'
9560 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009561 if test "$enable_framework" ; then
9562 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009563 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9564 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009565 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009566 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009567 # No framework, use the Python app as bundle-loader
9568 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009569 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009570 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009571 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009572 Darwin/*)
9573 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9574 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009575
Ned Deily36820b62014-06-25 13:44:22 -07009576 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9577 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9578 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9579 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9580 if test ${dep_target_major} -eq 10 && \
9581 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009582 then
Ned Deily36820b62014-06-25 13:44:22 -07009583 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009584 LDSHARED='$(CC) -bundle'
9585 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009586 if test "$enable_framework" ; then
9587 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009588 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9589 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009590 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009591 else
9592 # No framework, use the Python app as bundle-loader
9593 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9594 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009595 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009596 fi
Ned Deily36820b62014-06-25 13:44:22 -07009597 else
9598 # building for OS X 10.3 and later
9599 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9600 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9601 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009602 fi
9603 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009604 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009605 LDSHARED='$(CC) -shared'
9606 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009607 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009608 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009609 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009610 LDSHARED='$(CC) -shared'
9611 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009612 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009613 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009614 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009615 OpenBSD*)
9616 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9617 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009618 LDSHARED='$(CC) -shared $(CCSHARED)'
9619 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009620 else
9621 case `uname -r` in
9622 [01].* | 2.[0-7] | 2.[0-7].*)
9623 LDSHARED="ld -Bshareable ${LDFLAGS}"
9624 ;;
9625 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009626 LDSHARED='$(CC) -shared $(CCSHARED)'
9627 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009628 ;;
9629 esac
9630 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009631 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009632 LDSHARED='$(CC) -shared'
9633 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009634 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009635 if test "$GCC" = "yes" ; then
9636 LDSHARED='$(CC) -shared'
9637 LDCXXSHARED='$(CXX) -shared'
9638 else
9639 LDSHARED='$(CC) -G'
9640 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009641 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009642 SCO_SV*)
9643 LDSHARED='$(CC) -Wl,-G,-Bexport'
9644 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9645 CYGWIN*)
9646 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9647 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009648 *) LDSHARED="ld";;
9649 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009650fi
Christian Heimes32eba612021-03-19 10:29:25 +01009651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9652$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009653LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009654BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009655# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009656# library (module) -- this is only needed for a few systems
Christian Heimes32eba612021-03-19 10:29:25 +01009657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9658$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009659if test -z "$CCSHARED"
9660then
Guido van Rossum07397971997-04-29 21:49:50 +00009661 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009662 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009663 then CCSHARED="-fPIC";
9664 elif test `uname -p` = sparc;
9665 then CCSHARED="-xcode=pic32";
9666 else CCSHARED="-Kpic";
9667 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009668 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009669 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009670 else CCSHARED="+z";
9671 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009672 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009673 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009674 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009675 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009676 if test "$GCC" = "yes"
9677 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009678 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009679 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009680 SCO_SV*)
9681 if test "$GCC" = "yes"
9682 then CCSHARED="-fPIC"
9683 else CCSHARED="-Kpic -belf"
9684 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009685 VxWorks*)
9686 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009687 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009688fi
Christian Heimes32eba612021-03-19 10:29:25 +01009689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9690$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009691# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009692# the python executable -- this is only needed for a few systems
Christian Heimes32eba612021-03-19 10:29:25 +01009693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9694$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009695if test -z "$LINKFORSHARED"
9696then
Guido van Rossum07397971997-04-29 21:49:50 +00009697 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009698 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009699 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009700 LINKFORSHARED="-Wl,-E -Wl,+s";;
9701# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009702 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009703 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009704 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009706 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009707
9708 # Issue #18075: the default maximum stack size (8MBytes) is too
9709 # small for the default recursion limit. Increase the stack size
9710 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009711 # Note: This matches the value of THREAD_STACK_SIZE in
9712 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009713 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9714
Jack Jansene578a632001-08-15 01:27:14 +00009715 if test "$enable_framework"
9716 then
Jack Jansenda49e192005-01-07 13:08:22 +00009717 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009718 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009719 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009720 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009721 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009722 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009723 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009724 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9725 then
9726 LINKFORSHARED="-Wl,--export-dynamic"
9727 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009728 SunOS/5*) case $CC in
9729 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009730 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009731 then
9732 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009733 fi;;
9734 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009735 CYGWIN*)
9736 if test $enable_shared = "no"
9737 then
9738 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9739 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009740 QNX*)
9741 # -Wl,-E causes the symbols to be added to the dynamic
9742 # symbol table so that they can be found when a module
9743 # is loaded. -N 2048K causes the stack size to be set
9744 # to 2048 kilobytes so that the stack doesn't overflow
9745 # when running test_compile.py.
9746 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009747 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009748 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009749 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009750fi
Christian Heimes32eba612021-03-19 10:29:25 +01009751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9752$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009753
Michael W. Hudson54241132001-12-07 15:38:26 +00009754
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009755
Christian Heimes32eba612021-03-19 10:29:25 +01009756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9757$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009758if test ! "$LIBRARY" = "$LDLIBRARY"
9759then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009760 case $ac_sys_system in
9761 CYGWIN*)
9762 # Cygwin needs CCSHARED when building extension DLLs
9763 # but not when building the interpreter DLL.
9764 CFLAGSFORSHARED='';;
9765 *)
9766 CFLAGSFORSHARED='$(CCSHARED)'
9767 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009768fi
Christian Heimes32eba612021-03-19 10:29:25 +01009769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9770$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009771
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009772# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9773# library (with --enable-shared).
9774# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009775# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9776# if it is not required, since it creates a dependency of the shared library
9777# to LIBS. This, in turn, means that applications linking the shared libpython
9778# don't need to link LIBS explicitly. The default should be only changed
9779# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009780
Christian Heimes32eba612021-03-19 10:29:25 +01009781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9782$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009783case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009784 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009785 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009786esac
Christian Heimes32eba612021-03-19 10:29:25 +01009787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9788$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009789
9790
Guido van Rossum627b2d71993-12-24 10:39:16 +00009791# checks for libraries
Christian Heimes32eba612021-03-19 10:29:25 +01009792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9793$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
9794if ${ac_cv_lib_sendfile_sendfile+:} false; then :
9795 $as_echo_n "(cached) " >&6
9796else
Georg Brandl941f9562011-02-25 15:21:47 +00009797 ac_check_lib_save_LIBS=$LIBS
9798LIBS="-lsendfile $LIBS"
9799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9800/* end confdefs.h. */
9801
9802/* Override any GCC internal prototype to avoid an error.
9803 Use char because int might match the return type of a GCC
9804 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +01009805#ifdef __cplusplus
9806extern "C"
9807#endif
Georg Brandl941f9562011-02-25 15:21:47 +00009808char sendfile ();
9809int
Christian Heimes32eba612021-03-19 10:29:25 +01009810main ()
Georg Brandl941f9562011-02-25 15:21:47 +00009811{
9812return sendfile ();
9813 ;
9814 return 0;
9815}
9816_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009817if ac_fn_c_try_link "$LINENO"; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009818 ac_cv_lib_sendfile_sendfile=yes
Christian Heimes32eba612021-03-19 10:29:25 +01009819else
Georg Brandl941f9562011-02-25 15:21:47 +00009820 ac_cv_lib_sendfile_sendfile=no
9821fi
Christian Heimes32eba612021-03-19 10:29:25 +01009822rm -f core conftest.err conftest.$ac_objext \
Georg Brandl941f9562011-02-25 15:21:47 +00009823 conftest$ac_exeext conftest.$ac_ext
9824LIBS=$ac_check_lib_save_LIBS
9825fi
Christian Heimes32eba612021-03-19 10:29:25 +01009826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9827$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
9828if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
9829 cat >>confdefs.h <<_ACEOF
9830#define HAVE_LIBSENDFILE 1
9831_ACEOF
Georg Brandl941f9562011-02-25 15:21:47 +00009832
9833 LIBS="-lsendfile $LIBS"
9834
9835fi
9836
Christian Heimes32eba612021-03-19 10:29:25 +01009837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9838$as_echo_n "checking for dlopen in -ldl... " >&6; }
9839if ${ac_cv_lib_dl_dlopen+:} false; then :
9840 $as_echo_n "(cached) " >&6
9841else
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009843LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847/* Override any GCC internal prototype to avoid an error.
9848 Use char because int might match the return type of a GCC
9849 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +01009850#ifdef __cplusplus
9851extern "C"
9852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009853char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009854int
Christian Heimes32eba612021-03-19 10:29:25 +01009855main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 ;
9859 return 0;
9860}
9861_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009862if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 ac_cv_lib_dl_dlopen=yes
Christian Heimes32eba612021-03-19 10:29:25 +01009864else
Matthias Kloseb9621712010-04-24 17:59:49 +00009865 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009866fi
Christian Heimes32eba612021-03-19 10:29:25 +01009867rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009869LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009870fi
Christian Heimes32eba612021-03-19 10:29:25 +01009871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9872$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9873if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
9874 cat >>confdefs.h <<_ACEOF
9875#define HAVE_LIBDL 1
9876_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009877
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009878 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009879
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009880fi
9881 # Dynamic linking for SunOS/Solaris and SYSV
Christian Heimes32eba612021-03-19 10:29:25 +01009882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9883$as_echo_n "checking for shl_load in -ldld... " >&6; }
9884if ${ac_cv_lib_dld_shl_load+:} false; then :
9885 $as_echo_n "(cached) " >&6
9886else
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009888LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892/* Override any GCC internal prototype to avoid an error.
9893 Use char because int might match the return type of a GCC
9894 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +01009895#ifdef __cplusplus
9896extern "C"
9897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009898char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009899int
Christian Heimes32eba612021-03-19 10:29:25 +01009900main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 ;
9904 return 0;
9905}
9906_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 ac_cv_lib_dld_shl_load=yes
Christian Heimes32eba612021-03-19 10:29:25 +01009909else
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009911fi
Christian Heimes32eba612021-03-19 10:29:25 +01009912rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009914LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009915fi
Christian Heimes32eba612021-03-19 10:29:25 +01009916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9917$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9918if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
9919 cat >>confdefs.h <<_ACEOF
9920#define HAVE_LIBDLD 1
9921_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009922
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009923 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009925fi
9926 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009927
Michael Felt0d3ccb42017-12-30 22:39:20 +01009928# checks for uuid.h location
Christian Heimes32eba612021-03-19 10:29:25 +01009929for ac_header in uuid/uuid.h uuid.h
9930do :
9931 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9932ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9933if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9934 cat >>confdefs.h <<_ACEOF
9935#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9936_ACEOF
Michael Felt0d3ccb42017-12-30 22:39:20 +01009937
9938fi
9939
Christian Heimes32eba612021-03-19 10:29:25 +01009940done
Michael Felt0d3ccb42017-12-30 22:39:20 +01009941
Christian Heimes32eba612021-03-19 10:29:25 +01009942
9943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9944$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +03009945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9946/* end confdefs.h. */
9947#include <uuid/uuid.h>
9948int
Christian Heimes32eba612021-03-19 10:29:25 +01009949main ()
Berker Peksag9a10ff42017-11-08 23:09:16 +03009950{
9951
9952#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009953void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009954#endif
9955
9956 ;
9957 return 0;
9958}
9959_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009960if ac_fn_c_try_compile "$LINENO"; then :
Berker Peksag9a10ff42017-11-08 23:09:16 +03009961
Christian Heimes32eba612021-03-19 10:29:25 +01009962$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +03009963
Christian Heimes32eba612021-03-19 10:29:25 +01009964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9965$as_echo "yes" >&6; }
9966else
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968$as_echo "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +03009969
9970fi
Christian Heimes32eba612021-03-19 10:29:25 +01009971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +03009972
Michael Felt0d3ccb42017-12-30 22:39:20 +01009973# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009974# FreeBSD and OpenBSD provides support as well
Christian Heimes32eba612021-03-19 10:29:25 +01009975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9976$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9978/* end confdefs.h. */
9979#include <uuid.h>
9980int
Christian Heimes32eba612021-03-19 10:29:25 +01009981main ()
Michael Felt0d3ccb42017-12-30 22:39:20 +01009982{
9983
9984#ifndef uuid_create
9985void *x = uuid_create
9986#endif
9987
9988 ;
9989 return 0;
9990}
9991_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +01009992if ac_fn_c_try_compile "$LINENO"; then :
Michael Felt0d3ccb42017-12-30 22:39:20 +01009993
Christian Heimes32eba612021-03-19 10:29:25 +01009994$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +01009995
Christian Heimes32eba612021-03-19 10:29:25 +01009996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9997$as_echo "yes" >&6; }
9998else
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000$as_echo "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010001
10002fi
Christian Heimes32eba612021-03-19 10:29:25 +010010003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010010004
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010005# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
10006# stream in big-endian byte-order
Christian Heimes32eba612021-03-19 10:29:25 +010010007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
10008$as_echo_n "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10010/* end confdefs.h. */
10011#include <uuid.h>
10012int
Christian Heimes32eba612021-03-19 10:29:25 +010010013main ()
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010014{
10015
10016#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040010017void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010018#endif
10019
10020 ;
10021 return 0;
10022}
10023_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010024if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010025
Christian Heimes32eba612021-03-19 10:29:25 +010010026$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010027
Christian Heimes32eba612021-03-19 10:29:25 +010010028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10029$as_echo "yes" >&6; }
10030else
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032$as_echo "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010033
10034fi
Christian Heimes32eba612021-03-19 10:29:25 +010010035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010036
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010037# 'Real Time' functions on Solaris
10038# posix4 on Solaris 2.6
10039# pthread (first!) on Linux
Christian Heimes32eba612021-03-19 10:29:25 +010010040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
10041$as_echo_n "checking for library containing sem_init... " >&6; }
10042if ${ac_cv_search_sem_init+:} false; then :
10043 $as_echo_n "(cached) " >&6
10044else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010045 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049/* Override any GCC internal prototype to avoid an error.
10050 Use char because int might match the return type of a GCC
10051 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010010052#ifdef __cplusplus
10053extern "C"
10054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010055char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010056int
Christian Heimes32eba612021-03-19 10:29:25 +010010057main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010059return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 ;
10061 return 0;
10062}
10063_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010064for ac_lib in '' pthread rt posix4; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065 if test -z "$ac_lib"; then
10066 ac_res="none required"
10067 else
10068 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010069 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070 fi
Christian Heimes32eba612021-03-19 10:29:25 +010010071 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010073fi
Christian Heimes32eba612021-03-19 10:29:25 +010010074rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 conftest$ac_exeext
Christian Heimes32eba612021-03-19 10:29:25 +010010076 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079done
Christian Heimes32eba612021-03-19 10:29:25 +010010080if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010081
Christian Heimes32eba612021-03-19 10:29:25 +010010082else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083 ac_cv_search_sem_init=no
10084fi
10085rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010086LIBS=$ac_func_search_save_LIBS
10087fi
Christian Heimes32eba612021-03-19 10:29:25 +010010088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10089$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090ac_res=$ac_cv_search_sem_init
Christian Heimes32eba612021-03-19 10:29:25 +010010091if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010093
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010094fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010095
Martin v. Löwis519adae2003-09-20 10:47:47 +000010096
Martin v. Löwis19d17342003-06-14 21:03:05 +000010097# check if we need libintl for locale functions
Christian Heimes32eba612021-03-19 10:29:25 +010010098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10099$as_echo_n "checking for textdomain in -lintl... " >&6; }
10100if ${ac_cv_lib_intl_textdomain+:} false; then :
10101 $as_echo_n "(cached) " >&6
10102else
Martin v. Löwis19d17342003-06-14 21:03:05 +000010103 ac_check_lib_save_LIBS=$LIBS
10104LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010106/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108/* Override any GCC internal prototype to avoid an error.
10109 Use char because int might match the return type of a GCC
10110 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010010111#ifdef __cplusplus
10112extern "C"
10113#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010114char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010115int
Christian Heimes32eba612021-03-19 10:29:25 +010010116main ()
Martin v. Löwis19d17342003-06-14 21:03:05 +000010117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010119 ;
10120 return 0;
10121}
10122_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010124 ac_cv_lib_intl_textdomain=yes
Christian Heimes32eba612021-03-19 10:29:25 +010010125else
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010127fi
Christian Heimes32eba612021-03-19 10:29:25 +010010128rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010130LIBS=$ac_check_lib_save_LIBS
10131fi
Christian Heimes32eba612021-03-19 10:29:25 +010010132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10133$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
10134if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010135
Christian Heimes32eba612021-03-19 10:29:25 +010010136$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010137
Brett Cannonc6d936e2009-06-07 20:09:53 +000010138 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010139fi
10140
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010141
10142# checks for system dependent C++ extensions support
10143case "$ac_sys_system" in
Christian Heimes32eba612021-03-19 10:29:25 +010010144 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10145$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010148
Georg Brandl59e87bd2011-02-15 19:48:59 +000010149 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010150int
Christian Heimes32eba612021-03-19 10:29:25 +010010151main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010152{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010153loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010154 ;
10155 return 0;
10156}
Matthias Kloseb159a552010-04-25 21:00:44 +000010157
Martin v. Löwis11437992002-04-12 09:54:03 +000010158_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010159if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010160
Matthias Kloseb159a552010-04-25 21:00:44 +000010161
Christian Heimes32eba612021-03-19 10:29:25 +010010162$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010163
Christian Heimes32eba612021-03-19 10:29:25 +010010164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10165$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010166
Christian Heimes32eba612021-03-19 10:29:25 +010010167else
Matthias Kloseb159a552010-04-25 21:00:44 +000010168
Christian Heimes32eba612021-03-19 10:29:25 +010010169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10170$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010171
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010172fi
Christian Heimes32eba612021-03-19 10:29:25 +010010173rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010174 conftest$ac_exeext conftest.$ac_ext
10175# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10176# of the AIX system used to build/package Python executable. This tag serves
10177# as a baseline for bdist module packages
Christian Heimes32eba612021-03-19 10:29:25 +010010178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10179$as_echo_n "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010180 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10181
Christian Heimes32eba612021-03-19 10:29:25 +010010182cat >>confdefs.h <<_ACEOF
10183#define AIX_BUILDDATE $AIX_BUILDDATE
10184_ACEOF
Michael Felt39afa2d2019-12-15 15:17:53 +010010185
Christian Heimes32eba612021-03-19 10:29:25 +010010186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10187$as_echo "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010188 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010189 *) ;;
10190esac
10191
Christian Heimes985ecdc2013-11-20 11:46:18 +010010192# check for systems that require aligned memory access
Christian Heimes32eba612021-03-19 10:29:25 +010010193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10194$as_echo_n "checking aligned memory access is required... " >&6; }
10195if ${ac_cv_aligned_required+:} false; then :
10196 $as_echo_n "(cached) " >&6
10197else
10198 if test "$cross_compiling" = yes; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010199 ac_cv_aligned_required=yes
Christian Heimes32eba612021-03-19 10:29:25 +010010200else
Christian Heimes985ecdc2013-11-20 11:46:18 +010010201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10202/* end confdefs.h. */
10203
10204int main()
10205{
10206 char s[16];
10207 int i, *p1, *p2;
10208 for (i=0; i < 16; i++)
10209 s[i] = i;
10210 p1 = (int*)(s+1);
10211 p2 = (int*)(s+2);
10212 if (*p1 == *p2)
10213 return 1;
10214 return 0;
10215}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010216_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010217if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010218 ac_cv_aligned_required=no
Christian Heimes32eba612021-03-19 10:29:25 +010010219else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010220 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010221fi
10222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10223 conftest.$ac_objext conftest.beam conftest.$ac_ext
10224fi
10225
10226
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010227fi
10228
Christian Heimes32eba612021-03-19 10:29:25 +010010229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10230$as_echo "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010231if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010232
Christian Heimes32eba612021-03-19 10:29:25 +010010233$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010234
10235fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010236
10237# str, bytes and memoryview hash algorithm
10238
10239
Christian Heimes32eba612021-03-19 10:29:25 +010010240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10241$as_echo_n "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010242
10243# Check whether --with-hash_algorithm was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010244if test "${with_hash_algorithm+set}" = set; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010010245 withval=$with_hash_algorithm;
Christian Heimes32eba612021-03-19 10:29:25 +010010246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10247$as_echo "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010248case "$withval" in
10249 siphash24)
Christian Heimes32eba612021-03-19 10:29:25 +010010250 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010251
10252 ;;
10253 fnv)
Christian Heimes32eba612021-03-19 10:29:25 +010010254 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010255
10256 ;;
10257 *)
10258 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10259 ;;
10260esac
10261
Christian Heimes32eba612021-03-19 10:29:25 +010010262else
10263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10264$as_echo "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010265fi
10266
10267
Paul Ganssle62972d92020-05-16 04:20:06 -040010268validate_tzpath() {
10269 # Checks that each element of hte path is an absolute path
10270 if test -z "$1"; then
10271 # Empty string is allowed: it indicates no system TZPATH
10272 return 0
10273 fi
10274
10275 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050010276 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040010277 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10278 return 1;
10279 fi
10280}
10281
10282TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Christian Heimes32eba612021-03-19 10:29:25 +010010283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10284$as_echo_n "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010285
10286# Check whether --with-tzpath was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010287if test "${with_tzpath+set}" = set; then :
Paul Ganssle62972d92020-05-16 04:20:06 -040010288 withval=$with_tzpath;
10289case "$withval" in
10290 yes)
10291 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10292 ;;
10293 *)
10294 validate_tzpath "$withval"
10295 TZPATH="$withval"
Christian Heimes32eba612021-03-19 10:29:25 +010010296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10297$as_echo "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010298 ;;
10299esac
10300
Christian Heimes32eba612021-03-19 10:29:25 +010010301else
Paul Ganssle62972d92020-05-16 04:20:06 -040010302 validate_tzpath "$TZPATH"
Christian Heimes32eba612021-03-19 10:29:25 +010010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10304$as_echo "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010305fi
10306
10307
10308
Christian Heimes32eba612021-03-19 10:29:25 +010010309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10310$as_echo_n "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010311
10312# Check whether --with-address_sanitizer was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010313if test "${with_address_sanitizer+set}" = set; then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010010314 withval=$with_address_sanitizer;
Christian Heimes32eba612021-03-19 10:29:25 +010010315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10316$as_echo "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010317BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10318LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010319# ASan works by controlling memory allocation, our own malloc interferes.
10320with_pymalloc="no"
10321
Christian Heimes32eba612021-03-19 10:29:25 +010010322else
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010325fi
10326
10327
Christian Heimes32eba612021-03-19 10:29:25 +010010328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10329$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010330
10331# Check whether --with-memory_sanitizer was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010332if test "${with_memory_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010333 withval=$with_memory_sanitizer;
Christian Heimes32eba612021-03-19 10:29:25 +010010334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10335$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010336BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10337LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10338# MSan works by controlling memory allocation, our own malloc interferes.
10339with_pymalloc="no"
10340
Christian Heimes32eba612021-03-19 10:29:25 +010010341else
10342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10343$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010344fi
10345
10346
Christian Heimes32eba612021-03-19 10:29:25 +010010347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10348$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010349
10350# Check whether --with-undefined_behavior_sanitizer was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010351if test "${with_undefined_behavior_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010352 withval=$with_undefined_behavior_sanitizer;
Christian Heimes32eba612021-03-19 10:29:25 +010010353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10354$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010355BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10356LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010357
Christian Heimes32eba612021-03-19 10:29:25 +010010358else
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360$as_echo "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010361fi
10362
10363
Guido van Rossum70c7f481998-03-26 18:44:10 +000010364# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Christian Heimes32eba612021-03-19 10:29:25 +010010365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10366$as_echo_n "checking for t_open in -lnsl... " >&6; }
10367if ${ac_cv_lib_nsl_t_open+:} false; then :
10368 $as_echo_n "(cached) " >&6
10369else
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010371LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375/* Override any GCC internal prototype to avoid an error.
10376 Use char because int might match the return type of a GCC
10377 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010010378#ifdef __cplusplus
10379extern "C"
10380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010381char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010382int
Christian Heimes32eba612021-03-19 10:29:25 +010010383main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010384{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ;
10387 return 0;
10388}
10389_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010390if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 ac_cv_lib_nsl_t_open=yes
Christian Heimes32eba612021-03-19 10:29:25 +010010392else
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010394fi
Christian Heimes32eba612021-03-19 10:29:25 +010010395rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010397LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010398fi
Christian Heimes32eba612021-03-19 10:29:25 +010010399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10400$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
10401if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010402 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010403fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010404 # SVR4
Christian Heimes32eba612021-03-19 10:29:25 +010010405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10406$as_echo_n "checking for socket in -lsocket... " >&6; }
10407if ${ac_cv_lib_socket_socket+:} false; then :
10408 $as_echo_n "(cached) " >&6
10409else
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010411LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415/* Override any GCC internal prototype to avoid an error.
10416 Use char because int might match the return type of a GCC
10417 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010010418#ifdef __cplusplus
10419extern "C"
10420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010421char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010422int
Christian Heimes32eba612021-03-19 10:29:25 +010010423main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 ;
10427 return 0;
10428}
10429_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 ac_cv_lib_socket_socket=yes
Christian Heimes32eba612021-03-19 10:29:25 +010010432else
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010434fi
Christian Heimes32eba612021-03-19 10:29:25 +010010435rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010437LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010438fi
Christian Heimes32eba612021-03-19 10:29:25 +010010439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10440$as_echo "$ac_cv_lib_socket_socket" >&6; }
10441if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010442 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010443fi
10444 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010445
Christian Heimes32eba612021-03-19 10:29:25 +010010446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10447$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449# Check whether --with-libs was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010450if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451 withval=$with_libs;
Christian Heimes32eba612021-03-19 10:29:25 +010010452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10453$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010454LIBS="$withval $LIBS"
10455
Christian Heimes32eba612021-03-19 10:29:25 +010010456else
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010459fi
10460
Guido van Rossum7f43da71994-08-01 12:15:30 +000010461
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010462
10463
10464
10465
10466
10467
Victor Stinnerb477d192020-01-22 22:48:16 +010010468
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010469if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10470 if test -n "$ac_tool_prefix"; then
10471 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10472set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +010010473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10474$as_echo_n "checking for $ac_word... " >&6; }
10475if ${ac_cv_path_PKG_CONFIG+:} false; then :
10476 $as_echo_n "(cached) " >&6
10477else
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010478 case $PKG_CONFIG in
10479 [\\/]* | ?:[\\/]*)
10480 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10481 ;;
10482 *)
10483 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10484for as_dir in $PATH
10485do
10486 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +010010487 test -z "$as_dir" && as_dir=.
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010488 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +010010489 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10490 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10491 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010492 break 2
10493 fi
10494done
10495 done
10496IFS=$as_save_IFS
10497
10498 ;;
10499esac
10500fi
10501PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10502if test -n "$PKG_CONFIG"; then
Christian Heimes32eba612021-03-19 10:29:25 +010010503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10504$as_echo "$PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010505else
Christian Heimes32eba612021-03-19 10:29:25 +010010506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10507$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010508fi
10509
10510
10511fi
10512if test -z "$ac_cv_path_PKG_CONFIG"; then
10513 ac_pt_PKG_CONFIG=$PKG_CONFIG
10514 # Extract the first word of "pkg-config", so it can be a program name with args.
10515set dummy pkg-config; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +010010516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10517$as_echo_n "checking for $ac_word... " >&6; }
10518if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10519 $as_echo_n "(cached) " >&6
10520else
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010521 case $ac_pt_PKG_CONFIG in
10522 [\\/]* | ?:[\\/]*)
10523 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10524 ;;
10525 *)
10526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10527for as_dir in $PATH
10528do
10529 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +010010530 test -z "$as_dir" && as_dir=.
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010531 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +010010532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10533 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010535 break 2
10536 fi
10537done
10538 done
10539IFS=$as_save_IFS
10540
10541 ;;
10542esac
10543fi
10544ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10545if test -n "$ac_pt_PKG_CONFIG"; then
Christian Heimes32eba612021-03-19 10:29:25 +010010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10547$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010548else
Christian Heimes32eba612021-03-19 10:29:25 +010010549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010551fi
10552
10553 if test "x$ac_pt_PKG_CONFIG" = x; then
10554 PKG_CONFIG=""
10555 else
10556 case $cross_compiling:$ac_tool_warned in
10557yes:)
Christian Heimes32eba612021-03-19 10:29:25 +010010558{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10559$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010560ac_tool_warned=yes ;;
10561esac
10562 PKG_CONFIG=$ac_pt_PKG_CONFIG
10563 fi
10564else
10565 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10566fi
10567
10568fi
10569if test -n "$PKG_CONFIG"; then
10570 _pkg_min_version=0.9.0
Christian Heimes32eba612021-03-19 10:29:25 +010010571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10572$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010573 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Christian Heimes32eba612021-03-19 10:29:25 +010010574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10575$as_echo "yes" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010576 else
Christian Heimes32eba612021-03-19 10:29:25 +010010577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010579 PKG_CONFIG=""
10580 fi
10581fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010582
10583# Check for use of the system expat library
Christian Heimes32eba612021-03-19 10:29:25 +010010584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10585$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010586
10587# Check whether --with-system_expat was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010588if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010589 withval=$with_system_expat;
Christian Heimes32eba612021-03-19 10:29:25 +010010590else
Benjamin Peterson79263252010-10-31 16:50:44 +000010591 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010592fi
10593
10594
Christian Heimes32eba612021-03-19 10:29:25 +010010595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10596$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010597
10598# Check for use of the system libffi library
Christian Heimes32eba612021-03-19 10:29:25 +010010599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10600$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010601
10602# Check whether --with-system_ffi was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010603if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010604 withval=$with_system_ffi;
10605fi
10606
10607
Zachary Waref40d4dd2016-09-17 01:25:24 -050010608if test "$ac_sys_system" = "Darwin"
10609then
10610 case "$with_system_ffi" in
10611 "")
10612 with_system_ffi="no"
10613 ;;
10614 yes|no)
10615 ;;
10616 *)
10617 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10618 ;;
10619 esac
Christian Heimes32eba612021-03-19 10:29:25 +010010620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10621$as_echo "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010622else
Christian Heimes32eba612021-03-19 10:29:25 +010010623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10624$as_echo "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010625 if test "$with_system_ffi" != ""
10626 then
Christian Heimes32eba612021-03-19 10:29:25 +010010627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10628$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050010629 fi
10630 with_system_ffi="yes"
10631fi
Zachary Ware935043d2016-09-09 17:01:21 -070010632
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010633if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010634 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10635else
10636 LIBFFI_INCLUDEDIR=""
10637fi
10638
10639
Stefan Krah60187b52012-03-23 19:06:27 +010010640# Check for use of the system libmpdec library
Christian Heimes32eba612021-03-19 10:29:25 +010010641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10642$as_echo_n "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010643
10644# Check whether --with-system_libmpdec was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010645if test "${with_system_libmpdec+set}" = set; then :
Stefan Krah60187b52012-03-23 19:06:27 +010010646 withval=$with_system_libmpdec;
Christian Heimes32eba612021-03-19 10:29:25 +010010647else
Stefan Krah60187b52012-03-23 19:06:27 +010010648 with_system_libmpdec="no"
10649fi
10650
10651
Christian Heimes32eba612021-03-19 10:29:25 +010010652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10653$as_echo "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010654
Stefan Krah815280e2020-02-29 19:43:42 +010010655# Check whether _decimal should use a coroutine-local or thread-local context
Christian Heimes32eba612021-03-19 10:29:25 +010010656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10657$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010658
10659# Check whether --with-decimal_contextvar was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010660if test "${with_decimal_contextvar+set}" = set; then :
Stefan Krah815280e2020-02-29 19:43:42 +010010661 withval=$with_decimal_contextvar;
Christian Heimes32eba612021-03-19 10:29:25 +010010662else
Stefan Krah815280e2020-02-29 19:43:42 +010010663 with_decimal_contextvar="yes"
10664fi
10665
10666
10667if test "$with_decimal_contextvar" != "no"
10668then
10669
Christian Heimes32eba612021-03-19 10:29:25 +010010670$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010010671
10672fi
10673
Christian Heimes32eba612021-03-19 10:29:25 +010010674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10675$as_echo "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010676
Benjamin Peterson076ed002010-10-31 17:11:02 +000010677# Check for support for loadable sqlite extensions
Christian Heimes32eba612021-03-19 10:29:25 +010010678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10679$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010680# Check whether --enable-loadable-sqlite-extensions was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010681if test "${enable_loadable_sqlite_extensions+set}" = set; then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000010682 enableval=$enable_loadable_sqlite_extensions;
Christian Heimes32eba612021-03-19 10:29:25 +010010683else
Benjamin Peterson076ed002010-10-31 17:11:02 +000010684 enable_loadable_sqlite_extensions="no"
10685fi
10686
10687
Christian Heimes32eba612021-03-19 10:29:25 +010010688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10689$as_echo "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010690
Ned Deilyd819b932013-09-06 01:07:05 -070010691# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10692
10693
Christian Heimes32eba612021-03-19 10:29:25 +010010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10695$as_echo_n "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010696
10697# Check whether --with-tcltk-includes was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010698if test "${with_tcltk_includes+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010699 withval=$with_tcltk_includes;
Christian Heimes32eba612021-03-19 10:29:25 +010010700else
Ned Deilyd819b932013-09-06 01:07:05 -070010701 with_tcltk_includes="default"
10702fi
10703
Christian Heimes32eba612021-03-19 10:29:25 +010010704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10705$as_echo "$with_tcltk_includes" >&6; }
10706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10707$as_echo_n "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010708
10709# Check whether --with-tcltk-libs was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010710if test "${with_tcltk_libs+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010711 withval=$with_tcltk_libs;
Christian Heimes32eba612021-03-19 10:29:25 +010010712else
Ned Deilyd819b932013-09-06 01:07:05 -070010713 with_tcltk_libs="default"
10714fi
10715
Christian Heimes32eba612021-03-19 10:29:25 +010010716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10717$as_echo "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010718if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10719then
10720 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10721 then
10722 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10723 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010010724 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
10725 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
10726 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
10727 else
10728 TCLTK_INCLUDES=""
10729 TCLTK_LIBS=""
10730 fi
Ned Deilyd819b932013-09-06 01:07:05 -070010731else
10732 TCLTK_INCLUDES="$with_tcltk_includes"
10733 TCLTK_LIBS="$with_tcltk_libs"
10734fi
10735
Matthias Klose55708cc2009-04-30 08:06:49 +000010736# Check for --with-dbmliborder
Christian Heimes32eba612021-03-19 10:29:25 +010010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10738$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010739
10740# Check whether --with-dbmliborder was given.
Christian Heimes32eba612021-03-19 10:29:25 +010010741if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010742 withval=$with_dbmliborder;
10743if test x$with_dbmliborder = xyes
10744then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010745as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010746else
10747 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10748 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10749 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010750 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010751 fi
10752 done
10753fi
10754fi
10755
Christian Heimes32eba612021-03-19 10:29:25 +010010756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10757$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010758
Martin v. Löwis11437992002-04-12 09:54:03 +000010759# Templates for things AC_DEFINEd more than once.
10760# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010761
10762
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010763if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010764then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010765 # Defining _REENTRANT on system with POSIX threads should not hurt.
Christian Heimes32eba612021-03-19 10:29:25 +010010766 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010767
10768 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010769 if test "$ac_sys_system" = "SunOS"; then
10770 CFLAGS="$CFLAGS -D_REENTRANT"
10771 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010772elif test "$ac_cv_kpthread" = "yes"
10773then
10774 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010775 if test "$ac_cv_cxx_thread" = "yes"; then
10776 CXX="$CXX -Kpthread"
10777 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010778 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010779elif test "$ac_cv_kthread" = "yes"
10780then
10781 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010782 if test "$ac_cv_cxx_thread" = "yes"; then
10783 CXX="$CXX -Kthread"
10784 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010785 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010786elif test "$ac_cv_pthread" = "yes"
10787then
10788 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010789 if test "$ac_cv_cxx_thread" = "yes"; then
10790 CXX="$CXX -pthread"
10791 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010792 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010793else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010794 if test ! -z "$withval" -a -d "$withval"
10795 then LDFLAGS="$LDFLAGS -L$withval"
10796 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010797
10798 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010799 # define _POSIX_THREADS in unistd.h. Some apparently don't
10800 # (e.g. gnu pth with pthread emulation)
Christian Heimes32eba612021-03-19 10:29:25 +010010801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10802$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010805
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010806#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010807#ifdef _POSIX_THREADS
10808yes
10809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010810
10811_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +010010813 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010814 unistd_defines_pthreads=yes
Christian Heimes32eba612021-03-19 10:29:25 +010010815else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010816 unistd_defines_pthreads=no
10817fi
Christian Heimes32eba612021-03-19 10:29:25 +010010818rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010819
Christian Heimes32eba612021-03-19 10:29:25 +010010820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10821$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010822
Christian Heimes32eba612021-03-19 10:29:25 +010010823 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010824
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010825 # Just looking for pthread_create in libpthread is not enough:
10826 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10827 # So we really have to include pthread.h, and then link.
10828 _libs=$LIBS
10829 LIBS="$LIBS -lpthread"
Christian Heimes32eba612021-03-19 10:29:25 +010010830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10831$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010833/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010834
10835#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010836#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010837
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010838void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010839int
Christian Heimes32eba612021-03-19 10:29:25 +010010840main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010841{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010842
10843pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010844 ;
10845 return 0;
10846}
10847_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010848if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Christian Heimes32eba612021-03-19 10:29:25 +010010850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10851$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010852 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010853
Christian Heimes32eba612021-03-19 10:29:25 +010010854else
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010856 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Christian Heimes32eba612021-03-19 10:29:25 +010010858if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010859
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010860 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010861
Christian Heimes32eba612021-03-19 10:29:25 +010010862else
Guido van Rossumad678af1998-10-02 14:42:15 +000010863
Christian Heimes32eba612021-03-19 10:29:25 +010010864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10865$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
10866if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
10867 $as_echo_n "(cached) " >&6
10868else
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010870LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010874/* Override any GCC internal prototype to avoid an error.
10875 Use char because int might match the return type of a GCC
10876 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010010877#ifdef __cplusplus
10878extern "C"
10879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010880char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010881int
Christian Heimes32eba612021-03-19 10:29:25 +010010882main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010884return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 ;
10886 return 0;
10887}
10888_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 ac_cv_lib_pthreads_pthread_create=yes
Christian Heimes32eba612021-03-19 10:29:25 +010010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010893fi
Christian Heimes32eba612021-03-19 10:29:25 +010010894rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010896LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010897fi
Christian Heimes32eba612021-03-19 10:29:25 +010010898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10899$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
10900if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010901
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010902 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010903 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010904
Christian Heimes32eba612021-03-19 10:29:25 +010010905else
Greg Steinadf63d62000-07-05 10:38:09 +000010906
Christian Heimes32eba612021-03-19 10:29:25 +010010907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10908$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
10909if ${ac_cv_lib_c_r_pthread_create+:} false; then :
10910 $as_echo_n "(cached) " >&6
10911else
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010913LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010917/* Override any GCC internal prototype to avoid an error.
10918 Use char because int might match the return type of a GCC
10919 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010010920#ifdef __cplusplus
10921extern "C"
10922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010923char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010924int
Christian Heimes32eba612021-03-19 10:29:25 +010010925main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 ;
10929 return 0;
10930}
10931_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010933 ac_cv_lib_c_r_pthread_create=yes
Christian Heimes32eba612021-03-19 10:29:25 +010010934else
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010936fi
Christian Heimes32eba612021-03-19 10:29:25 +010010937rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010939LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010940fi
Christian Heimes32eba612021-03-19 10:29:25 +010010941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10942$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
10943if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010944
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010945 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010946 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010947
Christian Heimes32eba612021-03-19 10:29:25 +010010948else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010949
Christian Heimes32eba612021-03-19 10:29:25 +010010950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10951$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
10952if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
10953 $as_echo_n "(cached) " >&6
10954else
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010956LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010960/* Override any GCC internal prototype to avoid an error.
10961 Use char because int might match the return type of a GCC
10962 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010010963#ifdef __cplusplus
10964extern "C"
10965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010966char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010967int
Christian Heimes32eba612021-03-19 10:29:25 +010010968main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010971 ;
10972 return 0;
10973}
10974_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010010975if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 ac_cv_lib_pthread___pthread_create_system=yes
Christian Heimes32eba612021-03-19 10:29:25 +010010977else
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010979fi
Christian Heimes32eba612021-03-19 10:29:25 +010010980rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010982LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010983fi
Christian Heimes32eba612021-03-19 10:29:25 +010010984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10985$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
10986if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010987
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010988 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010989 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010990
Christian Heimes32eba612021-03-19 10:29:25 +010010991else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010992
Christian Heimes32eba612021-03-19 10:29:25 +010010993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10994$as_echo_n "checking for pthread_create in -lcma... " >&6; }
10995if ${ac_cv_lib_cma_pthread_create+:} false; then :
10996 $as_echo_n "(cached) " >&6
10997else
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010999LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003/* Override any GCC internal prototype to avoid an error.
11004 Use char because int might match the return type of a GCC
11005 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010011006#ifdef __cplusplus
11007extern "C"
11008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011009char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011010int
Christian Heimes32eba612021-03-19 10:29:25 +010011011main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 ;
11015 return 0;
11016}
11017_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011018if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 ac_cv_lib_cma_pthread_create=yes
Christian Heimes32eba612021-03-19 10:29:25 +010011020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011022fi
Christian Heimes32eba612021-03-19 10:29:25 +010011023rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011025LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011026fi
Christian Heimes32eba612021-03-19 10:29:25 +010011027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11028$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
11029if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011030
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011031 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011032 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011033
Christian Heimes32eba612021-03-19 10:29:25 +010011034else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011035
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011036 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11037
Guido van Rossum2d38f911996-06-26 19:47:01 +000011038fi
11039
Guido van Rossum627b2d71993-12-24 10:39:16 +000011040
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011041fi
11042
Guido van Rossum0be3e491997-05-22 20:33:33 +000011043fi
11044
Guido van Rossum49545951997-12-02 19:28:29 +000011045fi
11046
Guido van Rossumb93a8621998-05-07 13:27:32 +000011047fi
11048
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011049fi
Christian Heimes32eba612021-03-19 10:29:25 +010011050rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011052
Christian Heimes32eba612021-03-19 10:29:25 +010011053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11054$as_echo_n "checking for usconfig in -lmpc... " >&6; }
11055if ${ac_cv_lib_mpc_usconfig+:} false; then :
11056 $as_echo_n "(cached) " >&6
11057else
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011059LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063/* Override any GCC internal prototype to avoid an error.
11064 Use char because int might match the return type of a GCC
11065 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010011066#ifdef __cplusplus
11067extern "C"
11068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011069char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011070int
Christian Heimes32eba612021-03-19 10:29:25 +010011071main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 ;
11075 return 0;
11076}
11077_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011079 ac_cv_lib_mpc_usconfig=yes
Christian Heimes32eba612021-03-19 10:29:25 +010011080else
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011082fi
Christian Heimes32eba612021-03-19 10:29:25 +010011083rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011085LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011086fi
Christian Heimes32eba612021-03-19 10:29:25 +010011087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11088$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
11089if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011090
Martin v. Löwis130fb172001-07-19 11:00:41 +000011091 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011092
Guido van Rossum627b2d71993-12-24 10:39:16 +000011093fi
11094
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011095
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011096fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011097
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011098if test "$posix_threads" = "yes"; then
11099 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011100
Christian Heimes32eba612021-03-19 10:29:25 +010011101$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011102
11103 fi
11104
11105 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11106 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011107 SunOS/5.6)
Christian Heimes32eba612021-03-19 10:29:25 +010011108$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011109
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011110 ;;
11111 SunOS/5.8)
Christian Heimes32eba612021-03-19 10:29:25 +010011112$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011113
11114 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011115 AIX/*)
Christian Heimes32eba612021-03-19 10:29:25 +010011116$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011117
11118 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011119 esac
11120
Christian Heimes32eba612021-03-19 10:29:25 +010011121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11122$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
11123 if ${ac_cv_pthread_system_supported+:} false; then :
11124 $as_echo_n "(cached) " >&6
11125else
11126 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011127 ac_cv_pthread_system_supported=no
Christian Heimes32eba612021-03-19 10:29:25 +010011128else
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011131
11132 #include <stdio.h>
11133 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011134 void *foo(void *parm) {
11135 return NULL;
11136 }
11137 main() {
11138 pthread_attr_t attr;
11139 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011140 if (pthread_attr_init(&attr)) return (-1);
11141 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11142 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11143 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011144 }
11145_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011146if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011147 ac_cv_pthread_system_supported=yes
Christian Heimes32eba612021-03-19 10:29:25 +010011148else
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011153fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155
Guido van Rossum627b2d71993-12-24 10:39:16 +000011156fi
11157
Christian Heimes32eba612021-03-19 10:29:25 +010011158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11159$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011160 if test "$ac_cv_pthread_system_supported" = "yes"; then
11161
Christian Heimes32eba612021-03-19 10:29:25 +010011162$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011163
11164 fi
Christian Heimes32eba612021-03-19 10:29:25 +010011165 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000011166do :
11167 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Christian Heimes32eba612021-03-19 10:29:25 +010011168if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
11169 cat >>confdefs.h <<_ACEOF
11170#define HAVE_PTHREAD_SIGMASK 1
11171_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011172 case $ac_sys_system in
11173 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011174
Christian Heimes32eba612021-03-19 10:29:25 +010011175$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011176
11177 ;;
11178 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011179fi
Pablo Galindocc128882021-03-01 16:47:53 +000011180done
Christian Heimes32eba612021-03-19 10:29:25 +010011181
11182 for ac_func in pthread_getcpuclockid
11183do :
11184 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11185if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11186 cat >>confdefs.h <<_ACEOF
11187#define HAVE_PTHREAD_GETCPUCLOCKID 1
11188_ACEOF
pdoxe14679c2017-10-05 00:01:56 -070011189
11190fi
Christian Heimes32eba612021-03-19 10:29:25 +010011191done
pdoxe14679c2017-10-05 00:01:56 -070011192
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011193fi
11194
11195
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011196# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011197
Christian Heimes32eba612021-03-19 10:29:25 +010011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11199$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200# Check whether --enable-ipv6 was given.
Christian Heimes32eba612021-03-19 10:29:25 +010011201if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011203 no)
Christian Heimes32eba612021-03-19 10:29:25 +010011204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11205$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011206 ipv6=no
11207 ;;
Christian Heimes32eba612021-03-19 10:29:25 +010011208 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11209$as_echo "yes" >&6; }
11210 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011211
11212 ipv6=yes
11213 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 esac
Christian Heimes32eba612021-03-19 10:29:25 +010011215else
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011218/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011219 /* AF_INET6 available check */
11220#include <sys/types.h>
11221#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011222int
Christian Heimes32eba612021-03-19 10:29:25 +010011223main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011224{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011225int domain = AF_INET6;
11226 ;
11227 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011228}
Martin v. Löwis11437992002-04-12 09:54:03 +000011229_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011230if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011231
Christian Heimes32eba612021-03-19 10:29:25 +010011232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11233$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011234 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011235
Christian Heimes32eba612021-03-19 10:29:25 +010011236else
Matthias Kloseb159a552010-04-25 21:00:44 +000011237
Christian Heimes32eba612021-03-19 10:29:25 +010011238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011240 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011241
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011242fi
Christian Heimes32eba612021-03-19 10:29:25 +010011243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011244
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011245if test "$ipv6" = "yes"; then
Christian Heimes32eba612021-03-19 10:29:25 +010011246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11247$as_echo_n "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011250
11251 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011252#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011253int
Christian Heimes32eba612021-03-19 10:29:25 +010011254main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011255{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011256struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011257 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 ;
11259 return 0;
11260}
Matthias Kloseb159a552010-04-25 21:00:44 +000011261
Martin v. Löwis11437992002-04-12 09:54:03 +000011262_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011263if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011264
Christian Heimes32eba612021-03-19 10:29:25 +010011265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11266$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011267 ipv6=yes
11268
Christian Heimes32eba612021-03-19 10:29:25 +010011269else
Matthias Kloseb159a552010-04-25 21:00:44 +000011270
Christian Heimes32eba612021-03-19 10:29:25 +010011271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011273 ipv6=no
11274
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011275fi
Christian Heimes32eba612021-03-19 10:29:25 +010011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011277fi
11278
11279if test "$ipv6" = "yes"; then
Christian Heimes32eba612021-03-19 10:29:25 +010011280 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011281
11282fi
11283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284fi
11285
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011286
11287ipv6type=unknown
11288ipv6lib=none
11289ipv6trylibc=no
11290
11291if test "$ipv6" = "yes"; then
Christian Heimes32eba612021-03-19 10:29:25 +010011292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11293$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011294 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11295 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011296 case $i in
11297 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011300
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011301#include <netinet/in.h>
11302#ifdef IPV6_INRIA_VERSION
11303yes
11304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011305_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +010011307 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011308 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011309fi
Christian Heimes32eba612021-03-19 10:29:25 +010011310rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011311
11312 ;;
11313 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011315/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011316
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011317#include <netinet/in.h>
11318#ifdef __KAME__
11319yes
11320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011321_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +010011323 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011324 ipv6type=$i;
11325 ipv6lib=inet6
11326 ipv6libdir=/usr/local/v6/lib
11327 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011328fi
Christian Heimes32eba612021-03-19 10:29:25 +010011329rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011330
11331 ;;
11332 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011334/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011335
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011336#include <features.h>
11337#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11338yes
11339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011340_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +010011342 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011343 ipv6type=$i;
11344 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011345fi
Christian Heimes32eba612021-03-19 10:29:25 +010011346rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011347
11348 ;;
11349 linux-inet6)
11350 if test -d /usr/inet6; then
11351 ipv6type=$i
11352 ipv6lib=inet6
11353 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011354 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011355 fi
11356 ;;
11357 solaris)
11358 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011359 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011360 ipv6type=$i
11361 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362 fi
11363 fi
11364 ;;
11365 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011368
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011369#include <sys/param.h>
11370#ifdef _TOSHIBA_INET6
11371yes
11372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011373_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +010011375 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011376 ipv6type=$i;
11377 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011378 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011379fi
Christian Heimes32eba612021-03-19 10:29:25 +010011380rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011381
11382 ;;
11383 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011385/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011386
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011387#include </usr/local/v6/include/sys/v6config.h>
11388#ifdef __V6D__
11389yes
11390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011391_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +010011393 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011394 ipv6type=$i;
11395 ipv6lib=v6;
11396 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011397 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011398fi
Christian Heimes32eba612021-03-19 10:29:25 +010011399rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011400
11401 ;;
11402 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011405
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011406#include <sys/param.h>
11407#ifdef _ZETA_MINAMI_INET6
11408yes
11409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011410_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes32eba612021-03-19 10:29:25 +010011412 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011413 ipv6type=$i;
11414 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011415 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011416fi
Christian Heimes32eba612021-03-19 10:29:25 +010011417rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011418
11419 ;;
11420 esac
11421 if test "$ipv6type" != "unknown"; then
11422 break
11423 fi
11424 done
Christian Heimes32eba612021-03-19 10:29:25 +010011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11426$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011427fi
11428
11429if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11430 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11431 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11432 echo "using lib$ipv6lib"
11433 else
11434 if test $ipv6trylibc = "yes"; then
11435 echo "using libc"
11436 else
11437 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11438 echo "You need to fetch lib$ipv6lib.a from appropriate"
11439 echo 'ipv6 kit and compile beforehand.'
11440 exit 1
11441 fi
11442 fi
11443fi
11444
Christian Heimes32eba612021-03-19 10:29:25 +010011445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11446$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11448/* end confdefs.h. */
11449 /* CAN_RAW_FD_FRAMES available check */
11450#include <linux/can/raw.h>
11451int
Christian Heimes32eba612021-03-19 10:29:25 +010011452main ()
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011453{
11454int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11455 ;
11456 return 0;
11457}
11458_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011459if ac_fn_c_try_compile "$LINENO"; then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011460
11461
Christian Heimes32eba612021-03-19 10:29:25 +010011462$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011463
Christian Heimes32eba612021-03-19 10:29:25 +010011464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11465$as_echo "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011466
Christian Heimes32eba612021-03-19 10:29:25 +010011467else
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011468
Christian Heimes32eba612021-03-19 10:29:25 +010011469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011471
11472fi
Christian Heimes32eba612021-03-19 10:29:25 +010011473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011474
Christian Heimes32eba612021-03-19 10:29:25 +010011475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11476$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11478/* end confdefs.h. */
11479
11480#include <linux/can/raw.h>
11481int
Christian Heimes32eba612021-03-19 10:29:25 +010011482main ()
Zackery Spytz97e0de02020-04-09 06:03:49 -060011483{
11484int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11485 ;
11486 return 0;
11487}
11488_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011489if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060011490
11491
Christian Heimes32eba612021-03-19 10:29:25 +010011492$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060011493
Christian Heimes32eba612021-03-19 10:29:25 +010011494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11495$as_echo "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011496
Christian Heimes32eba612021-03-19 10:29:25 +010011497else
Zackery Spytz97e0de02020-04-09 06:03:49 -060011498
Christian Heimes32eba612021-03-19 10:29:25 +010011499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011501
11502fi
Christian Heimes32eba612021-03-19 10:29:25 +010011503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060011504
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011505# Check for --with-doc-strings
Christian Heimes32eba612021-03-19 10:29:25 +010011506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11507$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509# Check whether --with-doc-strings was given.
Christian Heimes32eba612021-03-19 10:29:25 +010011510if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511 withval=$with_doc_strings;
11512fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011513
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011514
11515if test -z "$with_doc_strings"
11516then with_doc_strings="yes"
11517fi
11518if test "$with_doc_strings" != "no"
11519then
11520
Christian Heimes32eba612021-03-19 10:29:25 +010011521$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011522
11523fi
Christian Heimes32eba612021-03-19 10:29:25 +010011524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11525$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011526
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011527# Check for Python-specific malloc support
Christian Heimes32eba612021-03-19 10:29:25 +010011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11529$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531# Check whether --with-pymalloc was given.
Christian Heimes32eba612021-03-19 10:29:25 +010011532if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533 withval=$with_pymalloc;
11534fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011535
Neil Schemenauera35c6882001-02-27 04:45:05 +000011536
Neil Schemenauer16c22972002-03-22 15:34:49 +000011537if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011538then
11539 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011540fi
11541if test "$with_pymalloc" != "no"
11542then
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Christian Heimes32eba612021-03-19 10:29:25 +010011544$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011545
11546fi
Christian Heimes32eba612021-03-19 10:29:25 +010011547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11548$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011549
Nick Coghlan6ea41862017-06-11 13:16:15 +100011550# Check for --with-c-locale-coercion
Christian Heimes32eba612021-03-19 10:29:25 +010011551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11552$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011553
11554# Check whether --with-c-locale-coercion was given.
Christian Heimes32eba612021-03-19 10:29:25 +010011555if test "${with_c_locale_coercion+set}" = set; then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100011556 withval=$with_c_locale_coercion;
11557fi
11558
11559
11560if test -z "$with_c_locale_coercion"
11561then
11562 with_c_locale_coercion="yes"
11563fi
11564if test "$with_c_locale_coercion" != "no"
11565then
11566
Christian Heimes32eba612021-03-19 10:29:25 +010011567$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100011568
11569fi
Christian Heimes32eba612021-03-19 10:29:25 +010011570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11571$as_echo "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011572
Benjamin Peterson05159c42009-12-03 03:01:27 +000011573# Check for Valgrind support
Christian Heimes32eba612021-03-19 10:29:25 +010011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11575$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011576
11577# Check whether --with-valgrind was given.
Christian Heimes32eba612021-03-19 10:29:25 +010011578if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011579 withval=$with_valgrind;
Christian Heimes32eba612021-03-19 10:29:25 +010011580else
Benjamin Peterson05159c42009-12-03 03:01:27 +000011581 with_valgrind=no
11582fi
11583
Christian Heimes32eba612021-03-19 10:29:25 +010011584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11585$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011586if test "$with_valgrind" != no; then
Christian Heimes32eba612021-03-19 10:29:25 +010011587 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
11588if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011589
Christian Heimes32eba612021-03-19 10:29:25 +010011590$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011591
Christian Heimes32eba612021-03-19 10:29:25 +010011592else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011593 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011594
11595fi
11596
Christian Heimes32eba612021-03-19 10:29:25 +010011597
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011598 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011599fi
11600
Łukasz Langaa785c872016-09-09 17:37:37 -070011601# Check for DTrace support
Christian Heimes32eba612021-03-19 10:29:25 +010011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11603$as_echo_n "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011604
11605# Check whether --with-dtrace was given.
Christian Heimes32eba612021-03-19 10:29:25 +010011606if test "${with_dtrace+set}" = set; then :
Łukasz Langaa785c872016-09-09 17:37:37 -070011607 withval=$with_dtrace;
Christian Heimes32eba612021-03-19 10:29:25 +010011608else
Łukasz Langaa785c872016-09-09 17:37:37 -070011609 with_dtrace=no
11610fi
11611
Christian Heimes32eba612021-03-19 10:29:25 +010011612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11613$as_echo "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011614
11615
11616
11617
11618
11619DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011620DTRACE_HEADERS=
11621DTRACE_OBJS=
11622
11623if test "$with_dtrace" = "yes"
11624then
11625 # Extract the first word of "dtrace", so it can be a program name with args.
11626set dummy dtrace; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +010011627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11628$as_echo_n "checking for $ac_word... " >&6; }
11629if ${ac_cv_path_DTRACE+:} false; then :
11630 $as_echo_n "(cached) " >&6
11631else
Łukasz Langaa785c872016-09-09 17:37:37 -070011632 case $DTRACE in
11633 [\\/]* | ?:[\\/]*)
11634 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11635 ;;
11636 *)
11637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11638for as_dir in $PATH
11639do
11640 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +010011641 test -z "$as_dir" && as_dir=.
Łukasz Langaa785c872016-09-09 17:37:37 -070011642 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +010011643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11644 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070011646 break 2
11647 fi
11648done
11649 done
11650IFS=$as_save_IFS
11651
11652 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11653 ;;
11654esac
11655fi
11656DTRACE=$ac_cv_path_DTRACE
11657if test -n "$DTRACE"; then
Christian Heimes32eba612021-03-19 10:29:25 +010011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11659$as_echo "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011660else
Christian Heimes32eba612021-03-19 10:29:25 +010011661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11662$as_echo "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011663fi
11664
11665
11666 if test "$DTRACE" = "not found"; then
11667 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11668 fi
11669
Christian Heimes32eba612021-03-19 10:29:25 +010011670$as_echo "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070011671
11672 DTRACE_HEADERS="Include/pydtrace_probes.h"
11673
11674 # On OS X, DTrace providers do not need to be explicitly compiled and
11675 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11676 # generation flag '-G'. We check for presence of this flag, rather than
11677 # hardcoding support by OS, in the interest of robustness.
Christian Heimes32eba612021-03-19 10:29:25 +010011678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11679$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11680if ${ac_cv_dtrace_link+:} false; then :
11681 $as_echo_n "(cached) " >&6
11682else
Łukasz Langaa785c872016-09-09 17:37:37 -070011683 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011684 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011685 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011686 ac_cv_dtrace_link=yes
11687
11688fi
Christian Heimes32eba612021-03-19 10:29:25 +010011689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11690$as_echo "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011691 if test "$ac_cv_dtrace_link" = "yes"; then
11692 DTRACE_OBJS="Python/pydtrace.o"
11693 fi
11694fi
11695
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011696# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011697
Guido van Rossum98935bf2001-09-05 19:13:16 +000011698DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011699
Guido van Rossume97ee181999-12-20 21:27:22 +000011700# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011701# platforms have dlopen(), but don't want to use it.
Christian Heimes32eba612021-03-19 10:29:25 +010011702for ac_func in dlopen
11703do :
11704 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11705if test "x$ac_cv_func_dlopen" = xyes; then :
11706 cat >>confdefs.h <<_ACEOF
11707#define HAVE_DLOPEN 1
11708_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011709
Guido van Rossume97ee181999-12-20 21:27:22 +000011710fi
Christian Heimes32eba612021-03-19 10:29:25 +010011711done
Guido van Rossume97ee181999-12-20 21:27:22 +000011712
Michael W. Hudson54241132001-12-07 15:38:26 +000011713
Guido van Rossume97ee181999-12-20 21:27:22 +000011714# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11715# loading of modules.
11716
Christian Heimes32eba612021-03-19 10:29:25 +010011717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11718$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011719if test -z "$DYNLOADFILE"
11720then
11721 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011722 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011723 *)
11724 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11725 # out any dynamic loading
11726 if test "$ac_cv_func_dlopen" = yes
11727 then DYNLOADFILE="dynload_shlib.o"
11728 else DYNLOADFILE="dynload_stub.o"
11729 fi
11730 ;;
11731 esac
11732fi
Christian Heimes32eba612021-03-19 10:29:25 +010011733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11734$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011735if test "$DYNLOADFILE" != "dynload_stub.o"
11736then
Martin v. Löwis11437992002-04-12 09:54:03 +000011737
Christian Heimes32eba612021-03-19 10:29:25 +010011738$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011739
11740fi
11741
Neil Schemenauer4e425612001-06-19 15:44:15 +000011742# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11743
Michael W. Hudson54241132001-12-07 15:38:26 +000011744
Christian Heimes32eba612021-03-19 10:29:25 +010011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11746$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011747if test -z "$MACHDEP_OBJS"
11748then
Jack Jansene578a632001-08-15 01:27:14 +000011749 MACHDEP_OBJS=$extra_machdep_objs
11750else
11751 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011752fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011753if test -z "$MACHDEP_OBJS"; then
Christian Heimes32eba612021-03-19 10:29:25 +010011754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11755$as_echo "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011756else
Christian Heimes32eba612021-03-19 10:29:25 +010011757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11758$as_echo "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011759fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011760
Guido van Rossum627b2d71993-12-24 10:39:16 +000011761# checks for library functions
Christian Heimes32eba612021-03-19 10:29:25 +010011762for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
11763 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11764 explicit_memset faccessat fchmod fchmodat fchown fchownat \
11765 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
11766 futimens futimes gai_strerror getentropy \
11767 getgrgid_r getgrnam_r \
11768 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
11769 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
11770 if_nameindex \
11771 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
11772 memrchr mbrtowc mkdirat mkfifo \
11773 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
11774 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
11775 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
11776 readlink readlinkat readv realpath renameat \
11777 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
11778 setgid sethostname \
11779 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
11780 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11781 sched_rr_get_interval \
11782 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
11783 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
11784 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
11785 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
11786 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
11787do :
11788 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11789ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11790if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11791 cat >>confdefs.h <<_ACEOF
11792#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11793_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011794
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011795fi
Christian Heimes32eba612021-03-19 10:29:25 +010011796done
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011797
Michael W. Hudson54241132001-12-07 15:38:26 +000011798
Benjamin Peterson40caa052018-09-12 15:52:40 -070011799# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11800# links. Some libc implementations have a stub lchmod implementation that always
11801# returns an error.
11802if test "$MACHDEP" != linux; then
Christian Heimes32eba612021-03-19 10:29:25 +010011803 for ac_func in lchmod
11804do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011805 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Christian Heimes32eba612021-03-19 10:29:25 +010011806if test "x$ac_cv_func_lchmod" = xyes; then :
11807 cat >>confdefs.h <<_ACEOF
11808#define HAVE_LCHMOD 1
Benjamin Petersoned709d52018-09-12 17:22:11 -070011809_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011810
11811fi
Christian Heimes32eba612021-03-19 10:29:25 +010011812done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011813
Christian Heimes32eba612021-03-19 10:29:25 +010011814fi
11815
11816ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011817 #include <dirent.h>
Christian Heimes32eba612021-03-19 10:29:25 +010011818"
11819if test "x$ac_cv_have_decl_dirfd" = xyes; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011820
Christian Heimes32eba612021-03-19 10:29:25 +010011821$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011822
11823fi
11824
Christian Heimes32eba612021-03-19 10:29:25 +010011825
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011826# For some functions, having a definition is not sufficient, since
11827# we want to take their address.
Christian Heimes32eba612021-03-19 10:29:25 +010011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11829$as_echo_n "checking for chroot... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011831/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011832#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011833int
Christian Heimes32eba612021-03-19 10:29:25 +010011834main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011835{
11836void *x=chroot
11837 ;
11838 return 0;
11839}
11840_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011842
Christian Heimes32eba612021-03-19 10:29:25 +010011843$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011844
Christian Heimes32eba612021-03-19 10:29:25 +010011845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11846$as_echo "yes" >&6; }
11847else
11848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11849$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011850
11851fi
Christian Heimes32eba612021-03-19 10:29:25 +010011852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11854$as_echo_n "checking for link... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011856/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011857#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011858int
Christian Heimes32eba612021-03-19 10:29:25 +010011859main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011860{
11861void *x=link
11862 ;
11863 return 0;
11864}
11865_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011867
Christian Heimes32eba612021-03-19 10:29:25 +010011868$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011869
Christian Heimes32eba612021-03-19 10:29:25 +010011870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11871$as_echo "yes" >&6; }
11872else
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11874$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011875
11876fi
Christian Heimes32eba612021-03-19 10:29:25 +010011877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11879$as_echo_n "checking for symlink... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011881/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011882#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011883int
Christian Heimes32eba612021-03-19 10:29:25 +010011884main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011885{
11886void *x=symlink
11887 ;
11888 return 0;
11889}
11890_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011892
Christian Heimes32eba612021-03-19 10:29:25 +010011893$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011894
Christian Heimes32eba612021-03-19 10:29:25 +010011895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11896$as_echo "yes" >&6; }
11897else
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11899$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011900
11901fi
Christian Heimes32eba612021-03-19 10:29:25 +010011902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11904$as_echo_n "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011906/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011907#include <unistd.h>
11908int
Christian Heimes32eba612021-03-19 10:29:25 +010011909main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011910{
11911void *x=fchdir
11912 ;
11913 return 0;
11914}
11915_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011917
Christian Heimes32eba612021-03-19 10:29:25 +010011918$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011919
Christian Heimes32eba612021-03-19 10:29:25 +010011920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11921$as_echo "yes" >&6; }
11922else
11923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11924$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011925
11926fi
Christian Heimes32eba612021-03-19 10:29:25 +010011927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11929$as_echo_n "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011931/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011932#include <unistd.h>
11933int
Christian Heimes32eba612021-03-19 10:29:25 +010011934main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011935{
11936void *x=fsync
11937 ;
11938 return 0;
11939}
11940_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011941if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011942
Christian Heimes32eba612021-03-19 10:29:25 +010011943$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011944
Christian Heimes32eba612021-03-19 10:29:25 +010011945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11946$as_echo "yes" >&6; }
11947else
11948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011950
11951fi
Christian Heimes32eba612021-03-19 10:29:25 +010011952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11954$as_echo_n "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011956/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011957#include <unistd.h>
11958int
Christian Heimes32eba612021-03-19 10:29:25 +010011959main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011960{
11961void *x=fdatasync
11962 ;
11963 return 0;
11964}
11965_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011967
Christian Heimes32eba612021-03-19 10:29:25 +010011968$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011969
Christian Heimes32eba612021-03-19 10:29:25 +010011970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11971$as_echo "yes" >&6; }
11972else
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11974$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011975
11976fi
Christian Heimes32eba612021-03-19 10:29:25 +010011977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11979$as_echo_n "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011981/* end confdefs.h. */
11982#include <sys/epoll.h>
11983int
Christian Heimes32eba612021-03-19 10:29:25 +010011984main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011985{
11986void *x=epoll_create
11987 ;
11988 return 0;
11989}
11990_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010011991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011992
Christian Heimes32eba612021-03-19 10:29:25 +010011993$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011994
Christian Heimes32eba612021-03-19 10:29:25 +010011995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11996$as_echo "yes" >&6; }
11997else
11998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11999$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012000
12001fi
Christian Heimes32eba612021-03-19 10:29:25 +010012002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
12004$as_echo_n "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060012005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12006/* end confdefs.h. */
12007#include <sys/epoll.h>
12008int
Christian Heimes32eba612021-03-19 10:29:25 +010012009main ()
Benjamin Peterson95c16622011-12-27 15:36:32 -060012010{
12011void *x=epoll_create1
12012 ;
12013 return 0;
12014}
12015_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012016if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060012017
Christian Heimes32eba612021-03-19 10:29:25 +010012018$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060012019
Christian Heimes32eba612021-03-19 10:29:25 +010012020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12021$as_echo "yes" >&6; }
12022else
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12024$as_echo "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060012025
12026fi
Christian Heimes32eba612021-03-19 10:29:25 +010012027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12029$as_echo_n "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012031/* end confdefs.h. */
12032
12033#include <sys/types.h>
12034#include <sys/event.h>
12035
12036int
Christian Heimes32eba612021-03-19 10:29:25 +010012037main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012038{
12039int x=kqueue()
12040 ;
12041 return 0;
12042}
12043_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012044if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012045
Christian Heimes32eba612021-03-19 10:29:25 +010012046$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012047
Christian Heimes32eba612021-03-19 10:29:25 +010012048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12049$as_echo "yes" >&6; }
12050else
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012053
12054fi
Christian Heimes32eba612021-03-19 10:29:25 +010012055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12057$as_echo_n "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12059/* end confdefs.h. */
12060
12061#include <sys/time.h>
12062#include <sys/resource.h>
12063
12064int
Christian Heimes32eba612021-03-19 10:29:25 +010012065main ()
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012066{
12067void *x=prlimit
12068 ;
12069 return 0;
12070}
12071_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012072if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012073
Christian Heimes32eba612021-03-19 10:29:25 +010012074$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012075
Christian Heimes32eba612021-03-19 10:29:25 +010012076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12077$as_echo "yes" >&6; }
12078else
12079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12080$as_echo "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012081
12082fi
Christian Heimes32eba612021-03-19 10:29:25 +010012083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12085$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12087/* end confdefs.h. */
12088#include <mach-o/dyld.h>
12089int
Christian Heimes32eba612021-03-19 10:29:25 +010012090main ()
Ronald Oussoren41761932020-11-08 10:05:27 +010012091{
12092void *x=_dyld_shared_cache_contains_path
12093 ;
12094 return 0;
12095}
12096_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012097if ac_fn_c_try_compile "$LINENO"; then :
Ronald Oussoren41761932020-11-08 10:05:27 +010012098
Christian Heimes32eba612021-03-19 10:29:25 +010012099$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010012100
Christian Heimes32eba612021-03-19 10:29:25 +010012101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12102$as_echo "yes" >&6; }
12103else
12104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12105$as_echo "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012106
12107fi
Christian Heimes32eba612021-03-19 10:29:25 +010012108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012109
Christian Heimes32eba612021-03-19 10:29:25 +010012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12111$as_echo_n "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12113/* end confdefs.h. */
12114
12115#ifdef HAVE_SYS_MMAN_H
12116#include <sys/mman.h>
12117#endif
12118#ifdef HAVE_SYS_MEMFD_H
12119#include <sys/memfd.h>
12120#endif
12121
12122int
Christian Heimes32eba612021-03-19 10:29:25 +010012123main ()
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012124{
12125void *x=memfd_create
12126 ;
12127 return 0;
12128}
12129_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012130if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012131
Christian Heimes32eba612021-03-19 10:29:25 +010012132$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012133
Christian Heimes32eba612021-03-19 10:29:25 +010012134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12135$as_echo "yes" >&6; }
12136else
12137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12138$as_echo "no" >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012139
12140fi
Christian Heimes32eba612021-03-19 10:29:25 +010012141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012142
Christian Heimes32eba612021-03-19 10:29:25 +010012143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12144$as_echo_n "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12146/* end confdefs.h. */
12147
12148#ifdef HAVE_SYS_EVENTFD_H
12149#include <sys/eventfd.h>
12150#endif
12151
12152int
Christian Heimes32eba612021-03-19 10:29:25 +010012153main ()
Christian Heimescd9fed62020-11-13 19:48:52 +010012154{
12155int x = eventfd(0, EFD_CLOEXEC)
12156 ;
12157 return 0;
12158}
12159_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012160if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimescd9fed62020-11-13 19:48:52 +010012161
Christian Heimes32eba612021-03-19 10:29:25 +010012162$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010012163
Christian Heimes32eba612021-03-19 10:29:25 +010012164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12165$as_echo "yes" >&6; }
12166else
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12168$as_echo "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012169
12170fi
Christian Heimes32eba612021-03-19 10:29:25 +010012171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010012172
Martin v. Löwisd5843682002-11-21 20:41:28 +000012173# On some systems (eg. FreeBSD 5), we would find a definition of the
12174# functions ctermid_r, setgroups in the library, but no prototype
12175# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12176# address to avoid compiler warnings and potential miscompilations
12177# because of the missing prototypes.
12178
Christian Heimes32eba612021-03-19 10:29:25 +010012179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12180$as_echo_n "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012182/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012183
Martin v. Löwisd5843682002-11-21 20:41:28 +000012184#include <stdio.h>
12185
Martin v. Löwisd5843682002-11-21 20:41:28 +000012186int
Christian Heimes32eba612021-03-19 10:29:25 +010012187main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012188{
12189void* p = ctermid_r
12190 ;
12191 return 0;
12192}
12193_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012195
Christian Heimes32eba612021-03-19 10:29:25 +010012196$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012197
Christian Heimes32eba612021-03-19 10:29:25 +010012198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12199$as_echo "yes" >&6; }
12200else
12201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12202$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012203
12204fi
Christian Heimes32eba612021-03-19 10:29:25 +010012205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206
Christian Heimes32eba612021-03-19 10:29:25 +010012207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12208$as_echo_n "checking for flock declaration... " >&6; }
12209if ${ac_cv_flock_decl+:} false; then :
12210 $as_echo_n "(cached) " >&6
12211else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012213/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012214#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012215int
Christian Heimes32eba612021-03-19 10:29:25 +010012216main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012217{
12218void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012219
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012220 ;
12221 return 0;
12222}
12223_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012224if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012225 ac_cv_flock_decl=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012226else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012227 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012228
12229fi
Christian Heimes32eba612021-03-19 10:29:25 +010012230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012231
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012232fi
Christian Heimes32eba612021-03-19 10:29:25 +010012233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12234$as_echo "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012235if test "x${ac_cv_flock_decl}" = xyes; then
12236 for ac_func in flock
12237do :
12238 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Christian Heimes32eba612021-03-19 10:29:25 +010012239if test "x$ac_cv_func_flock" = xyes; then :
12240 cat >>confdefs.h <<_ACEOF
12241#define HAVE_FLOCK 1
12242_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012243
Christian Heimes32eba612021-03-19 10:29:25 +010012244else
12245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
12246$as_echo_n "checking for flock in -lbsd... " >&6; }
12247if ${ac_cv_lib_bsd_flock+:} false; then :
12248 $as_echo_n "(cached) " >&6
12249else
Antoine Pitroua3000072010-09-07 14:52:42 +000012250 ac_check_lib_save_LIBS=$LIBS
12251LIBS="-lbsd $LIBS"
12252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12253/* end confdefs.h. */
12254
12255/* Override any GCC internal prototype to avoid an error.
12256 Use char because int might match the return type of a GCC
12257 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010012258#ifdef __cplusplus
12259extern "C"
12260#endif
Antoine Pitroua3000072010-09-07 14:52:42 +000012261char flock ();
12262int
Christian Heimes32eba612021-03-19 10:29:25 +010012263main ()
Antoine Pitroua3000072010-09-07 14:52:42 +000012264{
12265return flock ();
12266 ;
12267 return 0;
12268}
12269_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012270if ac_fn_c_try_link "$LINENO"; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012271 ac_cv_lib_bsd_flock=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012272else
Antoine Pitroua3000072010-09-07 14:52:42 +000012273 ac_cv_lib_bsd_flock=no
12274fi
Christian Heimes32eba612021-03-19 10:29:25 +010012275rm -f core conftest.err conftest.$ac_objext \
Antoine Pitroua3000072010-09-07 14:52:42 +000012276 conftest$ac_exeext conftest.$ac_ext
12277LIBS=$ac_check_lib_save_LIBS
12278fi
Christian Heimes32eba612021-03-19 10:29:25 +010012279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12280$as_echo "$ac_cv_lib_bsd_flock" >&6; }
12281if test "x$ac_cv_lib_bsd_flock" = xyes; then :
12282 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012283
12284
Christian Heimes32eba612021-03-19 10:29:25 +010012285$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012286
12287
12288fi
12289
12290
12291fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012292done
Christian Heimes32eba612021-03-19 10:29:25 +010012293
Antoine Pitroua3000072010-09-07 14:52:42 +000012294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295
Christian Heimes32eba612021-03-19 10:29:25 +010012296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12297$as_echo_n "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012299/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012300
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012301#include <unistd.h>
12302
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012303int
Christian Heimes32eba612021-03-19 10:29:25 +010012304main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012305{
12306void* p = getpagesize
12307 ;
12308 return 0;
12309}
12310_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012312
Christian Heimes32eba612021-03-19 10:29:25 +010012313$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012314
Christian Heimes32eba612021-03-19 10:29:25 +010012315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12316$as_echo "yes" >&6; }
12317else
12318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12319$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012320
12321fi
Christian Heimes32eba612021-03-19 10:29:25 +010012322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012323
Christian Heimes32eba612021-03-19 10:29:25 +010012324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12325$as_echo_n "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12327/* end confdefs.h. */
12328
12329#include <stdlib.h>
12330
12331int
Christian Heimes32eba612021-03-19 10:29:25 +010012332main ()
Victor Stinner984890f2011-11-24 13:53:38 +010012333{
12334int res = unsetenv("DUMMY")
12335 ;
12336 return 0;
12337}
12338_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012339if ac_fn_c_try_compile "$LINENO"; then :
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12341$as_echo "no" >&6; }
12342else
Victor Stinner984890f2011-11-24 13:53:38 +010012343
Christian Heimes32eba612021-03-19 10:29:25 +010012344$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010012345
Christian Heimes32eba612021-03-19 10:29:25 +010012346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12347$as_echo "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012348
12349fi
Christian Heimes32eba612021-03-19 10:29:25 +010012350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010012351
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012352for ac_prog in true
12353do
12354 # Extract the first word of "$ac_prog", so it can be a program name with args.
12355set dummy $ac_prog; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +010012356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12357$as_echo_n "checking for $ac_word... " >&6; }
12358if ${ac_cv_prog_TRUE+:} false; then :
12359 $as_echo_n "(cached) " >&6
12360else
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012361 if test -n "$TRUE"; then
12362 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12363else
12364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12365for as_dir in $PATH
12366do
12367 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +010012368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +010012370 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012371 ac_cv_prog_TRUE="$ac_prog"
Christian Heimes32eba612021-03-19 10:29:25 +010012372 $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 +000012373 break 2
12374 fi
12375done
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012378
12379fi
12380fi
12381TRUE=$ac_cv_prog_TRUE
12382if test -n "$TRUE"; then
Christian Heimes32eba612021-03-19 10:29:25 +010012383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12384$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012385else
Christian Heimes32eba612021-03-19 10:29:25 +010012386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12387$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012388fi
12389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012391 test -n "$TRUE" && break
12392done
12393test -n "$TRUE" || TRUE="/bin/true"
12394
12395
Christian Heimes32eba612021-03-19 10:29:25 +010012396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12397$as_echo_n "checking for inet_aton in -lc... " >&6; }
12398if ${ac_cv_lib_c_inet_aton+:} false; then :
12399 $as_echo_n "(cached) " >&6
12400else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012401 ac_check_lib_save_LIBS=$LIBS
12402LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012404/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406/* Override any GCC internal prototype to avoid an error.
12407 Use char because int might match the return type of a GCC
12408 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010012409#ifdef __cplusplus
12410extern "C"
12411#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012412char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012413int
Christian Heimes32eba612021-03-19 10:29:25 +010012414main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012417 ;
12418 return 0;
12419}
12420_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012422 ac_cv_lib_c_inet_aton=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012423else
Matthias Kloseb9621712010-04-24 17:59:49 +000012424 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012425fi
Christian Heimes32eba612021-03-19 10:29:25 +010012426rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012428LIBS=$ac_check_lib_save_LIBS
12429fi
Christian Heimes32eba612021-03-19 10:29:25 +010012430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12431$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
12432if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012433 $ac_cv_prog_TRUE
Christian Heimes32eba612021-03-19 10:29:25 +010012434else
12435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12436$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
12437if ${ac_cv_lib_resolv_inet_aton+:} false; then :
12438 $as_echo_n "(cached) " >&6
12439else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012440 ac_check_lib_save_LIBS=$LIBS
12441LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012443/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445/* Override any GCC internal prototype to avoid an error.
12446 Use char because int might match the return type of a GCC
12447 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010012448#ifdef __cplusplus
12449extern "C"
12450#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012451char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012452int
Christian Heimes32eba612021-03-19 10:29:25 +010012453main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012456 ;
12457 return 0;
12458}
12459_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012460if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012461 ac_cv_lib_resolv_inet_aton=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012462else
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012464fi
Christian Heimes32eba612021-03-19 10:29:25 +010012465rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012467LIBS=$ac_check_lib_save_LIBS
12468fi
Christian Heimes32eba612021-03-19 10:29:25 +010012469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12470$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
12471if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
12472 cat >>confdefs.h <<_ACEOF
12473#define HAVE_LIBRESOLV 1
12474_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012475
12476 LIBS="-lresolv $LIBS"
12477
12478fi
12479
12480
12481fi
12482
12483
Christian Heimesd0764e22007-12-04 15:00:33 +000012484# On Tru64, chflags seems to be present, but calling it will
12485# exit Python
Christian Heimes32eba612021-03-19 10:29:25 +010012486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12487$as_echo_n "checking for chflags... " >&6; }
12488if ${ac_cv_have_chflags+:} false; then :
12489 $as_echo_n "(cached) " >&6
12490else
12491 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012492 ac_cv_have_chflags=cross
Christian Heimes32eba612021-03-19 10:29:25 +010012493else
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012495/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012496
Christian Heimesd0764e22007-12-04 15:00:33 +000012497#include <sys/stat.h>
12498#include <unistd.h>
12499int main(int argc, char*argv[])
12500{
12501 if(chflags(argv[0], 0) != 0)
12502 return 1;
12503 return 0;
12504}
Ned Deily3eb67d52011-06-28 00:00:28 -070012505
Christian Heimesd0764e22007-12-04 15:00:33 +000012506_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012507if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012508 ac_cv_have_chflags=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012509else
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012514fi
12515
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012516
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012517fi
Christian Heimes32eba612021-03-19 10:29:25 +010012518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12519$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012520if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Christian Heimes32eba612021-03-19 10:29:25 +010012522if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012523 ac_cv_have_chflags="yes"
Christian Heimes32eba612021-03-19 10:29:25 +010012524else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012525 ac_cv_have_chflags="no"
12526fi
12527
12528fi
12529if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012530
Christian Heimes32eba612021-03-19 10:29:25 +010012531$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012532
12533fi
12534
Christian Heimes32eba612021-03-19 10:29:25 +010012535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12536$as_echo_n "checking for lchflags... " >&6; }
12537if ${ac_cv_have_lchflags+:} false; then :
12538 $as_echo_n "(cached) " >&6
12539else
12540 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012541 ac_cv_have_lchflags=cross
Christian Heimes32eba612021-03-19 10:29:25 +010012542else
Matthias Kloseb9621712010-04-24 17:59:49 +000012543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012544/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012545
Christian Heimesd0764e22007-12-04 15:00:33 +000012546#include <sys/stat.h>
12547#include <unistd.h>
12548int main(int argc, char*argv[])
12549{
12550 if(lchflags(argv[0], 0) != 0)
12551 return 1;
12552 return 0;
12553}
Ned Deily3eb67d52011-06-28 00:00:28 -070012554
Christian Heimesd0764e22007-12-04 15:00:33 +000012555_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012556if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012557 ac_cv_have_lchflags=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012558else
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12562 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012563fi
12564
12565
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012566fi
Christian Heimes32eba612021-03-19 10:29:25 +010012567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12568$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012569if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Christian Heimes32eba612021-03-19 10:29:25 +010012571if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012572 ac_cv_have_lchflags="yes"
Christian Heimes32eba612021-03-19 10:29:25 +010012573else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012574 ac_cv_have_lchflags="no"
12575fi
12576
12577fi
12578if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012579
Christian Heimes32eba612021-03-19 10:29:25 +010012580$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012581
12582fi
12583
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012584case $ac_sys_system/$ac_sys_release in
12585Darwin/*)
12586 _CUR_CFLAGS="${CFLAGS}"
12587 _CUR_LDFLAGS="${LDFLAGS}"
12588 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12589 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12590 ;;
12591esac
12592
Christian Heimes32eba612021-03-19 10:29:25 +010012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12594$as_echo_n "checking for inflateCopy in -lz... " >&6; }
12595if ${ac_cv_lib_z_inflateCopy+:} false; then :
12596 $as_echo_n "(cached) " >&6
12597else
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012598 ac_check_lib_save_LIBS=$LIBS
12599LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012601/* end confdefs.h. */
12602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603/* Override any GCC internal prototype to avoid an error.
12604 Use char because int might match the return type of a GCC
12605 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010012606#ifdef __cplusplus
12607extern "C"
12608#endif
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012609char inflateCopy ();
12610int
Christian Heimes32eba612021-03-19 10:29:25 +010012611main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012614 ;
12615 return 0;
12616}
12617_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012618if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012619 ac_cv_lib_z_inflateCopy=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012620else
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012622fi
Christian Heimes32eba612021-03-19 10:29:25 +010012623rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012625LIBS=$ac_check_lib_save_LIBS
12626fi
Christian Heimes32eba612021-03-19 10:29:25 +010012627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12628$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
12629if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012630
Christian Heimes32eba612021-03-19 10:29:25 +010012631$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012632
12633fi
12634
12635
12636case $ac_sys_system/$ac_sys_release in
12637Darwin/*)
12638 CFLAGS="${_CUR_CFLAGS}"
12639 LDFLAGS="${_CUR_LDFLAGS}"
12640 ;;
12641esac
12642
Christian Heimes32eba612021-03-19 10:29:25 +010012643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12644$as_echo_n "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012647
Martin v. Löwise9416172003-05-03 10:12:45 +000012648#include <netdb.h>
12649
Martin v. Löwise9416172003-05-03 10:12:45 +000012650int
Christian Heimes32eba612021-03-19 10:29:25 +010012651main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012652{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012653void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012654 ;
12655 return 0;
12656}
12657_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012658if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012659
Christian Heimes32eba612021-03-19 10:29:25 +010012660$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012661
Christian Heimes32eba612021-03-19 10:29:25 +010012662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12663$as_echo "yes" >&6; }
12664else
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12666$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012667
12668fi
Christian Heimes32eba612021-03-19 10:29:25 +010012669rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012670 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671
Christian Heimes32eba612021-03-19 10:29:25 +010012672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12673$as_echo_n "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012676
Martin v. Löwis86d66262006-02-17 08:40:11 +000012677#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012678#include <sys/socket.h>
12679#include <netinet/in.h>
12680#include <arpa/inet.h>
12681
Martin v. Löwise9416172003-05-03 10:12:45 +000012682int
Christian Heimes32eba612021-03-19 10:29:25 +010012683main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012684{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012685void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012686 ;
12687 return 0;
12688}
12689_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012690if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012691
Christian Heimes32eba612021-03-19 10:29:25 +010012692$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012693
Christian Heimes32eba612021-03-19 10:29:25 +010012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12695$as_echo "yes" >&6; }
12696else
12697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12698$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012699
12700fi
Christian Heimes32eba612021-03-19 10:29:25 +010012701rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703
Christian Heimes32eba612021-03-19 10:29:25 +010012704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12705$as_echo_n "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012707/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012708
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012709#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012710#include <sys/socket.h>
12711#include <netinet/in.h>
12712#include <arpa/inet.h>
12713
Martin v. Löwise9416172003-05-03 10:12:45 +000012714int
Christian Heimes32eba612021-03-19 10:29:25 +010012715main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012716{
12717void* p = inet_pton
12718 ;
12719 return 0;
12720}
12721_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012722if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012723
Christian Heimes32eba612021-03-19 10:29:25 +010012724$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012725
Christian Heimes32eba612021-03-19 10:29:25 +010012726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12727$as_echo "yes" >&6; }
12728else
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12730$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012731
12732fi
Christian Heimes32eba612021-03-19 10:29:25 +010012733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012734
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012735# On some systems, setgroups is in unistd.h, on others, in grp.h
Christian Heimes32eba612021-03-19 10:29:25 +010012736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12737$as_echo_n "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012740
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012741#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012742#ifdef HAVE_GRP_H
12743#include <grp.h>
12744#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012745
Martin v. Löwisd5843682002-11-21 20:41:28 +000012746int
Christian Heimes32eba612021-03-19 10:29:25 +010012747main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012748{
12749void* p = setgroups
12750 ;
12751 return 0;
12752}
12753_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012754if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012755
Christian Heimes32eba612021-03-19 10:29:25 +010012756$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012757
Christian Heimes32eba612021-03-19 10:29:25 +010012758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12759$as_echo "yes" >&6; }
12760else
12761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12762$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012763
12764fi
Christian Heimes32eba612021-03-19 10:29:25 +010012765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012766
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012767# check for openpty and forkpty
12768
Christian Heimes32eba612021-03-19 10:29:25 +010012769for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012770do :
12771 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Christian Heimes32eba612021-03-19 10:29:25 +010012772if test "x$ac_cv_func_openpty" = xyes; then :
12773 cat >>confdefs.h <<_ACEOF
12774#define HAVE_OPENPTY 1
12775_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012776
Christian Heimes32eba612021-03-19 10:29:25 +010012777else
12778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12779$as_echo_n "checking for openpty in -lutil... " >&6; }
12780if ${ac_cv_lib_util_openpty+:} false; then :
12781 $as_echo_n "(cached) " >&6
12782else
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012784LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788/* Override any GCC internal prototype to avoid an error.
12789 Use char because int might match the return type of a GCC
12790 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010012791#ifdef __cplusplus
12792extern "C"
12793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012794char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012795int
Christian Heimes32eba612021-03-19 10:29:25 +010012796main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 ;
12800 return 0;
12801}
12802_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012803if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 ac_cv_lib_util_openpty=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012807fi
Christian Heimes32eba612021-03-19 10:29:25 +010012808rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012810LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012811fi
Christian Heimes32eba612021-03-19 10:29:25 +010012812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12813$as_echo "$ac_cv_lib_util_openpty" >&6; }
12814if test "x$ac_cv_lib_util_openpty" = xyes; then :
12815 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012816 LIBS="$LIBS -lutil"
Christian Heimes32eba612021-03-19 10:29:25 +010012817else
12818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12819$as_echo_n "checking for openpty in -lbsd... " >&6; }
12820if ${ac_cv_lib_bsd_openpty+:} false; then :
12821 $as_echo_n "(cached) " >&6
12822else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012823 ac_check_lib_save_LIBS=$LIBS
12824LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012826/* end confdefs.h. */
12827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828/* Override any GCC internal prototype to avoid an error.
12829 Use char because int might match the return type of a GCC
12830 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010012831#ifdef __cplusplus
12832extern "C"
12833#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012834char openpty ();
12835int
Christian Heimes32eba612021-03-19 10:29:25 +010012836main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012839 ;
12840 return 0;
12841}
12842_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012844 ac_cv_lib_bsd_openpty=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012845else
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012847fi
Christian Heimes32eba612021-03-19 10:29:25 +010012848rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012850LIBS=$ac_check_lib_save_LIBS
12851fi
Christian Heimes32eba612021-03-19 10:29:25 +010012852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12853$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
12854if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
12855 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012856 LIBS="$LIBS -lbsd"
12857fi
12858
12859
12860fi
12861
Fred Drake8cef4cf2000-06-28 16:40:38 +000012862
12863fi
12864done
12865
Christian Heimes32eba612021-03-19 10:29:25 +010012866for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012867do :
12868 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Christian Heimes32eba612021-03-19 10:29:25 +010012869if test "x$ac_cv_func_forkpty" = xyes; then :
12870 cat >>confdefs.h <<_ACEOF
12871#define HAVE_FORKPTY 1
12872_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012873
Christian Heimes32eba612021-03-19 10:29:25 +010012874else
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12876$as_echo_n "checking for forkpty in -lutil... " >&6; }
12877if ${ac_cv_lib_util_forkpty+:} false; then :
12878 $as_echo_n "(cached) " >&6
12879else
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012881LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885/* Override any GCC internal prototype to avoid an error.
12886 Use char because int might match the return type of a GCC
12887 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010012888#ifdef __cplusplus
12889extern "C"
12890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012891char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012892int
Christian Heimes32eba612021-03-19 10:29:25 +010012893main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ;
12897 return 0;
12898}
12899_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ac_cv_lib_util_forkpty=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012902else
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012904fi
Christian Heimes32eba612021-03-19 10:29:25 +010012905rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012907LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012908fi
Christian Heimes32eba612021-03-19 10:29:25 +010012909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12910$as_echo "$ac_cv_lib_util_forkpty" >&6; }
12911if test "x$ac_cv_lib_util_forkpty" = xyes; then :
12912 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012913 LIBS="$LIBS -lutil"
Christian Heimes32eba612021-03-19 10:29:25 +010012914else
12915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12916$as_echo_n "checking for forkpty in -lbsd... " >&6; }
12917if ${ac_cv_lib_bsd_forkpty+:} false; then :
12918 $as_echo_n "(cached) " >&6
12919else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012920 ac_check_lib_save_LIBS=$LIBS
12921LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012923/* end confdefs.h. */
12924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925/* Override any GCC internal prototype to avoid an error.
12926 Use char because int might match the return type of a GCC
12927 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010012928#ifdef __cplusplus
12929extern "C"
12930#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012931char forkpty ();
12932int
Christian Heimes32eba612021-03-19 10:29:25 +010012933main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012934{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012936 ;
12937 return 0;
12938}
12939_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010012940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012941 ac_cv_lib_bsd_forkpty=yes
Christian Heimes32eba612021-03-19 10:29:25 +010012942else
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012944fi
Christian Heimes32eba612021-03-19 10:29:25 +010012945rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012947LIBS=$ac_check_lib_save_LIBS
12948fi
Christian Heimes32eba612021-03-19 10:29:25 +010012949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12950$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
12951if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
12952 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012953 LIBS="$LIBS -lbsd"
12954fi
12955
12956
12957fi
12958
Fred Drake8cef4cf2000-06-28 16:40:38 +000012959
12960fi
Pablo Galindocc128882021-03-01 16:47:53 +000012961done
Jack Jansendd19cf82001-12-06 22:36:17 +000012962
Christian Heimes32eba612021-03-19 10:29:25 +010012963
Michael W. Hudson54241132001-12-07 15:38:26 +000012964# check for long file support functions
Christian Heimes32eba612021-03-19 10:29:25 +010012965for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12966do :
12967 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12968ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12969if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12970 cat >>confdefs.h <<_ACEOF
12971#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12972_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012973
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012974fi
Christian Heimes32eba612021-03-19 10:29:25 +010012975done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012976
Michael W. Hudson54241132001-12-07 15:38:26 +000012977
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012978ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Christian Heimes32eba612021-03-19 10:29:25 +010012979if test "x$ac_cv_func_dup2" = xyes; then :
12980 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012981
Christian Heimes32eba612021-03-19 10:29:25 +010012982else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012984 *" dup2.$ac_objext "* ) ;;
12985 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012987esac
12988
Martin v. Löwis1142de32002-03-29 16:28:31 +000012989fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012990
Martin v. Löwis1142de32002-03-29 16:28:31 +000012991
Christian Heimes32eba612021-03-19 10:29:25 +010012992for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012993do :
12994 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Christian Heimes32eba612021-03-19 10:29:25 +010012995if test "x$ac_cv_func_getpgrp" = xyes; then :
12996 cat >>confdefs.h <<_ACEOF
12997#define HAVE_GETPGRP 1
12998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013000/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013001#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013002int
Christian Heimes32eba612021-03-19 10:29:25 +010013003main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013004{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 ;
13007 return 0;
13008}
13009_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013010if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013011
Christian Heimes32eba612021-03-19 10:29:25 +010013012$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013013
Guido van Rossum627b2d71993-12-24 10:39:16 +000013014fi
Christian Heimes32eba612021-03-19 10:29:25 +010013015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013016
Guido van Rossum627b2d71993-12-24 10:39:16 +000013017fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013018done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013019
Christian Heimes32eba612021-03-19 10:29:25 +010013020for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013021do :
13022 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Christian Heimes32eba612021-03-19 10:29:25 +010013023if test "x$ac_cv_func_setpgrp" = xyes; then :
13024 cat >>confdefs.h <<_ACEOF
13025#define HAVE_SETPGRP 1
13026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013029#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013030int
Christian Heimes32eba612021-03-19 10:29:25 +010013031main ()
Jack Jansen150753c2003-03-29 22:07:47 +000013032{
13033setpgrp(0,0);
13034 ;
13035 return 0;
13036}
13037_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
Christian Heimes32eba612021-03-19 10:29:25 +010013040$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013041
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013042fi
Christian Heimes32eba612021-03-19 10:29:25 +010013043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013044
13045fi
13046done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013047
Christian Heimes32eba612021-03-19 10:29:25 +010013048
Gregory P. Smith387512c2018-12-30 15:42:32 -080013049# We search for both crypt and crypt_r as one or the other may be defined
13050# This gets us our -lcrypt in LIBS when required on the target platform.
Christian Heimes32eba612021-03-19 10:29:25 +010013051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13052$as_echo_n "checking for library containing crypt... " >&6; }
13053if ${ac_cv_search_crypt+:} false; then :
13054 $as_echo_n "(cached) " >&6
13055else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013056 ac_func_search_save_LIBS=$LIBS
13057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13058/* end confdefs.h. */
13059
13060/* Override any GCC internal prototype to avoid an error.
13061 Use char because int might match the return type of a GCC
13062 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010013063#ifdef __cplusplus
13064extern "C"
13065#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013066char crypt ();
13067int
Christian Heimes32eba612021-03-19 10:29:25 +010013068main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013069{
13070return crypt ();
13071 ;
13072 return 0;
13073}
13074_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013075for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013076 if test -z "$ac_lib"; then
13077 ac_res="none required"
13078 else
13079 ac_res=-l$ac_lib
13080 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13081 fi
Christian Heimes32eba612021-03-19 10:29:25 +010013082 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013083 ac_cv_search_crypt=$ac_res
13084fi
Christian Heimes32eba612021-03-19 10:29:25 +010013085rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013086 conftest$ac_exeext
Christian Heimes32eba612021-03-19 10:29:25 +010013087 if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013088 break
13089fi
13090done
Christian Heimes32eba612021-03-19 10:29:25 +010013091if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013092
Christian Heimes32eba612021-03-19 10:29:25 +010013093else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013094 ac_cv_search_crypt=no
13095fi
13096rm conftest.$ac_ext
13097LIBS=$ac_func_search_save_LIBS
13098fi
Christian Heimes32eba612021-03-19 10:29:25 +010013099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13100$as_echo "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013101ac_res=$ac_cv_search_crypt
Christian Heimes32eba612021-03-19 10:29:25 +010013102if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013103 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13104
13105fi
13106
Christian Heimes32eba612021-03-19 10:29:25 +010013107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13108$as_echo_n "checking for library containing crypt_r... " >&6; }
13109if ${ac_cv_search_crypt_r+:} false; then :
13110 $as_echo_n "(cached) " >&6
13111else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013112 ac_func_search_save_LIBS=$LIBS
13113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13114/* end confdefs.h. */
13115
13116/* Override any GCC internal prototype to avoid an error.
13117 Use char because int might match the return type of a GCC
13118 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010013119#ifdef __cplusplus
13120extern "C"
13121#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013122char crypt_r ();
13123int
Christian Heimes32eba612021-03-19 10:29:25 +010013124main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013125{
13126return crypt_r ();
13127 ;
13128 return 0;
13129}
13130_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013131for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013132 if test -z "$ac_lib"; then
13133 ac_res="none required"
13134 else
13135 ac_res=-l$ac_lib
13136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13137 fi
Christian Heimes32eba612021-03-19 10:29:25 +010013138 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013139 ac_cv_search_crypt_r=$ac_res
13140fi
Christian Heimes32eba612021-03-19 10:29:25 +010013141rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013142 conftest$ac_exeext
Christian Heimes32eba612021-03-19 10:29:25 +010013143 if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013144 break
13145fi
13146done
Christian Heimes32eba612021-03-19 10:29:25 +010013147if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013148
Christian Heimes32eba612021-03-19 10:29:25 +010013149else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013150 ac_cv_search_crypt_r=no
13151fi
13152rm conftest.$ac_ext
13153LIBS=$ac_func_search_save_LIBS
13154fi
Christian Heimes32eba612021-03-19 10:29:25 +010013155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13156$as_echo "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013157ac_res=$ac_cv_search_crypt_r
Christian Heimes32eba612021-03-19 10:29:25 +010013158if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13160
13161fi
13162
13163
13164ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Christian Heimes32eba612021-03-19 10:29:25 +010013165if test "x$ac_cv_func_crypt_r" = xyes; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13167/* end confdefs.h. */
13168
13169#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13170#include <crypt.h>
13171
13172int
Christian Heimes32eba612021-03-19 10:29:25 +010013173main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013174{
13175
13176struct crypt_data d;
13177char *r = crypt_r("", "", &d);
13178
13179 ;
13180 return 0;
13181}
13182_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013183if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013184
Christian Heimes32eba612021-03-19 10:29:25 +010013185$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080013186
13187fi
Christian Heimes32eba612021-03-19 10:29:25 +010013188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080013189
13190fi
13191
13192
Christian Heimes32eba612021-03-19 10:29:25 +010013193for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020013194do :
13195 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Christian Heimes32eba612021-03-19 10:29:25 +010013196if test "x$ac_cv_func_clock_gettime" = xyes; then :
13197 cat >>confdefs.h <<_ACEOF
13198#define HAVE_CLOCK_GETTIME 1
13199_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013200
Christian Heimes32eba612021-03-19 10:29:25 +010013201else
Victor Stinnere0be4232011-10-25 13:06:09 +020013202
Christian Heimes32eba612021-03-19 10:29:25 +010013203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13204$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13205if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13206 $as_echo_n "(cached) " >&6
13207else
Victor Stinnere0be4232011-10-25 13:06:09 +020013208 ac_check_lib_save_LIBS=$LIBS
13209LIBS="-lrt $LIBS"
13210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13211/* end confdefs.h. */
13212
13213/* Override any GCC internal prototype to avoid an error.
13214 Use char because int might match the return type of a GCC
13215 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010013216#ifdef __cplusplus
13217extern "C"
13218#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013219char clock_gettime ();
13220int
Christian Heimes32eba612021-03-19 10:29:25 +010013221main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013222{
13223return clock_gettime ();
13224 ;
13225 return 0;
13226}
13227_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013228if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013229 ac_cv_lib_rt_clock_gettime=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013230else
Victor Stinnere0be4232011-10-25 13:06:09 +020013231 ac_cv_lib_rt_clock_gettime=no
13232fi
Christian Heimes32eba612021-03-19 10:29:25 +010013233rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013234 conftest$ac_exeext conftest.$ac_ext
13235LIBS=$ac_check_lib_save_LIBS
13236fi
Christian Heimes32eba612021-03-19 10:29:25 +010013237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13238$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13239if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013240
Victor Stinner7efb8332014-08-29 15:41:08 +020013241 LIBS="$LIBS -lrt"
Christian Heimes32eba612021-03-19 10:29:25 +010013242 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013243
13244
Christian Heimes32eba612021-03-19 10:29:25 +010013245$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013246
13247
13248fi
13249
13250
13251fi
13252done
13253
13254
Christian Heimes32eba612021-03-19 10:29:25 +010013255for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020013256do :
13257 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Christian Heimes32eba612021-03-19 10:29:25 +010013258if test "x$ac_cv_func_clock_getres" = xyes; then :
13259 cat >>confdefs.h <<_ACEOF
13260#define HAVE_CLOCK_GETRES 1
13261_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013262
Christian Heimes32eba612021-03-19 10:29:25 +010013263else
Victor Stinnere0be4232011-10-25 13:06:09 +020013264
Christian Heimes32eba612021-03-19 10:29:25 +010013265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13266$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13267if ${ac_cv_lib_rt_clock_getres+:} false; then :
13268 $as_echo_n "(cached) " >&6
13269else
Victor Stinnere0be4232011-10-25 13:06:09 +020013270 ac_check_lib_save_LIBS=$LIBS
13271LIBS="-lrt $LIBS"
13272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273/* end confdefs.h. */
13274
13275/* Override any GCC internal prototype to avoid an error.
13276 Use char because int might match the return type of a GCC
13277 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010013278#ifdef __cplusplus
13279extern "C"
13280#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013281char clock_getres ();
13282int
Christian Heimes32eba612021-03-19 10:29:25 +010013283main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013284{
13285return clock_getres ();
13286 ;
13287 return 0;
13288}
13289_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013290if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013291 ac_cv_lib_rt_clock_getres=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013292else
Victor Stinnere0be4232011-10-25 13:06:09 +020013293 ac_cv_lib_rt_clock_getres=no
13294fi
Christian Heimes32eba612021-03-19 10:29:25 +010013295rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013296 conftest$ac_exeext conftest.$ac_ext
13297LIBS=$ac_check_lib_save_LIBS
13298fi
Christian Heimes32eba612021-03-19 10:29:25 +010013299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13300$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13301if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013302
Christian Heimes32eba612021-03-19 10:29:25 +010013303 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013304
13305
13306fi
13307
13308
13309fi
13310done
13311
13312
Christian Heimes32eba612021-03-19 10:29:25 +010013313for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013314do :
13315 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Christian Heimes32eba612021-03-19 10:29:25 +010013316if test "x$ac_cv_func_clock_settime" = xyes; then :
13317 cat >>confdefs.h <<_ACEOF
13318#define HAVE_CLOCK_SETTIME 1
13319_ACEOF
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013320
Christian Heimes32eba612021-03-19 10:29:25 +010013321else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013322
Christian Heimes32eba612021-03-19 10:29:25 +010013323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13324$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13325if ${ac_cv_lib_rt_clock_settime+:} false; then :
13326 $as_echo_n "(cached) " >&6
13327else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013328 ac_check_lib_save_LIBS=$LIBS
13329LIBS="-lrt $LIBS"
13330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13331/* end confdefs.h. */
13332
13333/* Override any GCC internal prototype to avoid an error.
13334 Use char because int might match the return type of a GCC
13335 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010013336#ifdef __cplusplus
13337extern "C"
13338#endif
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013339char clock_settime ();
13340int
Christian Heimes32eba612021-03-19 10:29:25 +010013341main ()
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013342{
13343return clock_settime ();
13344 ;
13345 return 0;
13346}
13347_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013348if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013349 ac_cv_lib_rt_clock_settime=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013350else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013351 ac_cv_lib_rt_clock_settime=no
13352fi
Christian Heimes32eba612021-03-19 10:29:25 +010013353rm -f core conftest.err conftest.$ac_objext \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013354 conftest$ac_exeext conftest.$ac_ext
13355LIBS=$ac_check_lib_save_LIBS
13356fi
Christian Heimes32eba612021-03-19 10:29:25 +010013357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13358$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13359if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013360
Christian Heimes32eba612021-03-19 10:29:25 +010013361 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013362
13363
13364fi
13365
13366
13367fi
13368done
13369
Christian Heimes32eba612021-03-19 10:29:25 +010013370
13371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13372$as_echo_n "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013374/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013375
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013376#if defined(MAJOR_IN_MKDEV)
13377#include <sys/mkdev.h>
13378#elif defined(MAJOR_IN_SYSMACROS)
13379#include <sys/sysmacros.h>
13380#else
13381#include <sys/types.h>
13382#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013383
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013384int
Christian Heimes32eba612021-03-19 10:29:25 +010013385main ()
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013386{
13387
13388 makedev(major(0),minor(0));
13389
13390 ;
13391 return 0;
13392}
13393_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013394if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013395
13396
Christian Heimes32eba612021-03-19 10:29:25 +010013397$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013398
Christian Heimes32eba612021-03-19 10:29:25 +010013399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13400$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013401
Christian Heimes32eba612021-03-19 10:29:25 +010013402else
Skip Montanaro6dead952003-09-25 14:50:04 +000013403
Christian Heimes32eba612021-03-19 10:29:25 +010013404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13405$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013406
13407fi
Christian Heimes32eba612021-03-19 10:29:25 +010013408rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013410
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013411# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013412# for [no]getaddrinfo in netdb.h.
Christian Heimes32eba612021-03-19 10:29:25 +010013413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13414$as_echo_n "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013416/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013417
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013418#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013419#include <sys/socket.h>
13420#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013421#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013422
Martin v. Löwis11437992002-04-12 09:54:03 +000013423int
Christian Heimes32eba612021-03-19 10:29:25 +010013424main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013425{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013426getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 ;
13428 return 0;
13429}
13430_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013431if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013432 have_getaddrinfo=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013433else
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013435fi
Christian Heimes32eba612021-03-19 10:29:25 +010013436rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +010013438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13439$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440if test $have_getaddrinfo = yes
13441then
Christian Heimes32eba612021-03-19 10:29:25 +010013442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13443$as_echo_n "checking getaddrinfo bug... " >&6; }
13444 if ${ac_cv_buggy_getaddrinfo+:} false; then :
13445 $as_echo_n "(cached) " >&6
13446else
13447 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013448
13449if test "${enable_ipv6+set}" = set; then
13450 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13451else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013452 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013453fi
Christian Heimes32eba612021-03-19 10:29:25 +010013454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013456/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013457
Stefan Krah19c21392012-11-22 23:47:32 +010013458#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013459#include <sys/types.h>
13460#include <netdb.h>
13461#include <string.h>
13462#include <sys/socket.h>
13463#include <netinet/in.h>
13464
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013465int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013466{
13467 int passive, gaierr, inet4 = 0, inet6 = 0;
13468 struct addrinfo hints, *ai, *aitop;
13469 char straddr[INET6_ADDRSTRLEN], strport[16];
13470
13471 for (passive = 0; passive <= 1; passive++) {
13472 memset(&hints, 0, sizeof(hints));
13473 hints.ai_family = AF_UNSPEC;
13474 hints.ai_flags = passive ? AI_PASSIVE : 0;
13475 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013476 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013477 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13478 (void)gai_strerror(gaierr);
13479 goto bad;
13480 }
13481 for (ai = aitop; ai; ai = ai->ai_next) {
13482 if (ai->ai_addr == NULL ||
13483 ai->ai_addrlen == 0 ||
13484 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13485 straddr, sizeof(straddr), strport, sizeof(strport),
13486 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13487 goto bad;
13488 }
13489 switch (ai->ai_family) {
13490 case AF_INET:
13491 if (strcmp(strport, "54321") != 0) {
13492 goto bad;
13493 }
13494 if (passive) {
13495 if (strcmp(straddr, "0.0.0.0") != 0) {
13496 goto bad;
13497 }
13498 } else {
13499 if (strcmp(straddr, "127.0.0.1") != 0) {
13500 goto bad;
13501 }
13502 }
13503 inet4++;
13504 break;
13505 case AF_INET6:
13506 if (strcmp(strport, "54321") != 0) {
13507 goto bad;
13508 }
13509 if (passive) {
13510 if (strcmp(straddr, "::") != 0) {
13511 goto bad;
13512 }
13513 } else {
13514 if (strcmp(straddr, "::1") != 0) {
13515 goto bad;
13516 }
13517 }
13518 inet6++;
13519 break;
13520 case AF_UNSPEC:
13521 goto bad;
13522 break;
13523 default:
13524 /* another family support? */
13525 break;
13526 }
13527 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013528 freeaddrinfo(aitop);
13529 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013530 }
13531
13532 if (!(inet4 == 0 || inet4 == 2))
13533 goto bad;
13534 if (!(inet6 == 0 || inet6 == 2))
13535 goto bad;
13536
13537 if (aitop)
13538 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013539 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013540
13541 bad:
13542 if (aitop)
13543 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013544 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013545}
13546
Martin v. Löwis11437992002-04-12 09:54:03 +000013547_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013548if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013549 ac_cv_buggy_getaddrinfo=no
Christian Heimes32eba612021-03-19 10:29:25 +010013550else
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13554 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013557fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013558
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560
Christian Heimes32eba612021-03-19 10:29:25 +010013561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13562$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013563
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013564if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013565then
13566 if test $ipv6 = yes
13567 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013568 echo 'Fatal: You must get working getaddrinfo() function.'
13569 echo ' or you can specify "--disable-ipv6"'.
13570 exit 1
13571 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013572else
Martin v. Löwis11437992002-04-12 09:54:03 +000013573
Christian Heimes32eba612021-03-19 10:29:25 +010013574$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013575
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013576fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013577
Christian Heimes32eba612021-03-19 10:29:25 +010013578for ac_func in getnameinfo
13579do :
13580 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
13581if test "x$ac_cv_func_getnameinfo" = xyes; then :
13582 cat >>confdefs.h <<_ACEOF
13583#define HAVE_GETNAMEINFO 1
13584_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013585
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013586fi
Christian Heimes32eba612021-03-19 10:29:25 +010013587done
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013588
Michael W. Hudson54241132001-12-07 15:38:26 +000013589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013590# checks for structures
Christian Heimes32eba612021-03-19 10:29:25 +010013591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13592$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
13593if ${ac_cv_header_time+:} false; then :
13594 $as_echo_n "(cached) " >&6
13595else
13596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597/* end confdefs.h. */
13598#include <sys/types.h>
13599#include <sys/time.h>
13600#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Christian Heimes32eba612021-03-19 10:29:25 +010013602int
13603main ()
13604{
13605if ((struct tm *) 0)
13606return 0;
13607 ;
13608 return 0;
13609}
13610_ACEOF
13611if ac_fn_c_try_compile "$LINENO"; then :
13612 ac_cv_header_time=yes
13613else
13614 ac_cv_header_time=no
13615fi
13616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13617fi
13618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13619$as_echo "$ac_cv_header_time" >&6; }
13620if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013621
Christian Heimes32eba612021-03-19 10:29:25 +010013622$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013623
13624fi
13625
Christian Heimes32eba612021-03-19 10:29:25 +010013626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13627$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13628if ${ac_cv_struct_tm+:} false; then :
13629 $as_echo_n "(cached) " >&6
13630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633#include <sys/types.h>
13634#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Martin v. Löwis11437992002-04-12 09:54:03 +000013636int
Christian Heimes32eba612021-03-19 10:29:25 +010013637main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013639struct tm tm;
13640 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013642 ;
13643 return 0;
13644}
13645_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013646if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013647 ac_cv_struct_tm=time.h
Christian Heimes32eba612021-03-19 10:29:25 +010013648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650fi
Christian Heimes32eba612021-03-19 10:29:25 +010013651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013652fi
Christian Heimes32eba612021-03-19 10:29:25 +010013653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13654$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013655if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Christian Heimes32eba612021-03-19 10:29:25 +010013657$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013658
13659fi
13660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661ac_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 +000013662#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664"
Christian Heimes32eba612021-03-19 10:29:25 +010013665if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013666
Christian Heimes32eba612021-03-19 10:29:25 +010013667cat >>confdefs.h <<_ACEOF
13668#define HAVE_STRUCT_TM_TM_ZONE 1
13669_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013670
13671
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013672fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13675
Christian Heimes32eba612021-03-19 10:29:25 +010013676$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013677
13678else
Christian Heimes32eba612021-03-19 10:29:25 +010013679 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13680"
13681if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010013683else
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013685fi
13686
Christian Heimes32eba612021-03-19 10:29:25 +010013687cat >>confdefs.h <<_ACEOF
13688#define HAVE_DECL_TZNAME $ac_have_decl
13689_ACEOF
13690
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13692$as_echo_n "checking for tzname... " >&6; }
13693if ${ac_cv_var_tzname+:} false; then :
13694 $as_echo_n "(cached) " >&6
13695else
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013697/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013698#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699#if !HAVE_DECL_TZNAME
13700extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Martin v. Löwis11437992002-04-12 09:54:03 +000013703int
Christian Heimes32eba612021-03-19 10:29:25 +010013704main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013706return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ;
13708 return 0;
13709}
13710_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013711if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013712 ac_cv_var_tzname=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013713else
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013715fi
Christian Heimes32eba612021-03-19 10:29:25 +010013716rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013718fi
Christian Heimes32eba612021-03-19 10:29:25 +010013719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13720$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013721 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Christian Heimes32eba612021-03-19 10:29:25 +010013723$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013725 fi
13726fi
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +010013729if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013730
Christian Heimes32eba612021-03-19 10:29:25 +010013731cat >>confdefs.h <<_ACEOF
13732#define HAVE_STRUCT_STAT_ST_RDEV 1
13733_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
13735
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013736fi
13737
Matthias Kloseb9621712010-04-24 17:59:49 +000013738ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +010013739if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013740
Christian Heimes32eba612021-03-19 10:29:25 +010013741cat >>confdefs.h <<_ACEOF
13742#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13743_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
13745
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013746fi
13747
Matthias Kloseb9621712010-04-24 17:59:49 +000013748ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +010013749if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013750
Christian Heimes32eba612021-03-19 10:29:25 +010013751cat >>confdefs.h <<_ACEOF
13752#define HAVE_STRUCT_STAT_ST_FLAGS 1
13753_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013754
13755
13756fi
13757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +010013759if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013760
Christian Heimes32eba612021-03-19 10:29:25 +010013761cat >>confdefs.h <<_ACEOF
13762#define HAVE_STRUCT_STAT_ST_GEN 1
13763_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013764
13765
13766fi
13767
Matthias Kloseb9621712010-04-24 17:59:49 +000013768ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +010013769if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013770
Christian Heimes32eba612021-03-19 10:29:25 +010013771cat >>confdefs.h <<_ACEOF
13772#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13773_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013774
13775
13776fi
13777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +010013779if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013780
Christian Heimes32eba612021-03-19 10:29:25 +010013781cat >>confdefs.h <<_ACEOF
13782#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13783_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013784
13785
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013786fi
13787
Stefan Krah267b6392016-04-26 01:09:18 +020013788ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13789 #include <sys/types.h>
13790 #include <pwd.h>
13791
13792"
Christian Heimes32eba612021-03-19 10:29:25 +010013793if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013794
Christian Heimes32eba612021-03-19 10:29:25 +010013795cat >>confdefs.h <<_ACEOF
13796#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13797_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013798
13799
13800fi
13801ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13802 #include <sys/types.h>
13803 #include <pwd.h>
13804
13805"
Christian Heimes32eba612021-03-19 10:29:25 +010013806if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013807
Christian Heimes32eba612021-03-19 10:29:25 +010013808cat >>confdefs.h <<_ACEOF
13809#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13810_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013811
13812
13813fi
13814
Zachary Ware6a6967e2016-10-01 00:47:27 -050013815# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13816ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13817"
Christian Heimes32eba612021-03-19 10:29:25 +010013818if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050013819
Christian Heimes32eba612021-03-19 10:29:25 +010013820cat >>confdefs.h <<_ACEOF
13821#define HAVE_SIGINFO_T_SI_BAND 1
13822_ACEOF
Zachary Ware6a6967e2016-10-01 00:47:27 -050013823
13824
13825fi
13826
Michael W. Hudson54241132001-12-07 15:38:26 +000013827
Christian Heimes32eba612021-03-19 10:29:25 +010013828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13829$as_echo_n "checking for time.h that defines altzone... " >&6; }
13830if ${ac_cv_header_time_altzone+:} false; then :
13831 $as_echo_n "(cached) " >&6
13832else
Matthias Kloseb159a552010-04-25 21:00:44 +000013833
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013835/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013836#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013837int
Christian Heimes32eba612021-03-19 10:29:25 +010013838main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013839{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 ;
13842 return 0;
13843}
13844_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013845if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846 ac_cv_header_time_altzone=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013847else
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013849fi
Christian Heimes32eba612021-03-19 10:29:25 +010013850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852fi
13853
Christian Heimes32eba612021-03-19 10:29:25 +010013854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13855$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013856if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
Christian Heimes32eba612021-03-19 10:29:25 +010013858$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859
13860fi
13861
Guido van Rossumda88dad1995-01-26 00:46:29 +000013862was_it_defined=no
Christian Heimes32eba612021-03-19 10:29:25 +010013863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13864$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013866/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013867
13868#include <sys/types.h>
13869#include <sys/select.h>
13870#include <sys/time.h>
13871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872int
Christian Heimes32eba612021-03-19 10:29:25 +010013873main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013874{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013875;
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 ;
13877 return 0;
13878}
13879_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
13882
Christian Heimes32eba612021-03-19 10:29:25 +010013883$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013885 was_it_defined=yes
13886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887fi
Christian Heimes32eba612021-03-19 10:29:25 +010013888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13890$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891
Christian Heimes32eba612021-03-19 10:29:25 +010013892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13893$as_echo_n "checking for addrinfo... " >&6; }
13894if ${ac_cv_struct_addrinfo+:} false; then :
13895 $as_echo_n "(cached) " >&6
13896else
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013898/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013899#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013900int
Christian Heimes32eba612021-03-19 10:29:25 +010013901main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013902{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013903struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ;
13905 return 0;
13906}
13907_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013908if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013909 ac_cv_struct_addrinfo=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013910else
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013912fi
Christian Heimes32eba612021-03-19 10:29:25 +010013913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914fi
13915
Christian Heimes32eba612021-03-19 10:29:25 +010013916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13917$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013918if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013919
Christian Heimes32eba612021-03-19 10:29:25 +010013920$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013921
13922fi
13923
Christian Heimes32eba612021-03-19 10:29:25 +010013924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13925$as_echo_n "checking for sockaddr_storage... " >&6; }
13926if ${ac_cv_struct_sockaddr_storage+:} false; then :
13927 $as_echo_n "(cached) " >&6
13928else
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013930/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013931
13932# include <sys/types.h>
13933# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013934int
Christian Heimes32eba612021-03-19 10:29:25 +010013935main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013936{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013937struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 ;
13939 return 0;
13940}
13941_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013943 ac_cv_struct_sockaddr_storage=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013944else
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013946fi
Christian Heimes32eba612021-03-19 10:29:25 +010013947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948fi
13949
Christian Heimes32eba612021-03-19 10:29:25 +010013950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13951$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013952if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Christian Heimes32eba612021-03-19 10:29:25 +010013954$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013955
13956fi
13957
Christian Heimes32eba612021-03-19 10:29:25 +010013958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13959$as_echo_n "checking for sockaddr_alg... " >&6; }
13960if ${ac_cv_struct_sockaddr_alg+:} false; then :
13961 $as_echo_n "(cached) " >&6
13962else
Christian Heimesdffa3942016-09-05 23:54:41 +020013963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13964/* end confdefs.h. */
13965
13966# include <sys/types.h>
13967# include <sys/socket.h>
13968# include <linux/if_alg.h>
13969int
Christian Heimes32eba612021-03-19 10:29:25 +010013970main ()
Christian Heimesdffa3942016-09-05 23:54:41 +020013971{
13972struct sockaddr_alg s
13973 ;
13974 return 0;
13975}
13976_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010013977if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesdffa3942016-09-05 23:54:41 +020013978 ac_cv_struct_sockaddr_alg=yes
Christian Heimes32eba612021-03-19 10:29:25 +010013979else
Christian Heimesdffa3942016-09-05 23:54:41 +020013980 ac_cv_struct_sockaddr_alg=no
13981fi
Christian Heimes32eba612021-03-19 10:29:25 +010013982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020013983fi
13984
Christian Heimes32eba612021-03-19 10:29:25 +010013985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13986$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020013987if test $ac_cv_struct_sockaddr_alg = yes; then
13988
Christian Heimes32eba612021-03-19 10:29:25 +010013989$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020013990
13991fi
13992
Guido van Rossum627b2d71993-12-24 10:39:16 +000013993# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013994
Christian Heimes32eba612021-03-19 10:29:25 +010013995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13996$as_echo_n "checking whether char is unsigned... " >&6; }
13997if ${ac_cv_c_char_unsigned+:} false; then :
13998 $as_echo_n "(cached) " >&6
13999else
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014002$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014003int
Christian Heimes32eba612021-03-19 10:29:25 +010014004main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014005{
14006static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014007test_array [0] = 0;
14008return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000014009
14010 ;
14011 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014012}
Martin v. Löwis11437992002-04-12 09:54:03 +000014013_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014014if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014015 ac_cv_c_char_unsigned=no
Christian Heimes32eba612021-03-19 10:29:25 +010014016else
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014018fi
Christian Heimes32eba612021-03-19 10:29:25 +010014019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014020fi
Christian Heimes32eba612021-03-19 10:29:25 +010014021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14022$as_echo "$ac_cv_c_char_unsigned" >&6; }
14023if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
14024 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014025
14026fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014027
Christian Heimes32eba612021-03-19 10:29:25 +010014028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14029$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
14030if ${ac_cv_c_const+:} false; then :
14031 $as_echo_n "(cached) " >&6
14032else
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014034/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014035
Martin v. Löwis11437992002-04-12 09:54:03 +000014036int
Christian Heimes32eba612021-03-19 10:29:25 +010014037main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014038{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014039
Martin v. Löwis11437992002-04-12 09:54:03 +000014040#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014041 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014043 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045 char const *const *pcpcc;
14046 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014047 /* NEC SVR4.0.2 mips cc rejects this. */
14048 struct point {int x, y;};
14049 static struct point const zero = {0,0};
Christian Heimes32eba612021-03-19 10:29:25 +010014050 /* AIX XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 It does not let you subtract one const X* pointer from another in
14052 an arm of an if-expression whose if-part is not a constant
14053 expression */
14054 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057 ++pcpcc;
14058 ppc = (char**) pcpcc;
14059 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014060 { /* SCO 3.2v4 cc rejects this sort of thing. */
14061 char tx;
14062 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014064
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 }
14068 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14069 int x[] = {25, 17};
14070 const int *foo = &x[0];
14071 ++foo;
14072 }
14073 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14074 typedef const int *iptr;
14075 iptr p = 0;
14076 ++p;
14077 }
Christian Heimes32eba612021-03-19 10:29:25 +010014078 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014080 struct s { int j; const int *ap[3]; } bx;
14081 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 }
14083 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14084 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014088#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014089
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 ;
14091 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014092}
Martin v. Löwis11437992002-04-12 09:54:03 +000014093_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014094if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014095 ac_cv_c_const=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014096else
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014098fi
Christian Heimes32eba612021-03-19 10:29:25 +010014099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014100fi
Christian Heimes32eba612021-03-19 10:29:25 +010014101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14102$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014103if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Christian Heimes32eba612021-03-19 10:29:25 +010014105$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014106
14107fi
14108
Michael W. Hudson54241132001-12-07 15:38:26 +000014109
Guido van Rossumda88dad1995-01-26 00:46:29 +000014110works=no
Christian Heimes32eba612021-03-19 10:29:25 +010014111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14112$as_echo_n "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014114/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116int
Christian Heimes32eba612021-03-19 10:29:25 +010014117main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014118{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014119signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 ;
14121 return 0;
14122}
14123_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014124if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014125 works=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014126else
Skip Montanaro6dead952003-09-25 14:50:04 +000014127
Christian Heimes32eba612021-03-19 10:29:25 +010014128$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014129
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014130
Guido van Rossum7f43da71994-08-01 12:15:30 +000014131fi
Christian Heimes32eba612021-03-19 10:29:25 +010014132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14134$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014135
Guido van Rossumda88dad1995-01-26 00:46:29 +000014136have_prototypes=no
Christian Heimes32eba612021-03-19 10:29:25 +010014137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14138$as_echo_n "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014140/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014141int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014142int
Christian Heimes32eba612021-03-19 10:29:25 +010014143main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014144{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014145return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014146 ;
14147 return 0;
14148}
14149_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014150if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014151
Christian Heimes32eba612021-03-19 10:29:25 +010014152$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014153
Matthias Kloseb159a552010-04-25 21:00:44 +000014154 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014155fi
Christian Heimes32eba612021-03-19 10:29:25 +010014156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14158$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014159
Guido van Rossumda88dad1995-01-26 00:46:29 +000014160works=no
Christian Heimes32eba612021-03-19 10:29:25 +010014161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14162$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014164/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014165
14166#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014167int foo(int x, ...) {
14168 va_list va;
14169 va_start(va, x);
14170 va_arg(va, int);
14171 va_arg(va, char *);
14172 va_arg(va, double);
14173 return 0;
14174}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014175
Martin v. Löwis11437992002-04-12 09:54:03 +000014176int
Christian Heimes32eba612021-03-19 10:29:25 +010014177main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014178{
Guido van Rossum90eea071996-08-30 20:58:57 +000014179return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 ;
14181 return 0;
14182}
14183_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014184if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
14186
Christian Heimes32eba612021-03-19 10:29:25 +010014187$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014188
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014189 works=yes
14190
Guido van Rossum627b2d71993-12-24 10:39:16 +000014191fi
Christian Heimes32eba612021-03-19 10:29:25 +010014192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14194$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014195
Martin v. Löwisd6320502004-08-12 13:45:08 +000014196# check for socketpair
Christian Heimes32eba612021-03-19 10:29:25 +010014197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14198$as_echo_n "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014200/* end confdefs.h. */
14201
14202#include <sys/types.h>
14203#include <sys/socket.h>
14204
14205int
Christian Heimes32eba612021-03-19 10:29:25 +010014206main ()
Martin v. Löwisd6320502004-08-12 13:45:08 +000014207{
14208void *x=socketpair
14209 ;
14210 return 0;
14211}
14212_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014213if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014214
Christian Heimes32eba612021-03-19 10:29:25 +010014215$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014216
Christian Heimes32eba612021-03-19 10:29:25 +010014217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14218$as_echo "yes" >&6; }
14219else
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14221$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014222
14223fi
Christian Heimes32eba612021-03-19 10:29:25 +010014224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014225
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014226# check if sockaddr has sa_len member
Christian Heimes32eba612021-03-19 10:29:25 +010014227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14228$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014230/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014231#include <sys/types.h>
14232#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014233int
Christian Heimes32eba612021-03-19 10:29:25 +010014234main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014235{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014236struct sockaddr x;
14237x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 ;
14239 return 0;
14240}
14241_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014242if ac_fn_c_try_compile "$LINENO"; then :
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14244$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Christian Heimes32eba612021-03-19 10:29:25 +010014246$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014247
Christian Heimes32eba612021-03-19 10:29:25 +010014248else
14249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14250$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014251
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014252fi
Christian Heimes32eba612021-03-19 10:29:25 +010014253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014254
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014255# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014256
14257
Matthias Kloseb9621712010-04-24 17:59:49 +000014258ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Christian Heimes32eba612021-03-19 10:29:25 +010014259if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014260
Christian Heimes32eba612021-03-19 10:29:25 +010014261 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014262
Christian Heimes32eba612021-03-19 10:29:25 +010014263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14264$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014265 OLD_CFLAGS=$CFLAGS
14266 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014268/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014269
14270# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
Martin v. Löwis11437992002-04-12 09:54:03 +000014272int
Christian Heimes32eba612021-03-19 10:29:25 +010014273main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014274{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014275
14276 char *name;
14277 struct hostent *he, *res;
14278 char buffer[2048];
14279 int buflen = 2048;
14280 int h_errnop;
14281
14282 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
14284 ;
14285 return 0;
14286}
14287_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014289
Christian Heimes32eba612021-03-19 10:29:25 +010014290 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014291
Martin v. Löwis11437992002-04-12 09:54:03 +000014292
Christian Heimes32eba612021-03-19 10:29:25 +010014293$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014294
Christian Heimes32eba612021-03-19 10:29:25 +010014295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14296$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
Christian Heimes32eba612021-03-19 10:29:25 +010014298else
Skip Montanaro6dead952003-09-25 14:50:04 +000014299
Christian Heimes32eba612021-03-19 10:29:25 +010014300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14301$as_echo "no" >&6; }
14302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14303$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014305/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014306
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014307# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Martin v. Löwis11437992002-04-12 09:54:03 +000014309int
Christian Heimes32eba612021-03-19 10:29:25 +010014310main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014311{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014312
14313 char *name;
14314 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014315 char buffer[2048];
14316 int buflen = 2048;
14317 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014318
Matthias Kloseb159a552010-04-25 21:00:44 +000014319 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
14321 ;
14322 return 0;
14323}
14324_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Christian Heimes32eba612021-03-19 10:29:25 +010014327 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014328
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
Christian Heimes32eba612021-03-19 10:29:25 +010014330$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014331
Christian Heimes32eba612021-03-19 10:29:25 +010014332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14333$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
Christian Heimes32eba612021-03-19 10:29:25 +010014335else
Skip Montanaro6dead952003-09-25 14:50:04 +000014336
Christian Heimes32eba612021-03-19 10:29:25 +010014337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14338$as_echo "no" >&6; }
14339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14340$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14342/* end confdefs.h. */
14343
14344# include <netdb.h>
14345
14346int
Christian Heimes32eba612021-03-19 10:29:25 +010014347main ()
Matthias Kloseb159a552010-04-25 21:00:44 +000014348{
14349
14350 char *name;
14351 struct hostent *he;
14352 struct hostent_data data;
14353
14354 (void) gethostbyname_r(name, he, &data);
14355
14356 ;
14357 return 0;
14358}
14359_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014360if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000014361
Christian Heimes32eba612021-03-19 10:29:25 +010014362 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014363
14364
Christian Heimes32eba612021-03-19 10:29:25 +010014365$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014366
Christian Heimes32eba612021-03-19 10:29:25 +010014367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14368$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014369
Christian Heimes32eba612021-03-19 10:29:25 +010014370else
Matthias Kloseb159a552010-04-25 21:00:44 +000014371
Christian Heimes32eba612021-03-19 10:29:25 +010014372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14373$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014375fi
Christian Heimes32eba612021-03-19 10:29:25 +010014376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014378fi
Christian Heimes32eba612021-03-19 10:29:25 +010014379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014381fi
Christian Heimes32eba612021-03-19 10:29:25 +010014382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014383 CFLAGS=$OLD_CFLAGS
14384
Christian Heimes32eba612021-03-19 10:29:25 +010014385else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014386
Christian Heimes32eba612021-03-19 10:29:25 +010014387 for ac_func in gethostbyname
14388do :
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Christian Heimes32eba612021-03-19 10:29:25 +010014390if test "x$ac_cv_func_gethostbyname" = xyes; then :
14391 cat >>confdefs.h <<_ACEOF
14392#define HAVE_GETHOSTBYNAME 1
14393_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014394
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014395fi
Christian Heimes32eba612021-03-19 10:29:25 +010014396done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014397
Michael W. Hudson54241132001-12-07 15:38:26 +000014398
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014399fi
14400
Michael W. Hudson54241132001-12-07 15:38:26 +000014401
14402
14403
14404
14405
14406
Guido van Rossum627b2d71993-12-24 10:39:16 +000014407# checks for system services
14408# (none yet)
14409
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014410# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014411ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Christian Heimes32eba612021-03-19 10:29:25 +010014412if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014413
Christian Heimes32eba612021-03-19 10:29:25 +010014414else
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14416$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
14417if ${ac_cv_lib_ieee___fpu_control+:} false; then :
14418 $as_echo_n "(cached) " >&6
14419else
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014421LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425/* Override any GCC internal prototype to avoid an error.
14426 Use char because int might match the return type of a GCC
14427 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010014428#ifdef __cplusplus
14429extern "C"
14430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014431char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014432int
Christian Heimes32eba612021-03-19 10:29:25 +010014433main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 ;
14437 return 0;
14438}
14439_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014441 ac_cv_lib_ieee___fpu_control=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014442else
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014444fi
Christian Heimes32eba612021-03-19 10:29:25 +010014445rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014447LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014448fi
Christian Heimes32eba612021-03-19 10:29:25 +010014449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14450$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
14451if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
14452 cat >>confdefs.h <<_ACEOF
14453#define HAVE_LIBIEEE 1
14454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014455
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014456 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014457
Guido van Rossum627b2d71993-12-24 10:39:16 +000014458fi
14459
Michael W. Hudson54241132001-12-07 15:38:26 +000014460
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014461fi
14462
Michael W. Hudson54241132001-12-07 15:38:26 +000014463
Guido van Rossum7f43da71994-08-01 12:15:30 +000014464# check for --with-libm=...
14465
Guido van Rossum563e7081996-09-10 18:20:48 +000014466case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014467Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014468*) LIBM=-lm
14469esac
Christian Heimes32eba612021-03-19 10:29:25 +010014470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14471$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473# Check whether --with-libm was given.
Christian Heimes32eba612021-03-19 10:29:25 +010014474if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014476if test "$withval" = no
14477then LIBM=
Christian Heimes32eba612021-03-19 10:29:25 +010014478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14479$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014480elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014481then LIBM=$withval
Christian Heimes32eba612021-03-19 10:29:25 +010014482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14483$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014484else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014485fi
Christian Heimes32eba612021-03-19 10:29:25 +010014486else
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14488$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489fi
14490
Guido van Rossum7f43da71994-08-01 12:15:30 +000014491
14492# check for --with-libc=...
14493
Christian Heimes32eba612021-03-19 10:29:25 +010014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14495$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497# Check whether --with-libc was given.
Christian Heimes32eba612021-03-19 10:29:25 +010014498if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014500if test "$withval" = no
14501then LIBC=
Christian Heimes32eba612021-03-19 10:29:25 +010014502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14503$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014504elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014505then LIBC=$withval
Christian Heimes32eba612021-03-19 10:29:25 +010014506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14507$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014508else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014509fi
Christian Heimes32eba612021-03-19 10:29:25 +010014510else
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14512$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513fi
14514
Guido van Rossum7f43da71994-08-01 12:15:30 +000014515
Stefan Krah1919b7e2012-03-21 18:25:23 +010014516# **************************************
14517# * Check for gcc x64 inline assembler *
14518# **************************************
14519
Christian Heimes32eba612021-03-19 10:29:25 +010014520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14521$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14523/* end confdefs.h. */
14524
14525int
Christian Heimes32eba612021-03-19 10:29:25 +010014526main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010014527{
14528
14529 __asm__ __volatile__ ("movq %rcx, %rax");
14530
14531 ;
14532 return 0;
14533}
14534_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014535if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014536 have_gcc_asm_for_x64=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014537else
Stefan Krah1919b7e2012-03-21 18:25:23 +010014538 have_gcc_asm_for_x64=no
14539fi
Christian Heimes32eba612021-03-19 10:29:25 +010014540rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014541 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +010014542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14543$as_echo "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014544if test "$have_gcc_asm_for_x64" = yes
14545then
14546
Christian Heimes32eba612021-03-19 10:29:25 +010014547$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010014548
14549fi
14550
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014551# **************************************************
14552# * Check for various properties of floating point *
14553# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014554
Christian Heimes32eba612021-03-19 10:29:25 +010014555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14556$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14557if ${ax_cv_c_float_words_bigendian+:} false; then :
14558 $as_echo_n "(cached) " >&6
14559else
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014560
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014561
14562ax_cv_c_float_words_bigendian=unknown
14563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014564/* end confdefs.h. */
14565
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014566
14567double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14568
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014569
14570_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014571if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014572
14573
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014574if grep noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014575 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014576fi
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014577if grep seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014578 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14579 ax_cv_c_float_words_bigendian=no
14580 else
14581 ax_cv_c_float_words_bigendian=unknown
14582 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014583fi
14584
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014585
14586fi
Christian Heimes32eba612021-03-19 10:29:25 +010014587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014588fi
Christian Heimes32eba612021-03-19 10:29:25 +010014589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14590$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014591
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014592case $ax_cv_c_float_words_bigendian in
14593 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014594
Christian Heimes32eba612021-03-19 10:29:25 +010014595$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014596 ;;
14597 no)
14598 ;;
14599 *)
14600 as_fn_error $? "
14601
14602Unknown float word ordering. You need to manually preset
14603ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14604
14605 " "$LINENO" 5 ;;
14606esac
14607
14608
14609if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014610then
14611
Christian Heimes32eba612021-03-19 10:29:25 +010014612$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014613
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014614elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014615then
14616
Christian Heimes32eba612021-03-19 10:29:25 +010014617$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014618
14619else
14620 # Some ARM platforms use a mixed-endian representation for doubles.
14621 # While Python doesn't currently have full support for these platforms
14622 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14623 # conversions work.
14624 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14625 # or little, then it must be this?
14626
Christian Heimes32eba612021-03-19 10:29:25 +010014627$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014628
14629fi
14630
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014631# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014632# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014633# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014634# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014635# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014636# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014637
14638# This inline assembler syntax may also work for suncc and icc,
14639# so we try it on all platforms.
14640
Christian Heimes32eba612021-03-19 10:29:25 +010014641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14642$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014644/* end confdefs.h. */
14645
14646int
Christian Heimes32eba612021-03-19 10:29:25 +010014647main ()
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014648{
14649
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014650 unsigned short cw;
14651 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14652 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014653
14654 ;
14655 return 0;
14656}
14657_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014658if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014659 have_gcc_asm_for_x87=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014660else
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014662fi
Christian Heimes32eba612021-03-19 10:29:25 +010014663rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014664 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +010014665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14666$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014667if test "$have_gcc_asm_for_x87" = yes
14668then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014669
Christian Heimes32eba612021-03-19 10:29:25 +010014670$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014671
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014673
Christian Heimes32eba612021-03-19 10:29:25 +010014674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14675$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14677/* end confdefs.h. */
14678
14679int
Christian Heimes32eba612021-03-19 10:29:25 +010014680main ()
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014681{
14682
14683 unsigned int fpcr;
14684 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14685 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14686
14687 ;
14688 return 0;
14689}
14690_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014691if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014692 have_gcc_asm_for_mc68881=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014693else
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014694 have_gcc_asm_for_mc68881=no
14695fi
Christian Heimes32eba612021-03-19 10:29:25 +010014696rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014697 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +010014698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14699$as_echo "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014700if test "$have_gcc_asm_for_mc68881" = yes
14701then
14702
Christian Heimes32eba612021-03-19 10:29:25 +010014703$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014704
14705fi
14706
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014707# Detect whether system arithmetic is subject to x87-style double
14708# rounding issues. The result of this test has little meaning on non
14709# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14710# mode is round-to-nearest and double rounding issues are present, and
14711# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Christian Heimes32eba612021-03-19 10:29:25 +010014712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14713$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014714# $BASECFLAGS may affect the result
14715ac_save_cc="$CC"
14716CC="$CC $BASECFLAGS"
Christian Heimes32eba612021-03-19 10:29:25 +010014717if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014718 ac_cv_x87_double_rounding=no
Christian Heimes32eba612021-03-19 10:29:25 +010014719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014721/* end confdefs.h. */
14722
14723#include <stdlib.h>
14724#include <math.h>
14725int main() {
14726 volatile double x, y, z;
14727 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14728 x = 0.99999999999999989; /* 1-2**-53 */
14729 y = 1./x;
14730 if (y != 1.)
14731 exit(0);
14732 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14733 x = 1e16;
14734 y = 2.99999;
14735 z = x + y;
14736 if (z != 1e16+4.)
14737 exit(0);
14738 /* both tests show evidence of double rounding */
14739 exit(1);
14740}
14741
14742_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014743if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014744 ac_cv_x87_double_rounding=no
Christian Heimes32eba612021-03-19 10:29:25 +010014745else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014750fi
14751
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014752CC="$ac_save_cc"
Christian Heimes32eba612021-03-19 10:29:25 +010014753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14754$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014755if test "$ac_cv_x87_double_rounding" = yes
14756then
14757
Christian Heimes32eba612021-03-19 10:29:25 +010014758$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014759
14760fi
14761
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014762# ************************************
14763# * Check for mathematical functions *
14764# ************************************
14765
14766LIBS_SAVE=$LIBS
14767LIBS="$LIBS $LIBM"
14768
Christian Heimes32eba612021-03-19 10:29:25 +010014769for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14770do :
14771 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14772ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14773if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14774 cat >>confdefs.h <<_ACEOF
14775#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14776_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014777
14778fi
Christian Heimes32eba612021-03-19 10:29:25 +010014779done
14780
14781for ac_func in hypot lgamma log1p log2 round tgamma
14782do :
14783 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14784ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14785if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14786 cat >>confdefs.h <<_ACEOF
14787#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14788_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014789
14790fi
Christian Heimes32eba612021-03-19 10:29:25 +010014791done
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014792
Christian Heimes32eba612021-03-19 10:29:25 +010014793ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14794"
14795if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014796 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014797else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014798 ac_have_decl=0
14799fi
Christian Heimes32eba612021-03-19 10:29:25 +010014800
14801cat >>confdefs.h <<_ACEOF
14802#define HAVE_DECL_ISINF $ac_have_decl
14803_ACEOF
14804ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14805"
14806if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014807 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014808else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014809 ac_have_decl=0
14810fi
Christian Heimes32eba612021-03-19 10:29:25 +010014811
14812cat >>confdefs.h <<_ACEOF
14813#define HAVE_DECL_ISNAN $ac_have_decl
14814_ACEOF
14815ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14816"
14817if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014818 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014819else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014820 ac_have_decl=0
14821fi
Christian Heimes32eba612021-03-19 10:29:25 +010014822
14823cat >>confdefs.h <<_ACEOF
14824#define HAVE_DECL_ISFINITE $ac_have_decl
14825_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014826
14827
Mark Dickinsona614f042009-11-28 12:48:43 +000014828# For multiprocessing module, check that sem_open
14829# actually works. For FreeBSD versions <= 7.2,
14830# the kernel module that provides POSIX semaphores
14831# isn't loaded by default, so an attempt to call
14832# sem_open results in a 'Signal 12' error.
Christian Heimes32eba612021-03-19 10:29:25 +010014833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14834$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
14835if ${ac_cv_posix_semaphores_enabled+:} false; then :
14836 $as_echo_n "(cached) " >&6
14837else
14838 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014839 ac_cv_posix_semaphores_enabled=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014840else
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014842/* end confdefs.h. */
14843
14844#include <unistd.h>
14845#include <fcntl.h>
14846#include <stdio.h>
14847#include <semaphore.h>
14848#include <sys/stat.h>
14849
14850int main(void) {
14851 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14852 if (a == SEM_FAILED) {
14853 perror("sem_open");
14854 return 1;
14855 }
14856 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014857 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014858 return 0;
14859}
14860
14861_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014862if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014863 ac_cv_posix_semaphores_enabled=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014864else
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014869fi
14870
14871
Mark Dickinsona614f042009-11-28 12:48:43 +000014872fi
14873
Christian Heimes32eba612021-03-19 10:29:25 +010014874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14875$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014876if test $ac_cv_posix_semaphores_enabled = no
14877then
14878
Christian Heimes32eba612021-03-19 10:29:25 +010014879$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014880
14881fi
14882
Mark Dickinson10683072009-04-18 21:18:19 +000014883# Multiprocessing check for broken sem_getvalue
Christian Heimes32eba612021-03-19 10:29:25 +010014884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14885$as_echo_n "checking for broken sem_getvalue... " >&6; }
14886if ${ac_cv_broken_sem_getvalue+:} false; then :
14887 $as_echo_n "(cached) " >&6
14888else
14889 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014890 ac_cv_broken_sem_getvalue=yes
Christian Heimes32eba612021-03-19 10:29:25 +010014891else
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014893/* end confdefs.h. */
14894
14895#include <unistd.h>
14896#include <fcntl.h>
14897#include <stdio.h>
14898#include <semaphore.h>
14899#include <sys/stat.h>
14900
14901int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014902 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014903 int count;
14904 int res;
14905 if(a==SEM_FAILED){
14906 perror("sem_open");
14907 return 1;
14908
14909 }
14910 res = sem_getvalue(a, &count);
14911 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014912 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014913 return res==-1 ? 1 : 0;
14914}
14915
Mark Dickinson10683072009-04-18 21:18:19 +000014916_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010014917if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014918 ac_cv_broken_sem_getvalue=no
Christian Heimes32eba612021-03-19 10:29:25 +010014919else
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014924fi
14925
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014926
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014927fi
14928
Christian Heimes32eba612021-03-19 10:29:25 +010014929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14930$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014931if test $ac_cv_broken_sem_getvalue = yes
14932then
14933
Christian Heimes32eba612021-03-19 10:29:25 +010014934$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014935
14936fi
14937
Christian Heimes32eba612021-03-19 10:29:25 +010014938ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14939"
14940if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014941 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014942else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014943 ac_have_decl=0
14944fi
Christian Heimes32eba612021-03-19 10:29:25 +010014945
14946cat >>confdefs.h <<_ACEOF
14947#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14948_ACEOF
14949ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14950"
14951if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014952 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014953else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014954 ac_have_decl=0
14955fi
Christian Heimes32eba612021-03-19 10:29:25 +010014956
14957cat >>confdefs.h <<_ACEOF
14958#define HAVE_DECL_RTLD_NOW $ac_have_decl
14959_ACEOF
14960ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14961"
14962if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014963 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014964else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014965 ac_have_decl=0
14966fi
Christian Heimes32eba612021-03-19 10:29:25 +010014967
14968cat >>confdefs.h <<_ACEOF
14969#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14970_ACEOF
14971ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14972"
14973if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014974 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014975else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014976 ac_have_decl=0
14977fi
Christian Heimes32eba612021-03-19 10:29:25 +010014978
14979cat >>confdefs.h <<_ACEOF
14980#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14981_ACEOF
14982ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14983"
14984if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014985 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014986else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014987 ac_have_decl=0
14988fi
Christian Heimes32eba612021-03-19 10:29:25 +010014989
14990cat >>confdefs.h <<_ACEOF
14991#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14992_ACEOF
14993ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14994"
14995if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014996 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010014997else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014998 ac_have_decl=0
14999fi
Christian Heimes32eba612021-03-19 10:29:25 +010015000
15001cat >>confdefs.h <<_ACEOF
15002#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
15003_ACEOF
15004ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
15005"
15006if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015007 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010015008else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015009 ac_have_decl=0
15010fi
Christian Heimes32eba612021-03-19 10:29:25 +010015011
15012cat >>confdefs.h <<_ACEOF
15013#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
15014_ACEOF
15015ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
15016"
15017if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
Michael Feltc5ae1692017-12-19 13:58:49 +010015018 ac_have_decl=1
Christian Heimes32eba612021-03-19 10:29:25 +010015019else
Michael Feltc5ae1692017-12-19 13:58:49 +010015020 ac_have_decl=0
15021fi
Christian Heimes32eba612021-03-19 10:29:25 +010015022
15023cat >>confdefs.h <<_ACEOF
15024#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
15025_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015026
15027
Mark Dickinsonbd792642009-03-18 20:06:12 +000015028# determine what size digit to use for Python's longs
Christian Heimes32eba612021-03-19 10:29:25 +010015029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15030$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015031# Check whether --enable-big-digits was given.
Christian Heimes32eba612021-03-19 10:29:25 +010015032if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015033 enableval=$enable_big_digits; case $enable_big_digits in
15034yes)
15035 enable_big_digits=30 ;;
15036no)
15037 enable_big_digits=15 ;;
1503815|30)
15039 ;;
15040*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015041 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 +000015042esac
Christian Heimes32eba612021-03-19 10:29:25 +010015043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15044$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015045
Christian Heimes32eba612021-03-19 10:29:25 +010015046cat >>confdefs.h <<_ACEOF
15047#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15048_ACEOF
Mark Dickinsonbd792642009-03-18 20:06:12 +000015049
15050
Christian Heimes32eba612021-03-19 10:29:25 +010015051else
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15053$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015054fi
15055
15056
Guido van Rossumef2255b2000-03-10 22:30:29 +000015057# check for wchar.h
Christian Heimes32eba612021-03-19 10:29:25 +010015058ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
15059if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015060
15061
Christian Heimes32eba612021-03-19 10:29:25 +010015062$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015063
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015064 wchar_h="yes"
15065
Christian Heimes32eba612021-03-19 10:29:25 +010015066else
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015068
15069fi
15070
Michael W. Hudson54241132001-12-07 15:38:26 +000015071
Christian Heimes32eba612021-03-19 10:29:25 +010015072
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015073# determine wchar_t size
15074if test "$wchar_h" = yes
15075then
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15078# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15079# This bug is HP SR number 8606223364.
Christian Heimes32eba612021-03-19 10:29:25 +010015080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15081$as_echo_n "checking size of wchar_t... " >&6; }
15082if ${ac_cv_sizeof_wchar_t+:} false; then :
15083 $as_echo_n "(cached) " >&6
15084else
Matthias Kloseb9621712010-04-24 17:59:49 +000015085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
Christian Heimes32eba612021-03-19 10:29:25 +010015086"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015087
Christian Heimes32eba612021-03-19 10:29:25 +010015088else
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 if test "$ac_cv_type_wchar_t" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +010015090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015092as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015093See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094 else
15095 ac_cv_sizeof_wchar_t=0
15096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015098
Martin v. Löwis11437992002-04-12 09:54:03 +000015099fi
Christian Heimes32eba612021-03-19 10:29:25 +010015100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15101$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102
15103
15104
Christian Heimes32eba612021-03-19 10:29:25 +010015105cat >>confdefs.h <<_ACEOF
15106#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
15107_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015108
Michael W. Hudson54241132001-12-07 15:38:26 +000015109
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015110fi
15111
Christian Heimes32eba612021-03-19 10:29:25 +010015112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15113$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015114have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015116/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015117
15118#include <tcl.h>
15119#if TCL_UTF_MAX != 6
15120# error "NOT UCS4_TCL"
15121#endif
15122int
Christian Heimes32eba612021-03-19 10:29:25 +010015123main ()
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015124{
15125
15126 ;
15127 return 0;
15128}
15129_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015131
15132
Christian Heimes32eba612021-03-19 10:29:25 +010015133$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015134
15135 have_ucs4_tcl=yes
15136
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015137fi
Christian Heimes32eba612021-03-19 10:29:25 +010015138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15140$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015141
Skip Montanaro6dead952003-09-25 14:50:04 +000015142# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015143if test "$wchar_h" = yes
15144then
15145 # check whether wchar_t is signed or not
Christian Heimes32eba612021-03-19 10:29:25 +010015146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15147$as_echo_n "checking whether wchar_t is signed... " >&6; }
15148 if ${ac_cv_wchar_t_signed+:} false; then :
15149 $as_echo_n "(cached) " >&6
15150else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015151
Christian Heimes32eba612021-03-19 10:29:25 +010015152 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015153 ac_cv_wchar_t_signed=yes
Christian Heimes32eba612021-03-19 10:29:25 +010015154else
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015156/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015157
15158 #include <wchar.h>
15159 int main()
15160 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015161 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015162 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015163 }
15164
15165_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015166if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015167 ac_cv_wchar_t_signed=yes
Christian Heimes32eba612021-03-19 10:29:25 +010015168else
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15172 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015173fi
15174
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015175fi
15176
Christian Heimes32eba612021-03-19 10:29:25 +010015177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15178$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179fi
15180
Christian Heimes32eba612021-03-19 10:29:25 +010015181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15182$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015183# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015184if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015185 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015186then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015187
Christian Heimes32eba612021-03-19 10:29:25 +010015188$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Christian Heimes32eba612021-03-19 10:29:25 +010015190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15191$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015192else
Christian Heimes32eba612021-03-19 10:29:25 +010015193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15194$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015195fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015196
15197# check for endianness
Christian Heimes32eba612021-03-19 10:29:25 +010015198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15199$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
15200if ${ac_cv_c_bigendian+:} false; then :
15201 $as_echo_n "(cached) " >&6
15202else
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 ac_cv_c_bigendian=unknown
15204 # See if we're dealing with a universal compiler.
15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15206/* end confdefs.h. */
15207#ifndef __APPLE_CC__
15208 not a universal capable compiler
15209 #endif
15210 typedef int dummy;
15211
Skip Montanaro6dead952003-09-25 14:50:04 +000015212_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015213if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015214
15215 # Check for potential -arch flags. It is not universal unless
15216 # there are at least two -arch flags with different values.
15217 ac_arch=
15218 ac_prev=
15219 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15220 if test -n "$ac_prev"; then
15221 case $ac_word in
15222 i?86 | x86_64 | ppc | ppc64)
15223 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15224 ac_arch=$ac_word
15225 else
15226 ac_cv_c_bigendian=universal
15227 break
15228 fi
15229 ;;
15230 esac
15231 ac_prev=
15232 elif test "x$ac_word" = "x-arch"; then
15233 ac_prev=arch
15234 fi
15235 done
15236fi
Christian Heimes32eba612021-03-19 10:29:25 +010015237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 if test $ac_cv_c_bigendian = unknown; then
15239 # See if sys/param.h defines the BYTE_ORDER macro.
15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015241/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015242#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015244
Martin v. Löwis11437992002-04-12 09:54:03 +000015245int
Christian Heimes32eba612021-03-19 10:29:25 +010015246main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015247{
Matthias Kloseb9621712010-04-24 17:59:49 +000015248#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15249 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15250 && LITTLE_ENDIAN)
15251 bogus endian macros
15252 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
15254 ;
15255 return 0;
15256}
15257_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015258if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015259 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015261/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015262#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015263 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015264
Martin v. Löwis11437992002-04-12 09:54:03 +000015265int
Christian Heimes32eba612021-03-19 10:29:25 +010015266main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015267{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015268#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 not big endian
15270 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015271
15272 ;
15273 return 0;
15274}
15275_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015276if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015277 ac_cv_c_bigendian=yes
Christian Heimes32eba612021-03-19 10:29:25 +010015278else
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015280fi
Christian Heimes32eba612021-03-19 10:29:25 +010015281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015282fi
Christian Heimes32eba612021-03-19 10:29:25 +010015283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 fi
15285 if test $ac_cv_c_bigendian = unknown; then
15286 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015288/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015289#include <limits.h>
15290
Martin v. Löwis11437992002-04-12 09:54:03 +000015291int
Christian Heimes32eba612021-03-19 10:29:25 +010015292main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015293{
Matthias Kloseb9621712010-04-24 17:59:49 +000015294#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15295 bogus endian macros
15296 #endif
15297
Martin v. Löwis11437992002-04-12 09:54:03 +000015298 ;
15299 return 0;
15300}
15301_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015302if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 # It does; now see whether it defined to _BIG_ENDIAN or not.
15304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15305/* end confdefs.h. */
15306#include <limits.h>
15307
15308int
Christian Heimes32eba612021-03-19 10:29:25 +010015309main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015310{
15311#ifndef _BIG_ENDIAN
15312 not big endian
15313 #endif
15314
15315 ;
15316 return 0;
15317}
15318_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 ac_cv_c_bigendian=yes
Christian Heimes32eba612021-03-19 10:29:25 +010015321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015323fi
Christian Heimes32eba612021-03-19 10:29:25 +010015324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015325fi
Christian Heimes32eba612021-03-19 10:29:25 +010015326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 fi
15328 if test $ac_cv_c_bigendian = unknown; then
15329 # Compile a test program.
Christian Heimes32eba612021-03-19 10:29:25 +010015330 if test "$cross_compiling" = yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015331 # Try to guess by grepping values from an object file.
15332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15333/* end confdefs.h. */
Christian Heimes32eba612021-03-19 10:29:25 +010015334short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Christian Heimes32eba612021-03-19 10:29:25 +010015336 short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15338 int use_ascii (int i) {
15339 return ascii_mm[i] + ascii_ii[i];
15340 }
Christian Heimes32eba612021-03-19 10:29:25 +010015341 short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Christian Heimes32eba612021-03-19 10:29:25 +010015343 short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15345 int use_ebcdic (int i) {
15346 return ebcdic_mm[i] + ebcdic_ii[i];
15347 }
15348 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349
Matthias Kloseb9621712010-04-24 17:59:49 +000015350int
Christian Heimes32eba612021-03-19 10:29:25 +010015351main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015352{
15353return use_ascii (foo) == use_ebcdic (foo);
15354 ;
15355 return 0;
15356}
15357_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015358if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15360 ac_cv_c_bigendian=yes
15361 fi
15362 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15363 if test "$ac_cv_c_bigendian" = unknown; then
15364 ac_cv_c_bigendian=no
15365 else
15366 # finding both strings is unlikely to happen, but who knows?
15367 ac_cv_c_bigendian=unknown
15368 fi
15369 fi
15370fi
Christian Heimes32eba612021-03-19 10:29:25 +010015371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015374/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015376int
Christian Heimes32eba612021-03-19 10:29:25 +010015377main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 /* Are we little or big endian? From Harbison&Steele. */
15381 union
15382 {
15383 long int l;
15384 char c[sizeof (long int)];
15385 } u;
15386 u.l = 1;
15387 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388
15389 ;
15390 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015391}
Martin v. Löwis11437992002-04-12 09:54:03 +000015392_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015393if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015394 ac_cv_c_bigendian=no
Christian Heimes32eba612021-03-19 10:29:25 +010015395else
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015403fi
Christian Heimes32eba612021-03-19 10:29:25 +010015404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15405$as_echo "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 case $ac_cv_c_bigendian in #(
15407 yes)
Christian Heimes32eba612021-03-19 10:29:25 +010015408 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015409;; #(
15410 no)
15411 ;; #(
15412 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015413
Christian Heimes32eba612021-03-19 10:29:25 +010015414$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015415
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 ;; #(
15417 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015418 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015419 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015421
Michael W. Hudson54241132001-12-07 15:38:26 +000015422
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015423# ABI version string for Python extension modules. This appears between the
15424# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15425# from the following attributes which affect the ABI of this Python build (in
15426# this order):
15427#
15428# * The Python implementation (always 'cpython-' for us)
15429# * The major and minor version numbers
15430# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015431#
15432# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015433# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15434# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015435#
15436# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15437# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015438
Christian Heimes32eba612021-03-19 10:29:25 +010015439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15440$as_echo_n "checking ABIFLAGS... " >&6; }
15441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15442$as_echo "$ABIFLAGS" >&6; }
15443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15444$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015445SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Christian Heimes32eba612021-03-19 10:29:25 +010015446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15447$as_echo "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015448
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015449# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15450if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015451 # Similar to SOABI but remove "d" flag from ABIFLAGS
15452
15453 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15454
Christian Heimes32eba612021-03-19 10:29:25 +010015455cat >>confdefs.h <<_ACEOF
15456#define ALT_SOABI "${ALT_SOABI}"
15457_ACEOF
Victor Stinner5422e3c2019-04-26 01:40:00 +020015458
15459fi
15460
Victor Stinner52a327c2020-12-23 03:41:08 +010015461
Matti Picusa44ce6c2020-12-20 04:56:57 +020015462EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015463
Christian Heimes32eba612021-03-19 10:29:25 +010015464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15465$as_echo_n "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015466LDVERSION='$(VERSION)$(ABIFLAGS)'
Christian Heimes32eba612021-03-19 10:29:25 +010015467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15468$as_echo "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015469
E. M. Brayc994c8f2019-05-24 17:33:47 +020015470# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015471
E. M. Brayb1fc4172019-05-24 18:39:39 +020015472if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015473 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015474else
15475 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015476fi
15477
doko@python.org87421192013-01-26 11:39:31 +010015478
Victor Stinner51ae31e2020-06-09 15:32:43 +020015479
15480BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15481
15482
15483# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015484# /usr/$LIDIRNAME/python$VERSION
15485
15486PLATLIBDIR="lib"
Christian Heimes32eba612021-03-19 10:29:25 +010015487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15488$as_echo_n "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015489
15490# Check whether --with-platlibdir was given.
Christian Heimes32eba612021-03-19 10:29:25 +010015491if test "${with_platlibdir+set}" = set; then :
Victor Stinner8510f432020-03-10 09:53:09 +010015492 withval=$with_platlibdir;
15493# ignore 3 options:
15494# --with-platlibdir
15495# --with-platlibdir=
15496# --without-platlibdir
15497if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15498then
Christian Heimes32eba612021-03-19 10:29:25 +010015499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15500$as_echo "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015501 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015502 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015503else
Christian Heimes32eba612021-03-19 10:29:25 +010015504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15505$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015506fi
Christian Heimes32eba612021-03-19 10:29:25 +010015507else
15508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15509$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015510fi
15511
15512
15513
15514
15515if test x$PLATFORM_TRIPLET = x; then
15516 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15517else
15518 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015519fi
doko@python.org87421192013-01-26 11:39:31 +010015520
15521
Victor Stinner75e59a92021-01-20 17:07:21 +010015522# Check for --with-wheel-pkg-dir=PATH
15523
15524WHEEL_PKG_DIR=""
Christian Heimes32eba612021-03-19 10:29:25 +010015525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15526$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015527
15528# Check whether --with-wheel-pkg-dir was given.
Christian Heimes32eba612021-03-19 10:29:25 +010015529if test "${with_wheel_pkg_dir+set}" = set; then :
Victor Stinner75e59a92021-01-20 17:07:21 +010015530 withval=$with_wheel_pkg_dir;
15531if test -n "$withval"; then
Christian Heimes32eba612021-03-19 10:29:25 +010015532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15533$as_echo "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015534 WHEEL_PKG_DIR="$withval"
15535else
Christian Heimes32eba612021-03-19 10:29:25 +010015536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15537$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015538fi
Christian Heimes32eba612021-03-19 10:29:25 +010015539else
15540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15541$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015542fi
15543
15544
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015545# Check whether right shifting a negative integer extends the sign bit
15546# or fills with zeros (like the Cray J90, according to Tim Peters).
Christian Heimes32eba612021-03-19 10:29:25 +010015547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15548$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
15549if ${ac_cv_rshift_extends_sign+:} false; then :
15550 $as_echo_n "(cached) " >&6
15551else
Martin v. Löwis11437992002-04-12 09:54:03 +000015552
Christian Heimes32eba612021-03-19 10:29:25 +010015553if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015554 ac_cv_rshift_extends_sign=yes
Christian Heimes32eba612021-03-19 10:29:25 +010015555else
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015557/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015558
15559int main()
15560{
Joshua Root674fa0a2020-12-14 07:56:34 +110015561 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015562}
15563
Martin v. Löwis11437992002-04-12 09:54:03 +000015564_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015565if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015566 ac_cv_rshift_extends_sign=yes
Christian Heimes32eba612021-03-19 10:29:25 +010015567else
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015572fi
15573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574fi
15575
Christian Heimes32eba612021-03-19 10:29:25 +010015576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15577$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015578if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015579then
Martin v. Löwis11437992002-04-12 09:54:03 +000015580
Christian Heimes32eba612021-03-19 10:29:25 +010015581$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015582
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015583fi
15584
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015585# check for getc_unlocked and related locking functions
Christian Heimes32eba612021-03-19 10:29:25 +010015586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15587$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
15588if ${ac_cv_have_getc_unlocked+:} false; then :
15589 $as_echo_n "(cached) " >&6
15590else
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015593/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015594#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015595int
Christian Heimes32eba612021-03-19 10:29:25 +010015596main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015597{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015598
15599 FILE *f = fopen("/dev/null", "r");
15600 flockfile(f);
15601 getc_unlocked(f);
15602 funlockfile(f);
15603
Martin v. Löwis11437992002-04-12 09:54:03 +000015604 ;
15605 return 0;
15606}
15607_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015608if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015609 ac_cv_have_getc_unlocked=yes
Christian Heimes32eba612021-03-19 10:29:25 +010015610else
Matthias Kloseb9621712010-04-24 17:59:49 +000015611 ac_cv_have_getc_unlocked=no
15612fi
Christian Heimes32eba612021-03-19 10:29:25 +010015613rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015616
Christian Heimes32eba612021-03-19 10:29:25 +010015617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15618$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015619if test "$ac_cv_have_getc_unlocked" = yes
15620then
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
Christian Heimes32eba612021-03-19 10:29:25 +010015622$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015623
15624fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015625
Roland Hiebere1f77692021-02-09 02:05:25 +010015626
15627# Check whether --with-readline was given.
Christian Heimes32eba612021-03-19 10:29:25 +010015628if test "${with_readline+set}" = set; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015629 withval=$with_readline;
Christian Heimes32eba612021-03-19 10:29:25 +010015630else
Roland Hiebere1f77692021-02-09 02:05:25 +010015631 with_readline=yes
15632fi
15633
15634
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015635# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010015636py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000015637# save the value of LIBS so we don't actually link Python with readline
15638LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015639
Roland Hiebere1f77692021-02-09 02:05:25 +010015640if test "$with_readline" != no; then
15641 case "$with_readline" in
15642 editline|edit)
15643 LIBREADLINE=edit
15644
Christian Heimes32eba612021-03-19 10:29:25 +010015645$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010015646
15647 ;;
15648 yes|readline)
15649 LIBREADLINE=readline
15650 ;;
15651 *)
15652 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
15653 ;;
15654 esac
15655
15656 # On some systems we need to link readline to a termcap compatible
15657 # library. NOTE: Keep the precedence of listed libraries synchronised
15658 # with setup.py.
Christian Heimes32eba612021-03-19 10:29:25 +010015659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15660$as_echo_n "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015661 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
15662 if test -z "$py_libtermcap"; then
15663 READLINE_LIBS="-l$LIBREADLINE"
15664 else
15665 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
15666 fi
15667 LIBS="$READLINE_LIBS $LIBS_no_readline"
15668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015669/* end confdefs.h. */
15670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671/* Override any GCC internal prototype to avoid an error.
15672 Use char because int might match the return type of a GCC
15673 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010015674#ifdef __cplusplus
15675extern "C"
15676#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015677char readline ();
15678int
Christian Heimes32eba612021-03-19 10:29:25 +010015679main ()
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015681return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015682 ;
15683 return 0;
15684}
15685_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015686if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015687 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015688fi
Christian Heimes32eba612021-03-19 10:29:25 +010015689rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015690 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010015691 if test $py_cv_lib_readline = yes; then
15692 break
15693 fi
15694 done
15695
15696 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
15697 #AC_SUBST([READLINE_LIBS])
15698 if test $py_cv_lib_readline = no; then
Christian Heimes32eba612021-03-19 10:29:25 +010015699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15700$as_echo "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015701 else
Christian Heimes32eba612021-03-19 10:29:25 +010015702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15703$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015704
Christian Heimes32eba612021-03-19 10:29:25 +010015705$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015706
Roland Hiebere1f77692021-02-09 02:05:25 +010015707 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015708fi
15709
Roland Hiebere1f77692021-02-09 02:05:25 +010015710if test "$py_cv_lib_readline" = yes; then
15711 # check for readline 2.2
Christian Heimes32eba612021-03-19 10:29:25 +010015712 ac_fn_c_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
Roland Hiebere1f77692021-02-09 02:05:25 +010015713#include <stdio.h> /* Must be first for Gnu Readline */
15714#ifdef WITH_EDITLINE
15715# include <editline/readline.h>
15716#else
15717# include <readline/readline.h>
15718#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015719
Christian Heimes32eba612021-03-19 10:29:25 +010015720"
15721if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015722
Christian Heimes32eba612021-03-19 10:29:25 +010015723$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015724
15725fi
Christian Heimes32eba612021-03-19 10:29:25 +010015726
15727 ac_fn_c_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
Roland Hiebere1f77692021-02-09 02:05:25 +010015728#include <stdio.h> /* Must be first for Gnu Readline */
15729#ifdef WITH_EDITLINE
15730# include <editline/readline.h>
15731#else
15732# include <readline/readline.h>
15733#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000015734
Christian Heimes32eba612021-03-19 10:29:25 +010015735"
15736if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015737
Christian Heimes32eba612021-03-19 10:29:25 +010015738$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015739
15740fi
Antoine Pitroud5131772009-10-26 19:22:14 +000015741
Christian Heimes32eba612021-03-19 10:29:25 +010015742
Roland Hiebere1f77692021-02-09 02:05:25 +010015743 # check for readline 4.0
Christian Heimes32eba612021-03-19 10:29:25 +010015744 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
15745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
15746$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
15747if eval \${$as_ac_Lib+:} false; then :
15748 $as_echo_n "(cached) " >&6
15749else
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015751LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015755/* Override any GCC internal prototype to avoid an error.
15756 Use char because int might match the return type of a GCC
15757 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010015758#ifdef __cplusplus
15759extern "C"
15760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015761char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015762int
Christian Heimes32eba612021-03-19 10:29:25 +010015763main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ;
15767 return 0;
15768}
15769_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015770if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015771 eval "$as_ac_Lib=yes"
Christian Heimes32eba612021-03-19 10:29:25 +010015772else
Roland Hiebere1f77692021-02-09 02:05:25 +010015773 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015774fi
Christian Heimes32eba612021-03-19 10:29:25 +010015775rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015777LIBS=$ac_check_lib_save_LIBS
15778fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015779eval ac_res=\$$as_ac_Lib
Christian Heimes32eba612021-03-19 10:29:25 +010015780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15781$as_echo "$ac_res" >&6; }
15782if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015783
Christian Heimes32eba612021-03-19 10:29:25 +010015784$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015785
Martin v. Löwis0daad592001-09-30 21:09:59 +000015786fi
15787
Michael W. Hudson54241132001-12-07 15:38:26 +000015788
Roland Hiebere1f77692021-02-09 02:05:25 +010015789 # also in 4.0
Christian Heimes32eba612021-03-19 10:29:25 +010015790 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
15791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
15792$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
15793if eval \${$as_ac_Lib+:} false; then :
15794 $as_echo_n "(cached) " >&6
15795else
Thomas Wouters89d996e2007-09-08 17:39:28 +000015796 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015797LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015799/* end confdefs.h. */
15800
15801/* Override any GCC internal prototype to avoid an error.
15802 Use char because int might match the return type of a GCC
15803 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010015804#ifdef __cplusplus
15805extern "C"
15806#endif
Thomas Wouters89d996e2007-09-08 17:39:28 +000015807char rl_completion_display_matches_hook ();
15808int
Christian Heimes32eba612021-03-19 10:29:25 +010015809main ()
Thomas Wouters89d996e2007-09-08 17:39:28 +000015810{
15811return rl_completion_display_matches_hook ();
15812 ;
15813 return 0;
15814}
15815_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015816if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015817 eval "$as_ac_Lib=yes"
Christian Heimes32eba612021-03-19 10:29:25 +010015818else
Roland Hiebere1f77692021-02-09 02:05:25 +010015819 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015820fi
Christian Heimes32eba612021-03-19 10:29:25 +010015821rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015822 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015823LIBS=$ac_check_lib_save_LIBS
15824fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015825eval ac_res=\$$as_ac_Lib
Christian Heimes32eba612021-03-19 10:29:25 +010015826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15827$as_echo "$ac_res" >&6; }
15828if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015829
Christian Heimes32eba612021-03-19 10:29:25 +010015830$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015831
15832fi
15833
15834
Roland Hiebere1f77692021-02-09 02:05:25 +010015835 # also in 4.0, but not in editline
Christian Heimes32eba612021-03-19 10:29:25 +010015836 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
15837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
15838$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
15839if eval \${$as_ac_Lib+:} false; then :
15840 $as_echo_n "(cached) " >&6
15841else
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015842 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015843LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15845/* end confdefs.h. */
15846
15847/* Override any GCC internal prototype to avoid an error.
15848 Use char because int might match the return type of a GCC
15849 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010015850#ifdef __cplusplus
15851extern "C"
15852#endif
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015853char rl_resize_terminal ();
15854int
Christian Heimes32eba612021-03-19 10:29:25 +010015855main ()
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015856{
15857return rl_resize_terminal ();
15858 ;
15859 return 0;
15860}
15861_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015862if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015863 eval "$as_ac_Lib=yes"
Christian Heimes32eba612021-03-19 10:29:25 +010015864else
Roland Hiebere1f77692021-02-09 02:05:25 +010015865 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015866fi
Christian Heimes32eba612021-03-19 10:29:25 +010015867rm -f core conftest.err conftest.$ac_objext \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015868 conftest$ac_exeext conftest.$ac_ext
15869LIBS=$ac_check_lib_save_LIBS
15870fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015871eval ac_res=\$$as_ac_Lib
Christian Heimes32eba612021-03-19 10:29:25 +010015872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15873$as_echo "$ac_res" >&6; }
15874if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015875
Christian Heimes32eba612021-03-19 10:29:25 +010015876$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015877
15878fi
15879
15880
Roland Hiebere1f77692021-02-09 02:05:25 +010015881 # check for readline 4.2
Christian Heimes32eba612021-03-19 10:29:25 +010015882 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
15883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
15884$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
15885if eval \${$as_ac_Lib+:} false; then :
15886 $as_echo_n "(cached) " >&6
15887else
Martin v. Löwis11437992002-04-12 09:54:03 +000015888 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015889LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015893/* Override any GCC internal prototype to avoid an error.
15894 Use char because int might match the return type of a GCC
15895 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010015896#ifdef __cplusplus
15897extern "C"
15898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015899char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015900int
Christian Heimes32eba612021-03-19 10:29:25 +010015901main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 ;
15905 return 0;
15906}
15907_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015908if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015909 eval "$as_ac_Lib=yes"
Christian Heimes32eba612021-03-19 10:29:25 +010015910else
Roland Hiebere1f77692021-02-09 02:05:25 +010015911 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000015912fi
Christian Heimes32eba612021-03-19 10:29:25 +010015913rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015914 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015915LIBS=$ac_check_lib_save_LIBS
15916fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015917eval ac_res=\$$as_ac_Lib
Christian Heimes32eba612021-03-19 10:29:25 +010015918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15919$as_echo "$ac_res" >&6; }
15920if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015921
Christian Heimes32eba612021-03-19 10:29:25 +010015922$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015923
Guido van Rossum353ae582001-07-10 16:45:32 +000015924fi
15925
Jack Jansendd19cf82001-12-06 22:36:17 +000015926
Roland Hiebere1f77692021-02-09 02:05:25 +010015927 # also in readline 4.2
Christian Heimes32eba612021-03-19 10:29:25 +010015928 ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010015929#include <stdio.h> /* Must be first for Gnu Readline */
15930#ifdef WITH_EDITLINE
15931# include <editline/readline.h>
15932#else
15933# include <readline/readline.h>
15934#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015935
Christian Heimes32eba612021-03-19 10:29:25 +010015936"
15937if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015938
Christian Heimes32eba612021-03-19 10:29:25 +010015939$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015940
15941fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015942
Christian Heimes32eba612021-03-19 10:29:25 +010015943
15944 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
15945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
15946$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
15947if eval \${$as_ac_Lib+:} false; then :
15948 $as_echo_n "(cached) " >&6
15949else
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015950 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015951LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15953/* end confdefs.h. */
15954
15955/* Override any GCC internal prototype to avoid an error.
15956 Use char because int might match the return type of a GCC
15957 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010015958#ifdef __cplusplus
15959extern "C"
15960#endif
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015961char append_history ();
15962int
Christian Heimes32eba612021-03-19 10:29:25 +010015963main ()
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015964{
15965return append_history ();
15966 ;
15967 return 0;
15968}
15969_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010015970if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015971 eval "$as_ac_Lib=yes"
Christian Heimes32eba612021-03-19 10:29:25 +010015972else
Roland Hiebere1f77692021-02-09 02:05:25 +010015973 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015974fi
Christian Heimes32eba612021-03-19 10:29:25 +010015975rm -f core conftest.err conftest.$ac_objext \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015976 conftest$ac_exeext conftest.$ac_ext
15977LIBS=$ac_check_lib_save_LIBS
15978fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015979eval ac_res=\$$as_ac_Lib
Christian Heimes32eba612021-03-19 10:29:25 +010015980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15981$as_echo "$ac_res" >&6; }
15982if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015983
Christian Heimes32eba612021-03-19 10:29:25 +010015984$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015985
15986fi
15987
Roland Hiebere1f77692021-02-09 02:05:25 +010015988fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015989
Martin v. Löwis82bca632006-02-10 20:49:30 +000015990# End of readline checks: restore LIBS
15991LIBS=$LIBS_no_readline
15992
Christian Heimes32eba612021-03-19 10:29:25 +010015993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15994$as_echo_n "checking for broken nice()... " >&6; }
15995if ${ac_cv_broken_nice+:} false; then :
15996 $as_echo_n "(cached) " >&6
15997else
Martin v. Löwis11437992002-04-12 09:54:03 +000015998
Christian Heimes32eba612021-03-19 10:29:25 +010015999if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000016000 ac_cv_broken_nice=no
Christian Heimes32eba612021-03-19 10:29:25 +010016001else
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016003/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016004
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080016005#include <stdlib.h>
16006#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016007int main()
16008{
16009 int val1 = nice(1);
16010 if (val1 != -1 && val1 == nice(2))
16011 exit(0);
16012 exit(1);
16013}
16014
Martin v. Löwis11437992002-04-12 09:54:03 +000016015_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016016if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016017 ac_cv_broken_nice=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016018else
Matthias Kloseb9621712010-04-24 17:59:49 +000016019 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16022 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016023fi
16024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016025fi
16026
Christian Heimes32eba612021-03-19 10:29:25 +010016027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
16028$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016029if test "$ac_cv_broken_nice" = yes
16030then
Martin v. Löwis11437992002-04-12 09:54:03 +000016031
Christian Heimes32eba612021-03-19 10:29:25 +010016032$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016033
16034fi
16035
Christian Heimes32eba612021-03-19 10:29:25 +010016036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
16037$as_echo_n "checking for broken poll()... " >&6; }
16038if ${ac_cv_broken_poll+:} false; then :
16039 $as_echo_n "(cached) " >&6
16040else
16041 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016042 ac_cv_broken_poll=no
Christian Heimes32eba612021-03-19 10:29:25 +010016043else
Matthias Kloseb9621712010-04-24 17:59:49 +000016044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016045/* end confdefs.h. */
16046
16047#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016048#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016049
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016050int main()
16051{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016052 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016053 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016054
16055 close (42);
16056
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016057 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016058 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016059 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016060 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016061 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016062 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016063 return 1;
16064}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016065
16066_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016067if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016068 ac_cv_broken_poll=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016069else
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016076fi
16077
Christian Heimes32eba612021-03-19 10:29:25 +010016078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16079$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016080if test "$ac_cv_broken_poll" = yes
16081then
16082
Christian Heimes32eba612021-03-19 10:29:25 +010016083$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016084
16085fi
16086
Martin v. Löwis1d459062005-03-14 21:23:33 +000016087# check tzset(3) exists and works like we expect it to
Christian Heimes32eba612021-03-19 10:29:25 +010016088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16089$as_echo_n "checking for working tzset()... " >&6; }
16090if ${ac_cv_working_tzset+:} false; then :
16091 $as_echo_n "(cached) " >&6
16092else
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016093
Christian Heimes32eba612021-03-19 10:29:25 +010016094if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016095 ac_cv_working_tzset=no
Christian Heimes32eba612021-03-19 10:29:25 +010016096else
Matthias Kloseb9621712010-04-24 17:59:49 +000016097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016098/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016099
16100#include <stdlib.h>
16101#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016102#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016103
16104#if HAVE_TZNAME
16105extern char *tzname[];
16106#endif
16107
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016108int main()
16109{
Brett Cannon18367812003-09-19 00:59:16 +000016110 /* Note that we need to ensure that not only does tzset(3)
16111 do 'something' with localtime, but it works as documented
16112 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016113 This includes making sure that tzname is set properly if
16114 tm->tm_zone does not exist since it is the alternative way
16115 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016116
16117 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016118 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016119 */
16120
Martin v. Löwis1d459062005-03-14 21:23:33 +000016121 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016122 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16123
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016124 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016125 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016126 if (localtime(&groundhogday)->tm_hour != 0)
16127 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016128#if HAVE_TZNAME
16129 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16130 if (strcmp(tzname[0], "UTC") ||
16131 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16132 exit(1);
16133#endif
Brett Cannon18367812003-09-19 00:59:16 +000016134
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016135 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016136 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016137 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016138 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016139#if HAVE_TZNAME
16140 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16141 exit(1);
16142#endif
Brett Cannon18367812003-09-19 00:59:16 +000016143
16144 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16145 tzset();
16146 if (localtime(&groundhogday)->tm_hour != 11)
16147 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016148#if HAVE_TZNAME
16149 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16150 exit(1);
16151#endif
16152
16153#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016154 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16155 exit(1);
16156 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16157 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016158#endif
Brett Cannon18367812003-09-19 00:59:16 +000016159
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016160 exit(0);
16161}
16162
16163_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016164if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016165 ac_cv_working_tzset=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016166else
Matthias Kloseb9621712010-04-24 17:59:49 +000016167 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016171fi
16172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173fi
16174
Christian Heimes32eba612021-03-19 10:29:25 +010016175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16176$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016177if test "$ac_cv_working_tzset" = yes
16178then
16179
Christian Heimes32eba612021-03-19 10:29:25 +010016180$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016181
16182fi
16183
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016184# Look for subsecond timestamps in struct stat
Christian Heimes32eba612021-03-19 10:29:25 +010016185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16186$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
16187if ${ac_cv_stat_tv_nsec+:} false; then :
16188 $as_echo_n "(cached) " >&6
16189else
Matthias Kloseb9621712010-04-24 17:59:49 +000016190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016191/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016192#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016193int
Christian Heimes32eba612021-03-19 10:29:25 +010016194main ()
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016195{
16196
16197struct stat st;
16198st.st_mtim.tv_nsec = 1;
16199
16200 ;
16201 return 0;
16202}
16203_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016205 ac_cv_stat_tv_nsec=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016206else
Matthias Kloseb9621712010-04-24 17:59:49 +000016207 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016208fi
Christian Heimes32eba612021-03-19 10:29:25 +010016209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210fi
16211
Christian Heimes32eba612021-03-19 10:29:25 +010016212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16213$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016214if test "$ac_cv_stat_tv_nsec" = yes
16215then
16216
Christian Heimes32eba612021-03-19 10:29:25 +010016217$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016218
16219fi
16220
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016221# Look for BSD style subsecond timestamps in struct stat
Christian Heimes32eba612021-03-19 10:29:25 +010016222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16223$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
16224if ${ac_cv_stat_tv_nsec2+:} false; then :
16225 $as_echo_n "(cached) " >&6
16226else
Matthias Kloseb9621712010-04-24 17:59:49 +000016227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016228/* end confdefs.h. */
16229#include <sys/stat.h>
16230int
Christian Heimes32eba612021-03-19 10:29:25 +010016231main ()
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016232{
16233
16234struct stat st;
16235st.st_mtimespec.tv_nsec = 1;
16236
16237 ;
16238 return 0;
16239}
16240_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016242 ac_cv_stat_tv_nsec2=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016243else
Matthias Kloseb9621712010-04-24 17:59:49 +000016244 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016245fi
Christian Heimes32eba612021-03-19 10:29:25 +010016246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247fi
16248
Christian Heimes32eba612021-03-19 10:29:25 +010016249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16250$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016251if test "$ac_cv_stat_tv_nsec2" = yes
16252then
16253
Christian Heimes32eba612021-03-19 10:29:25 +010016254$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016255
16256fi
16257
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016258# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016259ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016260if test "$cross_compiling" = no; then
16261 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16262fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016263
Christian Heimes32eba612021-03-19 10:29:25 +010016264for ac_header in curses.h ncurses.h
16265do :
16266 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16267ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16268if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16269 cat >>confdefs.h <<_ACEOF
16270#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16271_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016272
16273fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016274
Christian Heimes32eba612021-03-19 10:29:25 +010016275done
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016276
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016277
16278# On Solaris, term.h requires curses.h
Christian Heimes32eba612021-03-19 10:29:25 +010016279for ac_header in term.h
16280do :
16281 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016282#ifdef HAVE_CURSES_H
16283#include <curses.h>
16284#endif
16285
16286"
Christian Heimes32eba612021-03-19 10:29:25 +010016287if test "x$ac_cv_header_term_h" = xyes; then :
16288 cat >>confdefs.h <<_ACEOF
16289#define HAVE_TERM_H 1
16290_ACEOF
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016291
16292fi
16293
Christian Heimes32eba612021-03-19 10:29:25 +010016294done
16295
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016296
Jack Jansen666b1e72001-10-31 12:11:48 +000016297# On HP/UX 11.0, mvwdelch is a block with a return statement
Christian Heimes32eba612021-03-19 10:29:25 +010016298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16299$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
16300if ${ac_cv_mvwdelch_is_expression+:} false; then :
16301 $as_echo_n "(cached) " >&6
16302else
Matthias Kloseb9621712010-04-24 17:59:49 +000016303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016304/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016305#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016306int
Christian Heimes32eba612021-03-19 10:29:25 +010016307main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016308{
Jack Jansen666b1e72001-10-31 12:11:48 +000016309
16310 int rtn;
16311 rtn = mvwdelch(0,0,0);
16312
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 ;
16314 return 0;
16315}
16316_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016317if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016318 ac_cv_mvwdelch_is_expression=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016319else
Matthias Kloseb9621712010-04-24 17:59:49 +000016320 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016321fi
Christian Heimes32eba612021-03-19 10:29:25 +010016322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016323fi
16324
Christian Heimes32eba612021-03-19 10:29:25 +010016325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16326$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016327
16328if test "$ac_cv_mvwdelch_is_expression" = yes
16329then
Martin v. Löwis11437992002-04-12 09:54:03 +000016330
Christian Heimes32eba612021-03-19 10:29:25 +010016331$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016332
16333fi
16334
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016335# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16336# structs since version 5.7. If the macro is defined as zero before including
16337# [n]curses.h, ncurses will expose fields of the structs regardless of the
16338# configuration.
Christian Heimes32eba612021-03-19 10:29:25 +010016339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16340$as_echo_n "checking whether WINDOW has _flags... " >&6; }
16341if ${ac_cv_window_has_flags+:} false; then :
16342 $as_echo_n "(cached) " >&6
16343else
Matthias Kloseb9621712010-04-24 17:59:49 +000016344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016345/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016346
16347 #define NCURSES_OPAQUE 0
16348 #include <curses.h>
16349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350int
Christian Heimes32eba612021-03-19 10:29:25 +010016351main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016352{
Jack Jansen666b1e72001-10-31 12:11:48 +000016353
16354 WINDOW *w;
16355 w->_flags = 0;
16356
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 ;
16358 return 0;
16359}
16360_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016361if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016362 ac_cv_window_has_flags=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016363else
Matthias Kloseb9621712010-04-24 17:59:49 +000016364 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016365fi
Christian Heimes32eba612021-03-19 10:29:25 +010016366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367fi
16368
Christian Heimes32eba612021-03-19 10:29:25 +010016369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16370$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016371
Jack Jansen666b1e72001-10-31 12:11:48 +000016372
16373if test "$ac_cv_window_has_flags" = yes
16374then
Martin v. Löwis11437992002-04-12 09:54:03 +000016375
Christian Heimes32eba612021-03-19 10:29:25 +010016376$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016377
16378fi
16379
Christian Heimes32eba612021-03-19 10:29:25 +010016380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16381$as_echo_n "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16383/* end confdefs.h. */
16384#include <curses.h>
16385int
Christian Heimes32eba612021-03-19 10:29:25 +010016386main ()
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016387{
16388
16389#ifndef is_pad
16390void *x=is_pad
16391#endif
16392
16393 ;
16394 return 0;
16395}
16396_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016397if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016398
Christian Heimes32eba612021-03-19 10:29:25 +010016399$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016400
Christian Heimes32eba612021-03-19 10:29:25 +010016401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16402$as_echo "yes" >&6; }
16403else
16404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16405$as_echo "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016406
16407fi
Christian Heimes32eba612021-03-19 10:29:25 +010016408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016409
Christian Heimes32eba612021-03-19 10:29:25 +010016410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16411$as_echo_n "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016413/* end confdefs.h. */
16414#include <curses.h>
16415int
Christian Heimes32eba612021-03-19 10:29:25 +010016416main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016417{
16418void *x=is_term_resized
16419 ;
16420 return 0;
16421}
16422_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016424
Christian Heimes32eba612021-03-19 10:29:25 +010016425$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016426
Christian Heimes32eba612021-03-19 10:29:25 +010016427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16428$as_echo "yes" >&6; }
16429else
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16431$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016432
16433fi
Christian Heimes32eba612021-03-19 10:29:25 +010016434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016435
Christian Heimes32eba612021-03-19 10:29:25 +010016436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16437$as_echo_n "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016439/* end confdefs.h. */
16440#include <curses.h>
16441int
Christian Heimes32eba612021-03-19 10:29:25 +010016442main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016443{
16444void *x=resize_term
16445 ;
16446 return 0;
16447}
16448_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016449if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016450
Christian Heimes32eba612021-03-19 10:29:25 +010016451$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016452
Christian Heimes32eba612021-03-19 10:29:25 +010016453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16454$as_echo "yes" >&6; }
16455else
16456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16457$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016458
16459fi
Christian Heimes32eba612021-03-19 10:29:25 +010016460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016461
Christian Heimes32eba612021-03-19 10:29:25 +010016462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16463$as_echo_n "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016465/* end confdefs.h. */
16466#include <curses.h>
16467int
Christian Heimes32eba612021-03-19 10:29:25 +010016468main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016469{
16470void *x=resizeterm
16471 ;
16472 return 0;
16473}
16474_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016475if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016476
Christian Heimes32eba612021-03-19 10:29:25 +010016477$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016478
Christian Heimes32eba612021-03-19 10:29:25 +010016479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16480$as_echo "yes" >&6; }
16481else
16482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16483$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016484
16485fi
Christian Heimes32eba612021-03-19 10:29:25 +010016486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016487
Christian Heimes32eba612021-03-19 10:29:25 +010016488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16489$as_echo_n "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16491/* end confdefs.h. */
16492#include <curses.h>
16493int
Christian Heimes32eba612021-03-19 10:29:25 +010016494main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016495{
16496
16497#ifndef immedok
16498void *x=immedok
16499#endif
16500
16501 ;
16502 return 0;
16503}
16504_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016505if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016506
Christian Heimes32eba612021-03-19 10:29:25 +010016507$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016508
Christian Heimes32eba612021-03-19 10:29:25 +010016509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16510$as_echo "yes" >&6; }
16511else
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16513$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016514
16515fi
Christian Heimes32eba612021-03-19 10:29:25 +010016516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016517
Christian Heimes32eba612021-03-19 10:29:25 +010016518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16519$as_echo_n "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16521/* end confdefs.h. */
16522#include <curses.h>
16523int
Christian Heimes32eba612021-03-19 10:29:25 +010016524main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016525{
16526
16527#ifndef syncok
16528void *x=syncok
16529#endif
16530
16531 ;
16532 return 0;
16533}
16534_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016535if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016536
Christian Heimes32eba612021-03-19 10:29:25 +010016537$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016538
Christian Heimes32eba612021-03-19 10:29:25 +010016539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16540$as_echo "yes" >&6; }
16541else
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16543$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016544
16545fi
Christian Heimes32eba612021-03-19 10:29:25 +010016546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016547
Christian Heimes32eba612021-03-19 10:29:25 +010016548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16549$as_echo_n "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16551/* end confdefs.h. */
16552#include <curses.h>
16553int
Christian Heimes32eba612021-03-19 10:29:25 +010016554main ()
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016555{
16556
16557#ifndef wchgat
16558void *x=wchgat
16559#endif
16560
16561 ;
16562 return 0;
16563}
16564_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016565if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016566
Christian Heimes32eba612021-03-19 10:29:25 +010016567$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016568
Christian Heimes32eba612021-03-19 10:29:25 +010016569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16570$as_echo "yes" >&6; }
16571else
16572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16573$as_echo "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016574
16575fi
Christian Heimes32eba612021-03-19 10:29:25 +010016576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016577
Christian Heimes32eba612021-03-19 10:29:25 +010016578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16579$as_echo_n "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16581/* end confdefs.h. */
16582#include <curses.h>
16583int
Christian Heimes32eba612021-03-19 10:29:25 +010016584main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016585{
16586
16587#ifndef filter
16588void *x=filter
16589#endif
16590
16591 ;
16592 return 0;
16593}
16594_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016595if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016596
Christian Heimes32eba612021-03-19 10:29:25 +010016597$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016598
Christian Heimes32eba612021-03-19 10:29:25 +010016599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16600$as_echo "yes" >&6; }
16601else
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16603$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016604
16605fi
Christian Heimes32eba612021-03-19 10:29:25 +010016606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016607
Christian Heimes32eba612021-03-19 10:29:25 +010016608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16609$as_echo_n "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16611/* end confdefs.h. */
16612#include <curses.h>
16613int
Christian Heimes32eba612021-03-19 10:29:25 +010016614main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016615{
16616
16617#ifndef has_key
16618void *x=has_key
16619#endif
16620
16621 ;
16622 return 0;
16623}
16624_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016625if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016626
Christian Heimes32eba612021-03-19 10:29:25 +010016627$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016628
Christian Heimes32eba612021-03-19 10:29:25 +010016629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16630$as_echo "yes" >&6; }
16631else
16632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16633$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016634
16635fi
Christian Heimes32eba612021-03-19 10:29:25 +010016636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016637
Christian Heimes32eba612021-03-19 10:29:25 +010016638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16639$as_echo_n "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16641/* end confdefs.h. */
16642#include <curses.h>
16643int
Christian Heimes32eba612021-03-19 10:29:25 +010016644main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016645{
16646
16647#ifndef typeahead
16648void *x=typeahead
16649#endif
16650
16651 ;
16652 return 0;
16653}
16654_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016655if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016656
Christian Heimes32eba612021-03-19 10:29:25 +010016657$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016658
Christian Heimes32eba612021-03-19 10:29:25 +010016659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16660$as_echo "yes" >&6; }
16661else
16662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16663$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016664
16665fi
Christian Heimes32eba612021-03-19 10:29:25 +010016666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016667
Christian Heimes32eba612021-03-19 10:29:25 +010016668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16669$as_echo_n "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16671/* end confdefs.h. */
16672#include <curses.h>
16673int
Christian Heimes32eba612021-03-19 10:29:25 +010016674main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016675{
16676
16677#ifndef use_env
16678void *x=use_env
16679#endif
16680
16681 ;
16682 return 0;
16683}
16684_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016685if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016686
Christian Heimes32eba612021-03-19 10:29:25 +010016687$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016688
Christian Heimes32eba612021-03-19 10:29:25 +010016689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16690$as_echo "yes" >&6; }
16691else
16692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16693$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016694
16695fi
Christian Heimes32eba612021-03-19 10:29:25 +010016696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016697# last curses configure check
16698CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699
Christian Heimes32eba612021-03-19 10:29:25 +010016700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16701$as_echo "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016702
16703if test "x$cross_compiling" = xyes; then
16704 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Christian Heimes32eba612021-03-19 10:29:25 +010016705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16706$as_echo_n "checking for /dev/ptmx... " >&6; }
16707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16708$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016709 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16710 fi
16711 if test "${ac_cv_file__dev_ptc+set}" != set; then
Christian Heimes32eba612021-03-19 10:29:25 +010016712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16713$as_echo_n "checking for /dev/ptc... " >&6; }
16714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16715$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016716 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16717 fi
16718fi
16719
Christian Heimes32eba612021-03-19 10:29:25 +010016720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16721$as_echo_n "checking for /dev/ptmx... " >&6; }
16722if ${ac_cv_file__dev_ptmx+:} false; then :
16723 $as_echo_n "(cached) " >&6
16724else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016725 test "$cross_compiling" = yes &&
16726 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16727if test -r "/dev/ptmx"; then
16728 ac_cv_file__dev_ptmx=yes
16729else
16730 ac_cv_file__dev_ptmx=no
16731fi
16732fi
Christian Heimes32eba612021-03-19 10:29:25 +010016733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16734$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16735if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016736
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016737fi
16738
16739if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016740
Christian Heimes32eba612021-03-19 10:29:25 +010016741$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016742
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016743fi
Christian Heimes32eba612021-03-19 10:29:25 +010016744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16745$as_echo_n "checking for /dev/ptc... " >&6; }
16746if ${ac_cv_file__dev_ptc+:} false; then :
16747 $as_echo_n "(cached) " >&6
16748else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016749 test "$cross_compiling" = yes &&
16750 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16751if test -r "/dev/ptc"; then
16752 ac_cv_file__dev_ptc=yes
16753else
16754 ac_cv_file__dev_ptc=no
16755fi
16756fi
Christian Heimes32eba612021-03-19 10:29:25 +010016757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16758$as_echo "$ac_cv_file__dev_ptc" >&6; }
16759if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016760
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016761fi
16762
16763if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016764
Christian Heimes32eba612021-03-19 10:29:25 +010016765$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016766
Neal Norwitz865400f2003-03-21 01:42:58 +000016767fi
16768
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016769if test $ac_sys_system = Darwin
16770then
16771 LIBS="$LIBS -framework CoreFoundation"
16772fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016773
Christian Heimes32eba612021-03-19 10:29:25 +010016774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16775$as_echo_n "checking for %zd printf() format support... " >&6; }
16776if ${ac_cv_have_size_t_format+:} false; then :
16777 $as_echo_n "(cached) " >&6
16778else
16779 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016780 ac_cv_have_size_t_format="cross -- assuming yes"
16781
Christian Heimes32eba612021-03-19 10:29:25 +010016782else
Matthias Kloseb9621712010-04-24 17:59:49 +000016783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016784/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016785
Thomas Wouters477c8d52006-05-27 19:21:47 +000016786#include <stdio.h>
16787#include <stddef.h>
16788#include <string.h>
16789
Christian Heimes2c181612007-12-17 20:04:13 +000016790#ifdef HAVE_SYS_TYPES_H
16791#include <sys/types.h>
16792#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016793
16794#ifdef HAVE_SSIZE_T
16795typedef ssize_t Py_ssize_t;
16796#elif SIZEOF_VOID_P == SIZEOF_LONG
16797typedef long Py_ssize_t;
16798#else
16799typedef int Py_ssize_t;
16800#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016801
Christian Heimes2c181612007-12-17 20:04:13 +000016802int main()
16803{
16804 char buffer[256];
16805
Thomas Wouters477c8d52006-05-27 19:21:47 +000016806 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16807 return 1;
16808
Thomas Wouters89f507f2006-12-13 04:49:30 +000016809 if (strcmp(buffer, "123"))
16810 return 1;
16811
16812 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16813 return 1;
16814
16815 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016816 return 1;
16817
16818 return 0;
16819}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016820
Thomas Wouters477c8d52006-05-27 19:21:47 +000016821_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016822if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016823 ac_cv_have_size_t_format=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016824else
Matthias Kloseb9621712010-04-24 17:59:49 +000016825 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016829fi
16830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016831fi
Christian Heimes32eba612021-03-19 10:29:25 +010016832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16833$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016834if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016835
Christian Heimes32eba612021-03-19 10:29:25 +010016836$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016837
16838fi
16839
Matthias Kloseb9621712010-04-24 17:59:49 +000016840ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016841#ifdef HAVE_SYS_TYPES_H
16842#include <sys/types.h>
16843#endif
16844#ifdef HAVE_SYS_SOCKET_H
16845#include <sys/socket.h>
16846#endif
16847
Matthias Kloseb9621712010-04-24 17:59:49 +000016848"
Christian Heimes32eba612021-03-19 10:29:25 +010016849if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016850
Christian Heimes32eba612021-03-19 10:29:25 +010016851else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016852
Christian Heimes32eba612021-03-19 10:29:25 +010016853$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016854
16855fi
16856
Michael W. Hudson54241132001-12-07 15:38:26 +000016857
Christian Heimes32eba612021-03-19 10:29:25 +010016858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16859$as_echo_n "checking for broken mbstowcs... " >&6; }
16860if ${ac_cv_broken_mbstowcs+:} false; then :
16861 $as_echo_n "(cached) " >&6
16862else
16863 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016864 ac_cv_broken_mbstowcs=no
Christian Heimes32eba612021-03-19 10:29:25 +010016865else
Matthias Kloseb9621712010-04-24 17:59:49 +000016866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016867/* end confdefs.h. */
16868
Stefan Krah19c21392012-11-22 23:47:32 +010016869#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016870#include<stdlib.h>
16871int main() {
16872 size_t len = -1;
16873 const char *str = "text";
16874 len = mbstowcs(NULL, str, 0);
16875 return (len != 4);
16876}
16877
16878_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016879if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016880 ac_cv_broken_mbstowcs=no
Christian Heimes32eba612021-03-19 10:29:25 +010016881else
Matthias Kloseb9621712010-04-24 17:59:49 +000016882 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016886fi
16887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016888fi
16889
Christian Heimes32eba612021-03-19 10:29:25 +010016890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16891$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016892if test "$ac_cv_broken_mbstowcs" = yes
16893then
16894
Christian Heimes32eba612021-03-19 10:29:25 +010016895$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016896
16897fi
16898
Antoine Pitroub52ec782009-01-25 16:34:23 +000016899# Check for --with-computed-gotos
Christian Heimes32eba612021-03-19 10:29:25 +010016900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16901$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016902
16903# Check whether --with-computed-gotos was given.
Christian Heimes32eba612021-03-19 10:29:25 +010016904if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016905 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016906if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016907then
16908
Christian Heimes32eba612021-03-19 10:29:25 +010016909$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016910
Christian Heimes32eba612021-03-19 10:29:25 +010016911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16912$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016913fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016914if test "$withval" = no
16915then
16916
Christian Heimes32eba612021-03-19 10:29:25 +010016917$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000016918
Christian Heimes32eba612021-03-19 10:29:25 +010016919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16920$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016921fi
16922
Christian Heimes32eba612021-03-19 10:29:25 +010016923else
16924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16925$as_echo "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000016926fi
16927
Antoine Pitroub52ec782009-01-25 16:34:23 +000016928
Christian Heimes32eba612021-03-19 10:29:25 +010016929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16930$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16931if ${ac_cv_computed_gotos+:} false; then :
16932 $as_echo_n "(cached) " >&6
16933else
16934 if test "$cross_compiling" = yes; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010016935 if test "${with_computed_gotos+set}" = set; then
16936 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16937 else
16938 ac_cv_computed_gotos=no
16939 fi
Christian Heimes32eba612021-03-19 10:29:25 +010016940else
Matthias Kloseb17289e2012-03-15 19:51:34 +010016941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16942/* end confdefs.h. */
16943
16944int main(int argc, char **argv)
16945{
16946 static void *targets[1] = { &&LABEL1 };
16947 goto LABEL2;
16948LABEL1:
16949 return 0;
16950LABEL2:
16951 goto *targets[0];
16952 return 1;
16953}
16954
16955_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010016956if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010016957 ac_cv_computed_gotos=yes
Christian Heimes32eba612021-03-19 10:29:25 +010016958else
Matthias Kloseb17289e2012-03-15 19:51:34 +010016959 ac_cv_computed_gotos=no
16960fi
16961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16962 conftest.$ac_objext conftest.beam conftest.$ac_ext
16963fi
16964
16965fi
16966
Christian Heimes32eba612021-03-19 10:29:25 +010016967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16968$as_echo "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010016969case "$ac_cv_computed_gotos" in yes*)
16970
Christian Heimes32eba612021-03-19 10:29:25 +010016971$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010016972
16973esac
16974
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016975case $ac_sys_system in
16976AIX*)
16977
Christian Heimes32eba612021-03-19 10:29:25 +010016978$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016979 ;;
16980esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016981
Michael W. Hudson54241132001-12-07 15:38:26 +000016982
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016983
16984
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016985for h in `(cd $srcdir;echo Python/thread_*.h)`
16986do
16987 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16988done
16989
Michael W. Hudson54241132001-12-07 15:38:26 +000016990
Ned Deily8d02f912020-06-25 10:46:44 -040016991SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Christian Heimes32eba612021-03-19 10:29:25 +010016992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16993$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016994for dir in $SRCDIRS; do
16995 if test ! -d $dir; then
16996 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016997 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016998done
Christian Heimes32eba612021-03-19 10:29:25 +010016999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
17000$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000017001
Stefan Krah1919b7e2012-03-21 18:25:23 +010017002# Availability of -O2:
Christian Heimes32eba612021-03-19 10:29:25 +010017003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
17004$as_echo_n "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017005saved_cflags="$CFLAGS"
17006CFLAGS="-O2"
17007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17008/* end confdefs.h. */
17009
17010int
Christian Heimes32eba612021-03-19 10:29:25 +010017011main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010017012{
17013
17014
17015 ;
17016 return 0;
17017}
17018_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017019if ac_fn_c_try_compile "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017020 have_O2=yes
Christian Heimes32eba612021-03-19 10:29:25 +010017021else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017022 have_O2=no
17023fi
Christian Heimes32eba612021-03-19 10:29:25 +010017024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
17026$as_echo "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017027CFLAGS="$saved_cflags"
17028
17029# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
17030# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Christian Heimes32eba612021-03-19 10:29:25 +010017031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
17032$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017033saved_cflags="$CFLAGS"
17034CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
17035if test "$have_O2" = no; then
17036 CFLAGS=""
17037fi
Christian Heimes32eba612021-03-19 10:29:25 +010017038if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017039 have_glibc_memmove_bug=undefined
Christian Heimes32eba612021-03-19 10:29:25 +010017040else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17042/* end confdefs.h. */
17043
17044#include <stdio.h>
17045#include <stdlib.h>
17046#include <string.h>
17047void foo(void *p, void *q) { memmove(p, q, 19); }
17048int main() {
17049 char a[32] = "123456789000000000";
17050 foo(&a[9], a);
17051 if (strcmp(a, "123456789123456789000000000") != 0)
17052 return 1;
17053 foo(a, &a[9]);
17054 if (strcmp(a, "123456789000000000") != 0)
17055 return 1;
17056 return 0;
17057}
17058
17059_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017060if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017061 have_glibc_memmove_bug=no
Christian Heimes32eba612021-03-19 10:29:25 +010017062else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017063 have_glibc_memmove_bug=yes
17064fi
17065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17066 conftest.$ac_objext conftest.beam conftest.$ac_ext
17067fi
17068
17069CFLAGS="$saved_cflags"
Christian Heimes32eba612021-03-19 10:29:25 +010017070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17071$as_echo "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017072if test "$have_glibc_memmove_bug" = yes; then
17073
Christian Heimes32eba612021-03-19 10:29:25 +010017074$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017075
17076fi
17077
17078if test "$have_gcc_asm_for_x87" = yes; then
17079 # Some versions of gcc miscompile inline asm:
17080 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17081 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17082 case $CC in
17083 *gcc*)
Christian Heimes32eba612021-03-19 10:29:25 +010017084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17085$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017086 saved_cflags="$CFLAGS"
17087 CFLAGS="-O2"
Christian Heimes32eba612021-03-19 10:29:25 +010017088 if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017089 have_ipa_pure_const_bug=undefined
Christian Heimes32eba612021-03-19 10:29:25 +010017090else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17092/* end confdefs.h. */
17093
17094 __attribute__((noinline)) int
17095 foo(int *p) {
17096 int r;
17097 asm ( "movl \$6, (%1)\n\t"
17098 "xorl %0, %0\n\t"
17099 : "=r" (r) : "r" (p) : "memory"
17100 );
17101 return r;
17102 }
17103 int main() {
17104 int p = 8;
17105 if ((foo(&p) ? : p) != 6)
17106 return 1;
17107 return 0;
17108 }
17109
17110_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017111if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017112 have_ipa_pure_const_bug=no
Christian Heimes32eba612021-03-19 10:29:25 +010017113else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017114 have_ipa_pure_const_bug=yes
17115fi
17116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17117 conftest.$ac_objext conftest.beam conftest.$ac_ext
17118fi
17119
17120 CFLAGS="$saved_cflags"
Christian Heimes32eba612021-03-19 10:29:25 +010017121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17122$as_echo "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017123 if test "$have_ipa_pure_const_bug" = yes; then
17124
Christian Heimes32eba612021-03-19 10:29:25 +010017125$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017126
17127 fi
17128 ;;
17129 esac
17130fi
17131
Victor Stinner4f5366e2015-01-09 02:13:19 +010017132# Check for stdatomic.h
Christian Heimes32eba612021-03-19 10:29:25 +010017133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17134$as_echo_n "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17136/* end confdefs.h. */
17137
17138
17139 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017140 atomic_int int_var;
17141 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017142 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017143 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17144 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17145 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017146 return 0;
17147 }
17148
17149
17150_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017151if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017152 have_stdatomic_h=yes
Christian Heimes32eba612021-03-19 10:29:25 +010017153else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017154 have_stdatomic_h=no
17155fi
Christian Heimes32eba612021-03-19 10:29:25 +010017156rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017157 conftest$ac_exeext conftest.$ac_ext
17158
Christian Heimes32eba612021-03-19 10:29:25 +010017159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17160$as_echo "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017161
17162if test "$have_stdatomic_h" = yes; then
17163
Christian Heimes32eba612021-03-19 10:29:25 +010017164$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017165
17166fi
17167
Victor Stinner52a327c2020-12-23 03:41:08 +010017168# Check for GCC >= 4.7 and clang __atomic builtin functions
Christian Heimes32eba612021-03-19 10:29:25 +010017169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17170$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17172/* end confdefs.h. */
17173
17174
Victor Stinner52a327c2020-12-23 03:41:08 +010017175 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017176 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017177 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17178 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017179 return 0;
17180 }
17181
17182
17183_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017184if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017185 have_builtin_atomic=yes
Christian Heimes32eba612021-03-19 10:29:25 +010017186else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017187 have_builtin_atomic=no
17188fi
Christian Heimes32eba612021-03-19 10:29:25 +010017189rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017190 conftest$ac_exeext conftest.$ac_ext
17191
Christian Heimes32eba612021-03-19 10:29:25 +010017192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17193$as_echo "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017194
17195if test "$have_builtin_atomic" = yes; then
17196
Christian Heimes32eba612021-03-19 10:29:25 +010017197$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017198
17199fi
17200
Ned Deily322f5ba2013-11-21 23:01:59 -080017201# ensurepip option
Christian Heimes32eba612021-03-19 10:29:25 +010017202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17203$as_echo_n "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017204
17205# Check whether --with-ensurepip was given.
Christian Heimes32eba612021-03-19 10:29:25 +010017206if test "${with_ensurepip+set}" = set; then :
Ned Deily322f5ba2013-11-21 23:01:59 -080017207 withval=$with_ensurepip;
Christian Heimes32eba612021-03-19 10:29:25 +010017208else
Ned Deily322f5ba2013-11-21 23:01:59 -080017209 with_ensurepip=upgrade
17210fi
17211
17212case $with_ensurepip in #(
17213 yes|upgrade) :
17214 ENSUREPIP=upgrade ;; #(
17215 install) :
17216 ENSUREPIP=install ;; #(
17217 no) :
17218 ENSUREPIP=no ;; #(
17219 *) :
17220 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17221esac
Christian Heimes32eba612021-03-19 10:29:25 +010017222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17223$as_echo "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017224
17225
Victor Stinner35a97c02015-03-08 02:59:09 +010017226# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Christian Heimes32eba612021-03-19 10:29:25 +010017227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17228$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17230/* end confdefs.h. */
17231
17232
17233 #include <dirent.h>
17234
17235 int main() {
17236 struct dirent entry;
17237 return entry.d_type == DT_UNKNOWN;
17238 }
17239
17240
17241_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017242if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner35a97c02015-03-08 02:59:09 +010017243 have_dirent_d_type=yes
Christian Heimes32eba612021-03-19 10:29:25 +010017244else
Victor Stinner35a97c02015-03-08 02:59:09 +010017245 have_dirent_d_type=no
17246fi
Christian Heimes32eba612021-03-19 10:29:25 +010017247rm -f core conftest.err conftest.$ac_objext \
Victor Stinner35a97c02015-03-08 02:59:09 +010017248 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +010017249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17250$as_echo "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017251
17252if test "$have_dirent_d_type" = yes; then
17253
Christian Heimes32eba612021-03-19 10:29:25 +010017254$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010017255
17256fi
17257
Victor Stinner9eb57c52015-03-19 22:21:49 +010017258# check if the Linux getrandom() syscall is available
Christian Heimes32eba612021-03-19 10:29:25 +010017259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17260$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17262/* end confdefs.h. */
17263
17264
Victor Stinner1b80b242016-04-12 22:34:58 +020017265 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017266 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017267 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017268
17269 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017270 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017271 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017272 const int flags = GRND_NONBLOCK;
17273 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017274 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017275 return 0;
17276 }
17277
17278
17279_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017280if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010017281 have_getrandom_syscall=yes
Christian Heimes32eba612021-03-19 10:29:25 +010017282else
Victor Stinner9eb57c52015-03-19 22:21:49 +010017283 have_getrandom_syscall=no
17284fi
Christian Heimes32eba612021-03-19 10:29:25 +010017285rm -f core conftest.err conftest.$ac_objext \
Victor Stinner9eb57c52015-03-19 22:21:49 +010017286 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +010017287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17288$as_echo "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017289
17290if test "$have_getrandom_syscall" = yes; then
17291
Christian Heimes32eba612021-03-19 10:29:25 +010017292$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010017293
17294fi
17295
Victor Stinner3abf44e2015-09-18 15:38:37 +020017296# check if the getrandom() function is available
17297# the test was written for the Solaris function of <sys/random.h>
Christian Heimes32eba612021-03-19 10:29:25 +010017298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17299$as_echo_n "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17301/* end confdefs.h. */
17302
17303
17304 #include <sys/random.h>
17305
17306 int main() {
17307 char buffer[1];
17308 const size_t buflen = sizeof(buffer);
17309 const int flags = 0;
17310 /* ignore the result, Python checks for ENOSYS at runtime */
17311 (void)getrandom(buffer, buflen, flags);
17312 return 0;
17313 }
17314
17315
17316_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017317if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020017318 have_getrandom=yes
Christian Heimes32eba612021-03-19 10:29:25 +010017319else
Victor Stinner3abf44e2015-09-18 15:38:37 +020017320 have_getrandom=no
17321fi
Christian Heimes32eba612021-03-19 10:29:25 +010017322rm -f core conftest.err conftest.$ac_objext \
Victor Stinner3abf44e2015-09-18 15:38:37 +020017323 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +010017324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17325$as_echo "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017326
17327if test "$have_getrandom" = yes; then
17328
Christian Heimes32eba612021-03-19 10:29:25 +010017329$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020017330
17331fi
17332
Neil Schemenauer5741c452019-02-08 10:48:46 -080017333# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17334# shm_* may only be available if linking against librt
17335save_LIBS="$LIBS"
17336save_includes_default="$ac_includes_default"
Christian Heimes32eba612021-03-19 10:29:25 +010017337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17338$as_echo_n "checking for library containing shm_open... " >&6; }
17339if ${ac_cv_search_shm_open+:} false; then :
17340 $as_echo_n "(cached) " >&6
17341else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017342 ac_func_search_save_LIBS=$LIBS
17343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17344/* end confdefs.h. */
17345
17346/* Override any GCC internal prototype to avoid an error.
17347 Use char because int might match the return type of a GCC
17348 builtin and then its argument prototype would still apply. */
Christian Heimes32eba612021-03-19 10:29:25 +010017349#ifdef __cplusplus
17350extern "C"
17351#endif
Neil Schemenauer5741c452019-02-08 10:48:46 -080017352char shm_open ();
17353int
Christian Heimes32eba612021-03-19 10:29:25 +010017354main ()
Neil Schemenauer5741c452019-02-08 10:48:46 -080017355{
17356return shm_open ();
17357 ;
17358 return 0;
17359}
17360_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017361for ac_lib in '' rt; do
Neil Schemenauer5741c452019-02-08 10:48:46 -080017362 if test -z "$ac_lib"; then
17363 ac_res="none required"
17364 else
17365 ac_res=-l$ac_lib
17366 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17367 fi
Christian Heimes32eba612021-03-19 10:29:25 +010017368 if ac_fn_c_try_link "$LINENO"; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017369 ac_cv_search_shm_open=$ac_res
17370fi
Christian Heimes32eba612021-03-19 10:29:25 +010017371rm -f core conftest.err conftest.$ac_objext \
Neil Schemenauer5741c452019-02-08 10:48:46 -080017372 conftest$ac_exeext
Christian Heimes32eba612021-03-19 10:29:25 +010017373 if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017374 break
17375fi
17376done
Christian Heimes32eba612021-03-19 10:29:25 +010017377if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017378
Christian Heimes32eba612021-03-19 10:29:25 +010017379else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017380 ac_cv_search_shm_open=no
17381fi
17382rm conftest.$ac_ext
17383LIBS=$ac_func_search_save_LIBS
17384fi
Christian Heimes32eba612021-03-19 10:29:25 +010017385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17386$as_echo "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080017387ac_res=$ac_cv_search_shm_open
Christian Heimes32eba612021-03-19 10:29:25 +010017388if test "$ac_res" != no; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017389 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17390
17391fi
17392
17393if test "$ac_cv_search_shm_open" = "-lrt"; then
17394
Christian Heimes32eba612021-03-19 10:29:25 +010017395$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080017396
17397fi
Christian Heimes32eba612021-03-19 10:29:25 +010017398for ac_header in sys/mman.h
17399do :
17400 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17401if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17402 cat >>confdefs.h <<_ACEOF
17403#define HAVE_SYS_MMAN_H 1
17404_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017405
17406fi
17407
Christian Heimes32eba612021-03-19 10:29:25 +010017408done
17409
Neil Schemenauer5741c452019-02-08 10:48:46 -080017410# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17411ac_includes_default="\
17412${ac_includes_default}
17413#ifndef __cplusplus
17414# ifdef HAVE_SYS_MMAN_H
17415# include <sys/mman.h>
17416# endif
17417#endif
17418"
Christian Heimes32eba612021-03-19 10:29:25 +010017419for ac_func in shm_open shm_unlink
17420do :
17421 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17422ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17423if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17424 cat >>confdefs.h <<_ACEOF
17425#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17426_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017427
17428fi
Christian Heimes32eba612021-03-19 10:29:25 +010017429done
Neil Schemenauer5741c452019-02-08 10:48:46 -080017430
17431# we don't want to link with librt always, restore LIBS
17432LIBS="$save_LIBS"
17433ac_includes_default="$save_includes_default"
17434
Christian Heimesff5be6e2018-01-20 13:19:21 +010017435# Check for usable OpenSSL
17436
17437 found=false
17438
17439# Check whether --with-openssl was given.
Christian Heimes32eba612021-03-19 10:29:25 +010017440if test "${with_openssl+set}" = set; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017441 withval=$with_openssl;
17442 case "$withval" in
17443 "" | y | ye | yes | n | no)
17444 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17445 ;;
17446 *) ssldirs="$withval"
17447 ;;
17448 esac
17449
Christian Heimes32eba612021-03-19 10:29:25 +010017450else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017451
17452 # if pkg-config is installed and openssl has installed a .pc file,
17453 # then use that information and don't search ssldirs
17454 if test -n "$ac_tool_prefix"; then
17455 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17456set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +010017457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17458$as_echo_n "checking for $ac_word... " >&6; }
17459if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17460 $as_echo_n "(cached) " >&6
17461else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017462 if test -n "$PKG_CONFIG"; then
17463 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17464else
17465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17466for as_dir in $PATH
17467do
17468 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +010017469 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017470 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +010017471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017472 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Christian Heimes32eba612021-03-19 10:29:25 +010017473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017474 break 2
17475 fi
17476done
17477 done
17478IFS=$as_save_IFS
17479
17480fi
17481fi
17482PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17483if test -n "$PKG_CONFIG"; then
Christian Heimes32eba612021-03-19 10:29:25 +010017484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17485$as_echo "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017486else
Christian Heimes32eba612021-03-19 10:29:25 +010017487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17488$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017489fi
17490
17491
17492fi
17493if test -z "$ac_cv_prog_PKG_CONFIG"; then
17494 ac_ct_PKG_CONFIG=$PKG_CONFIG
17495 # Extract the first word of "pkg-config", so it can be a program name with args.
17496set dummy pkg-config; ac_word=$2
Christian Heimes32eba612021-03-19 10:29:25 +010017497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17498$as_echo_n "checking for $ac_word... " >&6; }
17499if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17500 $as_echo_n "(cached) " >&6
17501else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017502 if test -n "$ac_ct_PKG_CONFIG"; then
17503 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17504else
17505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17506for as_dir in $PATH
17507do
17508 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +010017509 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017510 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes32eba612021-03-19 10:29:25 +010017511 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017512 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Christian Heimes32eba612021-03-19 10:29:25 +010017513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017514 break 2
17515 fi
17516done
17517 done
17518IFS=$as_save_IFS
17519
17520fi
17521fi
17522ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17523if test -n "$ac_ct_PKG_CONFIG"; then
Christian Heimes32eba612021-03-19 10:29:25 +010017524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17525$as_echo "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017526else
Christian Heimes32eba612021-03-19 10:29:25 +010017527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17528$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017529fi
17530
17531 if test "x$ac_ct_PKG_CONFIG" = x; then
17532 PKG_CONFIG=""
17533 else
17534 case $cross_compiling:$ac_tool_warned in
17535yes:)
Christian Heimes32eba612021-03-19 10:29:25 +010017536{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17537$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010017538ac_tool_warned=yes ;;
17539esac
17540 PKG_CONFIG=$ac_ct_PKG_CONFIG
17541 fi
17542else
17543 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17544fi
17545
17546 if test x"$PKG_CONFIG" != x""; then
17547 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17548 if test $? = 0; then
17549 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17550 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17551 found=true
17552 fi
17553 fi
17554
17555 # no such luck; use some default ssldirs
17556 if ! $found; then
17557 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17558 fi
17559
17560
17561fi
17562
17563
17564
17565 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17566 # an 'openssl' subdirectory
17567
17568 if ! $found; then
17569 OPENSSL_INCLUDES=
17570 for ssldir in $ssldirs; do
Christian Heimes32eba612021-03-19 10:29:25 +010017571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17572$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017573 if test -f "$ssldir/include/openssl/ssl.h"; then
17574 OPENSSL_INCLUDES="-I$ssldir/include"
17575 OPENSSL_LDFLAGS="-L$ssldir/lib"
17576 OPENSSL_LIBS="-lssl -lcrypto"
17577 found=true
Christian Heimes32eba612021-03-19 10:29:25 +010017578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17579$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017580 break
17581 else
Christian Heimes32eba612021-03-19 10:29:25 +010017582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17583$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017584 fi
17585 done
17586
17587 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17588 # it will just work!
17589 fi
17590
17591 # try the preprocessor and linker with our new flags,
17592 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17593
Christian Heimes32eba612021-03-19 10:29:25 +010017594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17595$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017596 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17597 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17598
17599 save_LIBS="$LIBS"
17600 save_LDFLAGS="$LDFLAGS"
17601 save_CPPFLAGS="$CPPFLAGS"
17602 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17603 LIBS="$OPENSSL_LIBS $LIBS"
17604 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17606/* end confdefs.h. */
17607#include <openssl/ssl.h>
17608int
Christian Heimes32eba612021-03-19 10:29:25 +010017609main ()
Christian Heimesff5be6e2018-01-20 13:19:21 +010017610{
17611SSL_new(NULL)
17612 ;
17613 return 0;
17614}
17615_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017616if ac_fn_c_try_link "$LINENO"; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017617
Christian Heimes32eba612021-03-19 10:29:25 +010017618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17619$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017620 have_openssl=yes
17621
Christian Heimes32eba612021-03-19 10:29:25 +010017622else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017623
Christian Heimes32eba612021-03-19 10:29:25 +010017624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17625$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017626 have_openssl=no
17627
17628fi
Christian Heimes32eba612021-03-19 10:29:25 +010017629rm -f core conftest.err conftest.$ac_objext \
Christian Heimesff5be6e2018-01-20 13:19:21 +010017630 conftest$ac_exeext conftest.$ac_ext
17631 CPPFLAGS="$save_CPPFLAGS"
17632 LDFLAGS="$save_LDFLAGS"
17633 LIBS="$save_LIBS"
17634
17635
17636
17637
17638
17639
17640if test "$have_openssl" = yes; then
Christian Heimes32eba612021-03-19 10:29:25 +010017641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17642$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017643
17644 save_LIBS="$LIBS"
17645 save_LDFLAGS="$LDFLAGS"
17646 save_CPPFLAGS="$CPPFLAGS"
17647 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17648 LIBS="$OPENSSL_LIBS $LIBS"
17649 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17650
17651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17652/* end confdefs.h. */
17653
17654 #include <openssl/x509_vfy.h>
17655
17656int
Christian Heimes32eba612021-03-19 10:29:25 +010017657main ()
Christian Heimesff5be6e2018-01-20 13:19:21 +010017658{
17659
17660 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17661 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17662 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17663 X509_VERIFY_PARAM_set_hostflags(p, 0);
17664
17665 ;
17666 return 0;
17667}
17668
17669_ACEOF
Christian Heimes32eba612021-03-19 10:29:25 +010017670if ac_fn_c_try_link "$LINENO"; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017671
17672 ac_cv_has_x509_verify_param_set1_host=yes
17673
Christian Heimes32eba612021-03-19 10:29:25 +010017674else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017675
17676 ac_cv_has_x509_verify_param_set1_host=no
17677
17678fi
Christian Heimes32eba612021-03-19 10:29:25 +010017679rm -f core conftest.err conftest.$ac_objext \
Christian Heimesff5be6e2018-01-20 13:19:21 +010017680 conftest$ac_exeext conftest.$ac_ext
Christian Heimes32eba612021-03-19 10:29:25 +010017681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17682$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017683 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17684
Christian Heimes32eba612021-03-19 10:29:25 +010017685$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
Christian Heimesff5be6e2018-01-20 13:19:21 +010017686
17687 fi
17688
17689 CPPFLAGS="$save_CPPFLAGS"
17690 LDFLAGS="$save_LDFLAGS"
17691 LIBS="$save_LIBS"
17692fi
17693
Christian Heimes32eba612021-03-19 10:29:25 +010017694# rpath to libssl and libcrypto
17695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
17696$as_echo_n "checking for --with-openssl-rpath... " >&6; }
17697
17698# Check whether --with-openssl-rpath was given.
17699if test "${with_openssl_rpath+set}" = set; then :
17700 withval=$with_openssl_rpath;
17701else
17702 with_openssl_rpath=no
17703
17704fi
17705
17706case $with_openssl_rpath in #(
17707 auto|yes) :
17708 OPENSSL_RPATH=auto ;; #(
17709 no) :
17710 OPENSSL_RPATH= ;; #(
17711 *) :
17712 if test -d "$with_openssl_rpath"; then :
17713 OPENSSL_RPATH="$with_openssl_rpath"
17714else
17715 as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
17716fi
17717
17718 ;;
17719esac
17720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5
17721$as_echo "$OPENSSL_RPATH" >&6; }
17722
17723
Christian Heimes892d66e2018-01-29 14:10:18 +010017724# ssl module default cipher suite string
17725
17726
17727
Christian Heimes32eba612021-03-19 10:29:25 +010017728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17729$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017730
17731# Check whether --with-ssl-default-suites was given.
Christian Heimes32eba612021-03-19 10:29:25 +010017732if test "${with_ssl_default_suites+set}" = set; then :
Christian Heimes892d66e2018-01-29 14:10:18 +010017733 withval=$with_ssl_default_suites;
Christian Heimes32eba612021-03-19 10:29:25 +010017734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17735$as_echo "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017736case "$withval" in
17737 python)
Christian Heimes32eba612021-03-19 10:29:25 +010017738 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017739
17740 ;;
17741 openssl)
Christian Heimes32eba612021-03-19 10:29:25 +010017742 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017743
17744 ;;
17745 *)
Christian Heimes32eba612021-03-19 10:29:25 +010017746 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017747
Christian Heimes32eba612021-03-19 10:29:25 +010017748 cat >>confdefs.h <<_ACEOF
17749#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17750_ACEOF
Christian Heimes892d66e2018-01-29 14:10:18 +010017751
17752 ;;
17753esac
17754
Christian Heimes32eba612021-03-19 10:29:25 +010017755else
Christian Heimes892d66e2018-01-29 14:10:18 +010017756
Christian Heimes32eba612021-03-19 10:29:25 +010017757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17758$as_echo "python" >&6; }
17759$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017760
17761
17762fi
17763
17764
Christian Heimes9b60e552020-05-15 23:54:53 +020017765# builtin hash modules
17766default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17767
Christian Heimes32eba612021-03-19 10:29:25 +010017768$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020017769
Christian Heimes32eba612021-03-19 10:29:25 +010017770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17771$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020017772
17773# Check whether --with-builtin-hashlib-hashes was given.
Christian Heimes32eba612021-03-19 10:29:25 +010017774if test "${with_builtin_hashlib_hashes+set}" = set; then :
Christian Heimes9b60e552020-05-15 23:54:53 +020017775 withval=$with_builtin_hashlib_hashes;
17776case "$withval" in
17777 yes)
17778 withval=$default_hashlib_hashes
17779 ;;
17780 no)
17781 withval=""
17782 ;;
17783esac
Christian Heimes32eba612021-03-19 10:29:25 +010017784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17785$as_echo "$withval" >&6; }
17786cat >>confdefs.h <<_ACEOF
17787#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17788_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017789
17790
Christian Heimes32eba612021-03-19 10:29:25 +010017791else
Christian Heimes9b60e552020-05-15 23:54:53 +020017792
Christian Heimes32eba612021-03-19 10:29:25 +010017793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17794$as_echo "$default_hashlib_hashes" >&6; };
17795cat >>confdefs.h <<_ACEOF
17796#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17797_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017798
17799
17800fi
17801
17802
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017803# --with-experimental-isolated-subinterpreters
17804
Christian Heimes32eba612021-03-19 10:29:25 +010017805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17806$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017807
17808# Check whether --with-experimental-isolated-subinterpreters was given.
Christian Heimes32eba612021-03-19 10:29:25 +010017809if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017810 withval=$with_experimental_isolated_subinterpreters;
17811if test "$withval" != no
17812then
Christian Heimes32eba612021-03-19 10:29:25 +010017813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17814$as_echo "yes" >&6; };
17815 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017816
17817else
Christian Heimes32eba612021-03-19 10:29:25 +010017818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17819$as_echo "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017820fi
Christian Heimes32eba612021-03-19 10:29:25 +010017821else
17822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17823$as_echo "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017824fi
17825
17826
Victor Stinner801bb0b2021-02-17 11:14:42 +010017827# --with-static-libpython
17828STATIC_LIBPYTHON=1
Christian Heimes32eba612021-03-19 10:29:25 +010017829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
17830$as_echo_n "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017831
17832# Check whether --with-static-libpython was given.
Christian Heimes32eba612021-03-19 10:29:25 +010017833if test "${with_static_libpython+set}" = set; then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010017834 withval=$with_static_libpython;
17835if test "$withval" = no
17836then
Christian Heimes32eba612021-03-19 10:29:25 +010017837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17838$as_echo "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017839 STATIC_LIBPYTHON=0
17840else
Christian Heimes32eba612021-03-19 10:29:25 +010017841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17842$as_echo "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017843fi
Christian Heimes32eba612021-03-19 10:29:25 +010017844else
17845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17846$as_echo "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017847fi
17848
17849LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050017850if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010017851 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
17852 if test "$STATIC_LIBPYTHON" = 1; then
17853 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17854 fi
17855else
17856 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17857fi
17858
17859
17860
pxinwr277ce302020-12-30 20:50:39 +080017861# Check whether to disable test modules. Once set, setup.py will not build
17862# test extension modules and "make install" will not install test suites.
Christian Heimes32eba612021-03-19 10:29:25 +010017863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17864$as_echo_n "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017865# Check whether --enable-test-modules was given.
Christian Heimes32eba612021-03-19 10:29:25 +010017866if test "${enable_test_modules+set}" = set; then :
pxinwr277ce302020-12-30 20:50:39 +080017867 enableval=$enable_test_modules;
17868fi
17869
17870if test "$enable_test_modules" = no; then
17871 TEST_MODULES=no
Christian Heimes32eba612021-03-19 10:29:25 +010017872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17873$as_echo "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017874else
17875 TEST_MODULES=yes
Christian Heimes32eba612021-03-19 10:29:25 +010017876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17877$as_echo "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017878fi
17879
17880
Christian Heimes892d66e2018-01-29 14:10:18 +010017881
Guido van Rossum627b2d71993-12-24 10:39:16 +000017882# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017883ac_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 +000017884
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017885ac_config_files="$ac_config_files Modules/ld_so_aix"
17886
Martin v. Löwis11437992002-04-12 09:54:03 +000017887cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017888# This file is a shell script that caches the results of configure
17889# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017890# scripts and configure runs, see configure's option --config-cache.
17891# It is not useful on other systems. If it contains results you don't
17892# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017893#
Martin v. Löwis11437992002-04-12 09:54:03 +000017894# config.status only pays attention to the cache file if you give it
17895# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017896#
Skip Montanaro6dead952003-09-25 14:50:04 +000017897# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017898# loading this file, other *unset* `ac_cv_foo' will be assigned the
17899# following values.
17900
17901_ACEOF
17902
Guido van Rossumf78abae1997-01-21 22:02:36 +000017903# The following way of writing the cache mishandles newlines in values,
17904# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017906# Ultrix sh set writes to stderr and can't be redirected directly,
17907# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908(
17909 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17910 eval ac_val=\$$ac_var
17911 case $ac_val in #(
17912 *${as_nl}*)
17913 case $ac_var in #(
Christian Heimes32eba612021-03-19 10:29:25 +010017914 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17915$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017916 esac
17917 case $ac_var in #(
17918 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017919 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17920 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921 esac ;;
17922 esac
17923 done
17924
Martin v. Löwis11437992002-04-12 09:54:03 +000017925 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17927 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017928 # `set' does not quote correctly, so add quotes: double-quote
17929 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017930 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017931 "s/'/'\\\\''/g;
17932 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017934 *)
17935 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017936 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017937 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017938 esac |
17939 sort
17940) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017941 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017943 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017944 :clear
Christian Heimes32eba612021-03-19 10:29:25 +010017945 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17948 :end' >>confcache
17949if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17950 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017951 if test "x$cache_file" != "x/dev/null"; then
Christian Heimes32eba612021-03-19 10:29:25 +010017952 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17953$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017954 if test ! -f "$cache_file" || test -h "$cache_file"; then
17955 cat confcache >"$cache_file"
17956 else
17957 case $cache_file in #(
17958 */* | ?:*)
17959 mv -f confcache "$cache_file"$$ &&
17960 mv -f "$cache_file"$$ "$cache_file" ;; #(
17961 *)
17962 mv -f confcache "$cache_file" ;;
17963 esac
17964 fi
17965 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017966 else
Christian Heimes32eba612021-03-19 10:29:25 +010017967 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17968$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017969 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017970fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017971rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017972
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017973test "x$prefix" = xNONE && prefix=$ac_default_prefix
17974# Let make expand exec_prefix.
17975test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017976
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017977DEFS=-DHAVE_CONFIG_H
17978
Skip Montanaro6dead952003-09-25 14:50:04 +000017979ac_libobjs=
17980ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017981U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017982for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17983 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Christian Heimes32eba612021-03-19 10:29:25 +010017985 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17987 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017988 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17989 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017990done
17991LIBOBJS=$ac_libobjs
17992
17993LTLIBOBJS=$ac_ltlibobjs
17994
17995
Martin v. Löwis11437992002-04-12 09:54:03 +000017996
Matthias Kloseb9621712010-04-24 17:59:49 +000017997
Victor Stinnere0be4232011-10-25 13:06:09 +020017998: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017999ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000018000ac_clean_files_save=$ac_clean_files
18001ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Christian Heimes32eba612021-03-19 10:29:25 +010018002{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18003$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000018004as_write_fail=0
18005cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018006#! $SHELL
18007# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018008# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018009# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018010# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018011
Martin v. Löwis11437992002-04-12 09:54:03 +000018012debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018013ac_cs_recheck=false
18014ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000018015
Matthias Kloseb9621712010-04-24 17:59:49 +000018016SHELL=\${CONFIG_SHELL-$SHELL}
18017export SHELL
18018_ASEOF
18019cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18020## -------------------- ##
18021## M4sh Initialization. ##
18022## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024# Be more Bourne compatible
18025DUALCASE=1; export DUALCASE # for MKS sh
Christian Heimes32eba612021-03-19 10:29:25 +010018026if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 emulate sh
18028 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000018029 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000018030 # is contrary to our usage. Disable this feature.
18031 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032 setopt NO_GLOB_SUBST
Christian Heimes32eba612021-03-19 10:29:25 +010018033else
Matthias Kloseb9621712010-04-24 17:59:49 +000018034 case `(set -o) 2>/dev/null` in #(
18035 *posix*) :
18036 set -o posix ;; #(
18037 *) :
18038 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039esac
Michael W. Hudson54241132001-12-07 15:38:26 +000018040fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000018041
18042
Matthias Kloseb9621712010-04-24 17:59:49 +000018043as_nl='
18044'
18045export as_nl
Christian Heimes32eba612021-03-19 10:29:25 +010018046# Printing a long string crashes Solaris 7 /usr/bin/printf.
18047as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18048as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18049as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18050# Prefer a ksh shell builtin over an external printf program on Solaris,
18051# but without wasting forks for bash or zsh.
18052if test -z "$BASH_VERSION$ZSH_VERSION" \
18053 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18054 as_echo='print -r --'
18055 as_echo_n='print -rn --'
18056elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18057 as_echo='printf %s\n'
18058 as_echo_n='printf %s'
18059else
18060 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18061 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18062 as_echo_n='/usr/ucb/echo -n'
18063 else
18064 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18065 as_echo_n_body='eval
18066 arg=$1;
18067 case $arg in #(
18068 *"$as_nl"*)
18069 expr "X$arg" : "X\\(.*\\)$as_nl";
18070 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18071 esac;
18072 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18073 '
18074 export as_echo_n_body
18075 as_echo_n='sh -c $as_echo_n_body as_echo'
18076 fi
18077 export as_echo_body
18078 as_echo='sh -c $as_echo_body as_echo'
18079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018080
18081# The user is always right.
Christian Heimes32eba612021-03-19 10:29:25 +010018082if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018083 PATH_SEPARATOR=:
18084 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18085 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18086 PATH_SEPARATOR=';'
18087 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018090
Christian Heimes32eba612021-03-19 10:29:25 +010018091# IFS
18092# We need space, tab and new line, in precisely that order. Quoting is
18093# there to prevent editors from complaining about space-tab.
18094# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18095# splitting by setting IFS to empty value.)
18096IFS=" "" $as_nl"
18097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020018099as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000018100case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101 *[\\/]* ) as_myself=$0 ;;
18102 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018103for as_dir in $PATH
18104do
18105 IFS=$as_save_IFS
Christian Heimes32eba612021-03-19 10:29:25 +010018106 test -z "$as_dir" && as_dir=.
18107 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000018108 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111 ;;
18112esac
18113# We did not find ourselves, most probably we were run as `sh COMMAND'
18114# in which case we are not to be found in the path.
18115if test "x$as_myself" = x; then
18116 as_myself=$0
18117fi
18118if test ! -f "$as_myself"; then
Christian Heimes32eba612021-03-19 10:29:25 +010018119 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018120 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121fi
18122
Christian Heimes32eba612021-03-19 10:29:25 +010018123# Unset variables that we do not need and which cause bugs (e.g. in
18124# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18125# suppresses any "Segmentation fault" message there. '((' could
18126# trigger a bug in pdksh 5.2.14.
18127for as_var in BASH_ENV ENV MAIL MAILPATH
18128do eval test x\${$as_var+set} = xset \
18129 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18130done
18131PS1='$ '
18132PS2='> '
18133PS4='+ '
18134
18135# NLS nuisances.
18136LC_ALL=C
18137export LC_ALL
18138LANGUAGE=C
18139export LANGUAGE
18140
18141# CDPATH.
18142(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Matthias Kloseb9621712010-04-24 17:59:49 +000018143
18144
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018145# as_fn_error STATUS ERROR [LINENO LOG_FD]
18146# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018147# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18148# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018149# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018150as_fn_error ()
18151{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018152 as_status=$1; test $as_status -eq 0 && as_status=1
18153 if test "$4"; then
18154 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes32eba612021-03-19 10:29:25 +010018155 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018156 fi
Christian Heimes32eba612021-03-19 10:29:25 +010018157 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018158 as_fn_exit $as_status
18159} # as_fn_error
18160
18161
18162# as_fn_set_status STATUS
18163# -----------------------
18164# Set $? to STATUS, without forking.
18165as_fn_set_status ()
18166{
18167 return $1
18168} # as_fn_set_status
18169
18170# as_fn_exit STATUS
18171# -----------------
18172# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18173as_fn_exit ()
18174{
18175 set +e
18176 as_fn_set_status $1
18177 exit $1
18178} # as_fn_exit
18179
18180# as_fn_unset VAR
18181# ---------------
18182# Portably unset VAR.
18183as_fn_unset ()
18184{
18185 { eval $1=; unset $1;}
18186}
18187as_unset=as_fn_unset
18188# as_fn_append VAR VALUE
18189# ----------------------
18190# Append the text in VALUE to the end of the definition contained in VAR. Take
18191# advantage of any shell optimizations that allow amortized linear growth over
18192# repeated appends, instead of the typical quadratic growth present in naive
18193# implementations.
Christian Heimes32eba612021-03-19 10:29:25 +010018194if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018195 eval 'as_fn_append ()
18196 {
18197 eval $1+=\$2
18198 }'
Christian Heimes32eba612021-03-19 10:29:25 +010018199else
Matthias Kloseb9621712010-04-24 17:59:49 +000018200 as_fn_append ()
18201 {
18202 eval $1=\$$1\$2
18203 }
18204fi # as_fn_append
18205
18206# as_fn_arith ARG...
18207# ------------------
18208# Perform arithmetic evaluation on the ARGs, and store the result in the
18209# global $as_val. Take advantage of shells that can avoid forks. The arguments
18210# must be portable across $(()) and expr.
Christian Heimes32eba612021-03-19 10:29:25 +010018211if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018212 eval 'as_fn_arith ()
18213 {
18214 as_val=$(( $* ))
18215 }'
Christian Heimes32eba612021-03-19 10:29:25 +010018216else
Matthias Kloseb9621712010-04-24 17:59:49 +000018217 as_fn_arith ()
18218 {
18219 as_val=`expr "$@" || test $? -eq 1`
18220 }
18221fi # as_fn_arith
18222
18223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224if expr a : '\(a\)' >/dev/null 2>&1 &&
18225 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18226 as_expr=expr
18227else
18228 as_expr=false
18229fi
18230
18231if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18232 as_basename=basename
18233else
18234 as_basename=false
18235fi
18236
Matthias Kloseb9621712010-04-24 17:59:49 +000018237if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18238 as_dirname=dirname
18239else
18240 as_dirname=false
18241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243as_me=`$as_basename -- "$0" ||
18244$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18245 X"$0" : 'X\(//\)$' \| \
18246 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes32eba612021-03-19 10:29:25 +010018247$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018248 sed '/^.*\/\([^/][^/]*\)\/*$/{
18249 s//\1/
18250 q
18251 }
18252 /^X\/\(\/\/\)$/{
18253 s//\1/
18254 q
18255 }
18256 /^X\/\(\/\).*/{
18257 s//\1/
18258 q
18259 }
18260 s/.*/./; q'`
18261
Matthias Kloseb9621712010-04-24 17:59:49 +000018262# Avoid depending upon Character Ranges.
18263as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18264as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18265as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18266as_cr_digits='0123456789'
18267as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018268
18269ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018270case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018271-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018272 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018274 xy) ECHO_C='\c';;
18275 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18276 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018277 esac;;
18278*)
18279 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018281
Martin v. Löwis11437992002-04-12 09:54:03 +000018282rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018283if test -d conf$$.dir; then
18284 rm -f conf$$.dir/conf$$.file
18285else
18286 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018287 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018289if (echo >conf$$.file) 2>/dev/null; then
18290 if ln -s conf$$.file conf$$ 2>/dev/null; then
18291 as_ln_s='ln -s'
18292 # ... but there are two gotchas:
18293 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18294 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018295 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018296 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018297 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018298 elif ln conf$$.file conf$$ 2>/dev/null; then
18299 as_ln_s=ln
18300 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018301 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018303else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018304 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018306rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18307rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018308
Matthias Kloseb9621712010-04-24 17:59:49 +000018309
18310# as_fn_mkdir_p
18311# -------------
18312# Create "$as_dir" as a directory, including parents if necessary.
18313as_fn_mkdir_p ()
18314{
18315
18316 case $as_dir in #(
18317 -*) as_dir=./$as_dir;;
18318 esac
18319 test -d "$as_dir" || eval $as_mkdir_p || {
18320 as_dirs=
18321 while :; do
18322 case $as_dir in #(
Christian Heimes32eba612021-03-19 10:29:25 +010018323 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000018324 *) as_qdir=$as_dir;;
18325 esac
18326 as_dirs="'$as_qdir' $as_dirs"
18327 as_dir=`$as_dirname -- "$as_dir" ||
18328$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18329 X"$as_dir" : 'X\(//\)[^/]' \| \
18330 X"$as_dir" : 'X\(//\)$' \| \
18331 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes32eba612021-03-19 10:29:25 +010018332$as_echo X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18334 s//\1/
18335 q
18336 }
18337 /^X\(\/\/\)[^/].*/{
18338 s//\1/
18339 q
18340 }
18341 /^X\(\/\/\)$/{
18342 s//\1/
18343 q
18344 }
18345 /^X\(\/\).*/{
18346 s//\1/
18347 q
18348 }
18349 s/.*/./; q'`
18350 test -d "$as_dir" && break
18351 done
18352 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018353 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018354
18355
18356} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018357if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018358 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018359else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018360 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018361 as_mkdir_p=false
18362fi
18363
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018364
18365# as_fn_executable_p FILE
18366# -----------------------
18367# Test if FILE is an executable regular file.
18368as_fn_executable_p ()
18369{
18370 test -f "$1" && test -x "$1"
18371} # as_fn_executable_p
18372as_test_x='test -x'
18373as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018374
18375# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018376as_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 +000018377
18378# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018379as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018380
18381
Martin v. Löwis11437992002-04-12 09:54:03 +000018382exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018383## ----------------------------------- ##
18384## Main body of $CONFIG_STATUS script. ##
18385## ----------------------------------- ##
18386_ASEOF
18387test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018388
Matthias Kloseb9621712010-04-24 17:59:49 +000018389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18390# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018391# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392# values after options handling.
18393ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018394This file was extended by python $as_me 3.10, which was
Christian Heimes32eba612021-03-19 10:29:25 +010018395generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018396
18397 CONFIG_FILES = $CONFIG_FILES
18398 CONFIG_HEADERS = $CONFIG_HEADERS
18399 CONFIG_LINKS = $CONFIG_LINKS
18400 CONFIG_COMMANDS = $CONFIG_COMMANDS
18401 $ $0 $@
18402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018403on `(hostname || uname -n) 2>/dev/null | sed 1q`
18404"
18405
Martin v. Löwis11437992002-04-12 09:54:03 +000018406_ACEOF
18407
Matthias Kloseb9621712010-04-24 17:59:49 +000018408case $ac_config_files in *"
18409"*) set x $ac_config_files; shift; ac_config_files=$*;;
18410esac
18411
18412case $ac_config_headers in *"
18413"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18414esac
18415
18416
18417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018418# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018419config_files="$ac_config_files"
18420config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018422_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018423
Matthias Kloseb9621712010-04-24 17:59:49 +000018424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018425ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018426\`$as_me' instantiates files and other configuration actions
18427from templates according to the current configuration. Unless the files
18428and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018429
Matthias Kloseb9621712010-04-24 17:59:49 +000018430Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018431
18432 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018433 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018434 --config print configuration, then exit
18435 -q, --quiet, --silent
18436 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018437 -d, --debug don't remove temporary files
18438 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018439 --file=FILE[:TEMPLATE]
18440 instantiate the configuration file FILE
18441 --header=FILE[:TEMPLATE]
18442 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018443
18444Configuration files:
18445$config_files
18446
18447Configuration headers:
18448$config_headers
18449
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018450Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018453cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Christian Heimes32eba612021-03-19 10:29:25 +010018454ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018455ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018456python config.status 3.10
Christian Heimes32eba612021-03-19 10:29:25 +010018457configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018458 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018459
Christian Heimes32eba612021-03-19 10:29:25 +010018460Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018461This config.status script is free software; the Free Software Foundation
18462gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463
18464ac_pwd='$ac_pwd'
18465srcdir='$srcdir'
18466INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018467MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018468test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018469_ACEOF
18470
Matthias Kloseb9621712010-04-24 17:59:49 +000018471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18472# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018473ac_need_defaults=:
18474while test $# != 0
18475do
18476 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018477 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18479 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018480 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018481 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018482 --*=)
18483 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18484 ac_optarg=
18485 ac_shift=:
18486 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018488 ac_option=$1
18489 ac_optarg=$2
18490 ac_shift=shift
18491 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018492 esac
18493
Skip Montanaro6dead952003-09-25 14:50:04 +000018494 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018496 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18497 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Christian Heimes32eba612021-03-19 10:29:25 +010018499 $as_echo "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018500 --config | --confi | --conf | --con | --co | --c )
Christian Heimes32eba612021-03-19 10:29:25 +010018501 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018503 debug=: ;;
18504 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018505 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018506 case $ac_optarg in
Christian Heimes32eba612021-03-19 10:29:25 +010018507 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018508 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018509 esac
18510 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018511 ac_need_defaults=false;;
18512 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018513 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018514 case $ac_optarg in
Christian Heimes32eba612021-03-19 10:29:25 +010018515 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018516 esac
18517 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018518 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018519 --he | --h)
18520 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018521 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018522Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 --help | --hel | -h )
Christian Heimes32eba612021-03-19 10:29:25 +010018524 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18526 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18527 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018528
18529 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018530 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018531Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018532
Matthias Kloseb9621712010-04-24 17:59:49 +000018533 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018535
18536 esac
18537 shift
18538done
18539
Skip Montanaro6dead952003-09-25 14:50:04 +000018540ac_configure_extra_args=
18541
18542if $ac_cs_silent; then
18543 exec 6>/dev/null
18544 ac_configure_extra_args="$ac_configure_extra_args --silent"
18545fi
18546
18547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018549if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018550 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018551 shift
Christian Heimes32eba612021-03-19 10:29:25 +010018552 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000018553 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018554 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018555 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018556fi
18557
Martin v. Löwis11437992002-04-12 09:54:03 +000018558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018559cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560exec 5>>config.log
18561{
18562 echo
18563 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18564## Running $as_me. ##
18565_ASBOX
Christian Heimes32eba612021-03-19 10:29:25 +010018566 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018567} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018570cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018572
Matthias Kloseb9621712010-04-24 17:59:49 +000018573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574
18575# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018576for ac_config_target in $ac_config_targets
18577do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578 case $ac_config_target in
18579 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18580 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18581 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018582 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18583 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018585 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018586 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018587 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018588 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018589
Victor Stinnere0be4232011-10-25 13:06:09 +020018590 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018591 esac
18592done
18593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594
Martin v. Löwis11437992002-04-12 09:54:03 +000018595# If the user did not use the arguments to specify the items to instantiate,
18596# then the envvar interface is used. Set only those that are not.
18597# We use the long form for the default assignment because of an extremely
18598# bizarre bug on SunOS 4.1.3.
18599if $ac_need_defaults; then
Christian Heimes32eba612021-03-19 10:29:25 +010018600 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18601 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000018602fi
18603
Skip Montanaro6dead952003-09-25 14:50:04 +000018604# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018605# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018606# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018607# Hook for its removal unless debugging.
18608# Note that there is a small window in which the directory will not be cleaned:
18609# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018610$debug ||
18611{
Victor Stinnere0be4232011-10-25 13:06:09 +020018612 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018613 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018614 : "${ac_tmp:=$tmp}"
18615 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018616' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018617 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018618}
Martin v. Löwis11437992002-04-12 09:54:03 +000018619# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018620
Martin v. Löwis11437992002-04-12 09:54:03 +000018621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018622 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018623 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018624} ||
18625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018626 tmp=./conf$$-$RANDOM
18627 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018628} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018629ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018630
Matthias Kloseb9621712010-04-24 17:59:49 +000018631# Set up the scripts for CONFIG_FILES section.
18632# No need to generate them if there are no CONFIG_FILES.
18633# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018634if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018635
Matthias Kloseb9621712010-04-24 17:59:49 +000018636
18637ac_cr=`echo X | tr X '\015'`
18638# On cygwin, bash can eat \r inside `` if the user requested igncr.
18639# But we know of no other shell where ac_cr would be empty at this
18640# point, so we can use a bashism as a fallback.
18641if test "x$ac_cr" = x; then
18642 eval ac_cr=\$\'\\r\'
18643fi
18644ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18645if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018646 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018647else
18648 ac_cs_awk_cr=$ac_cr
18649fi
18650
Victor Stinnere0be4232011-10-25 13:06:09 +020018651echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018652_ACEOF
18653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018654
Matthias Kloseb9621712010-04-24 17:59:49 +000018655{
18656 echo "cat >conf$$subs.awk <<_ACEOF" &&
18657 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18658 echo "_ACEOF"
18659} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018660 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18661ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018662ac_delim='%!_!# '
18663for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018664 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018665 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018666
Matthias Kloseb9621712010-04-24 17:59:49 +000018667 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18668 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018669 break
18670 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018671 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018672 else
18673 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018674 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018675done
Matthias Kloseb9621712010-04-24 17:59:49 +000018676rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018677
Matthias Kloseb9621712010-04-24 17:59:49 +000018678cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018679cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018681sed -n '
18682h
18683s/^/S["/; s/!.*/"]=/
18684p
18685g
18686s/^[^!]*!//
18687:repl
18688t repl
18689s/'"$ac_delim"'$//
18690t delim
18691:nl
18692h
18693s/\(.\{148\}\)..*/\1/
18694t more1
18695s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18696p
18697n
18698b repl
18699:more1
18700s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18701p
18702g
18703s/.\{148\}//
18704t nl
18705:delim
18706h
18707s/\(.\{148\}\)..*/\1/
18708t more2
18709s/["\\]/\\&/g; s/^/"/; s/$/"/
18710p
18711b
18712:more2
18713s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18714p
18715g
18716s/.\{148\}//
18717t delim
18718' <conf$$subs.awk | sed '
18719/^[^""]/{
18720 N
18721 s/\n//
18722}
18723' >>$CONFIG_STATUS || ac_write_fail=1
18724rm -f conf$$subs.awk
18725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18726_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018727cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018728 for (key in S) S_is_set[key] = 1
18729 FS = ""
18730
18731}
18732{
18733 line = $ 0
18734 nfields = split(line, field, "@")
18735 substed = 0
18736 len = length(field[1])
18737 for (i = 2; i < nfields; i++) {
18738 key = field[i]
18739 keylen = length(key)
18740 if (S_is_set[key]) {
18741 value = S[key]
18742 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18743 len += length(value) + length(field[++i])
18744 substed = 1
18745 } else
18746 len += 1 + keylen
18747 }
18748
18749 print line
18750}
18751
18752_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18755if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18756 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18757else
18758 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018759fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018760 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018761_ACEOF
18762
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018763# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18764# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018765# trailing colons and then remove the whole line if VPATH becomes empty
18766# (actually we leave an empty line to preserve line numbers).
18767if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018768 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18769h
18770s///
18771s/^/:/
18772s/[ ]*$/:/
18773s/:\$(srcdir):/:/g
18774s/:\${srcdir}:/:/g
18775s/:@srcdir@:/:/g
18776s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018777s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018778x
18779s/\(=[ ]*\).*/\1/
18780G
18781s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018782s/^[^=]*=[ ]*$//
18783}'
18784fi
18785
Matthias Kloseb9621712010-04-24 17:59:49 +000018786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018787fi # test -n "$CONFIG_FILES"
18788
Matthias Kloseb9621712010-04-24 17:59:49 +000018789# Set up the scripts for CONFIG_HEADERS section.
18790# No need to generate them if there are no CONFIG_HEADERS.
18791# This happens for instance with `./config.status Makefile'.
18792if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018793cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018794BEGIN {
18795_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018796
Matthias Kloseb9621712010-04-24 17:59:49 +000018797# Transform confdefs.h into an awk script `defines.awk', embedded as
18798# here-document in config.status, that substitutes the proper values into
18799# config.h.in to produce config.h.
18800
18801# Create a delimiter string that does not exist in confdefs.h, to ease
18802# handling of long lines.
18803ac_delim='%!_!# '
18804for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018805 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18806 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018807 break
18808 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018809 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018810 else
18811 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18812 fi
18813done
18814
18815# For the awk script, D is an array of macro values keyed by name,
18816# likewise P contains macro parameters if any. Preserve backslash
18817# newline sequences.
18818
18819ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18820sed -n '
18821s/.\{148\}/&'"$ac_delim"'/g
18822t rset
18823:rset
18824s/^[ ]*#[ ]*define[ ][ ]*/ /
18825t def
18826d
18827:def
18828s/\\$//
18829t bsnl
18830s/["\\]/\\&/g
18831s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18832D["\1"]=" \3"/p
18833s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18834d
18835:bsnl
18836s/["\\]/\\&/g
18837s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18838D["\1"]=" \3\\\\\\n"\\/p
18839t cont
18840s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18841t cont
18842d
18843:cont
18844n
18845s/.\{148\}/&'"$ac_delim"'/g
18846t clear
18847:clear
18848s/\\$//
18849t bsnlc
18850s/["\\]/\\&/g; s/^/"/; s/$/"/p
18851d
18852:bsnlc
18853s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18854b cont
18855' <confdefs.h | sed '
18856s/'"$ac_delim"'/"\\\
18857"/g' >>$CONFIG_STATUS || ac_write_fail=1
18858
18859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18860 for (key in D) D_is_set[key] = 1
18861 FS = ""
18862}
18863/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18864 line = \$ 0
18865 split(line, arg, " ")
18866 if (arg[1] == "#") {
18867 defundef = arg[2]
18868 mac1 = arg[3]
18869 } else {
18870 defundef = substr(arg[1], 2)
18871 mac1 = arg[2]
18872 }
18873 split(mac1, mac2, "(") #)
18874 macro = mac2[1]
18875 prefix = substr(line, 1, index(line, defundef) - 1)
18876 if (D_is_set[macro]) {
18877 # Preserve the white space surrounding the "#".
18878 print prefix "define", macro P[macro] D[macro]
18879 next
18880 } else {
18881 # Replace #undef with comments. This is necessary, for example,
18882 # in the case of _POSIX_SOURCE, which is predefined and required
18883 # on some systems where configure will not decide to define it.
18884 if (defundef == "undef") {
18885 print "/*", prefix defundef, macro, "*/"
18886 next
18887 }
18888 }
18889}
18890{ print }
18891_ACAWK
18892_ACEOF
18893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018894 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018895fi # test -n "$CONFIG_HEADERS"
18896
18897
18898eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18899shift
18900for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018901do
18902 case $ac_tag in
18903 :[FHLC]) ac_mode=$ac_tag; continue;;
18904 esac
18905 case $ac_mode$ac_tag in
18906 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018907 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018908 :[FH]-) ac_tag=-:-;;
18909 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18910 esac
18911 ac_save_IFS=$IFS
18912 IFS=:
18913 set x $ac_tag
18914 IFS=$ac_save_IFS
18915 shift
18916 ac_file=$1
18917 shift
18918
18919 case $ac_mode in
18920 :L) ac_source=$1;;
18921 :[FH])
18922 ac_file_inputs=
18923 for ac_f
18924 do
18925 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018926 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018927 *) # Look for the file first in the build tree, then in the source tree
18928 # (if the path is not absolute). The absolute path cannot be DOS-style,
18929 # because $ac_f cannot contain `:'.
18930 test -f "$ac_f" ||
18931 case $ac_f in
18932 [\\/$]*) false;;
18933 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18934 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018935 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018936 esac
Christian Heimes32eba612021-03-19 10:29:25 +010018937 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018938 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018939 done
18940
18941 # Let's still pretend it is `configure' which instantiates (i.e., don't
18942 # use $as_me), people would be surprised to read:
18943 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018944 configure_input='Generated from '`
Christian Heimes32eba612021-03-19 10:29:25 +010018945 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000018946 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018947 if test x"$ac_file" != x-; then
18948 configure_input="$ac_file. $configure_input"
Christian Heimes32eba612021-03-19 10:29:25 +010018949 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18950$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018952 # Neutralize special characters interpreted by sed in replacement strings.
18953 case $configure_input in #(
18954 *\&* | *\|* | *\\* )
Christian Heimes32eba612021-03-19 10:29:25 +010018955 ac_sed_conf_input=`$as_echo "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018956 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18957 *) ac_sed_conf_input=$configure_input;;
18958 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018959
18960 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018961 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18962 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018963 esac
18964 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018965 esac
18966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018967 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018968$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018969 X"$ac_file" : 'X\(//\)[^/]' \| \
18970 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018971 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes32eba612021-03-19 10:29:25 +010018972$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018973 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18974 s//\1/
18975 q
18976 }
18977 /^X\(\/\/\)[^/].*/{
18978 s//\1/
18979 q
18980 }
18981 /^X\(\/\/\)$/{
18982 s//\1/
18983 q
18984 }
18985 /^X\(\/\).*/{
18986 s//\1/
18987 q
18988 }
18989 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018990 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018991 ac_builddir=.
18992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018993case "$ac_dir" in
18994.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18995*)
Christian Heimes32eba612021-03-19 10:29:25 +010018996 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018997 # A ".." for each directory in $ac_dir_suffix.
Christian Heimes32eba612021-03-19 10:29:25 +010018998 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999 case $ac_top_builddir_sub in
19000 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19001 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19002 esac ;;
19003esac
19004ac_abs_top_builddir=$ac_pwd
19005ac_abs_builddir=$ac_pwd$ac_dir_suffix
19006# for backward compatibility:
19007ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000019008
19009case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019010 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000019011 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019012 ac_top_srcdir=$ac_top_builddir_sub
19013 ac_abs_top_srcdir=$ac_pwd ;;
19014 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000019015 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019016 ac_top_srcdir=$srcdir
19017 ac_abs_top_srcdir=$srcdir ;;
19018 *) # Relative name.
19019 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19020 ac_top_srcdir=$ac_top_build_prefix$srcdir
19021 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019022esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019023ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000019024
Martin v. Löwis11437992002-04-12 09:54:03 +000019025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019026 case $ac_mode in
19027 :F)
19028 #
19029 # CONFIG_FILE
19030 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019031
19032 case $INSTALL in
19033 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019035 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010019036 ac_MKDIR_P=$MKDIR_P
19037 case $MKDIR_P in
19038 [\\/$]* | ?:[\\/]* ) ;;
19039 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19040 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000019041_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019042
Matthias Kloseb9621712010-04-24 17:59:49 +000019043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019044# If the template does not know about datarootdir, expand it.
19045# FIXME: This hack should be removed a few years after 2.60.
19046ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000019047ac_sed_dataroot='
19048/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019049 p
19050 q
19051}
19052/@datadir@/p
19053/@docdir@/p
19054/@infodir@/p
19055/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000019056/@mandir@/p'
19057case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019058*datarootdir*) ac_datarootdir_seen=yes;;
19059*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Christian Heimes32eba612021-03-19 10:29:25 +010019060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19061$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019064 ac_datarootdir_hack='
19065 s&@datadir@&$datadir&g
19066 s&@docdir@&$docdir&g
19067 s&@infodir@&$infodir&g
19068 s&@localedir@&$localedir&g
19069 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000019070 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019071esac
19072_ACEOF
19073
19074# Neutralize VPATH when `$srcdir' = `.'.
19075# Shell code in configure.ac might set extrasub.
19076# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000019077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19078ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000019079$extrasub
19080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000019082:t
19083/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000019084s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019085s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000019086s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019087s&@srcdir@&$ac_srcdir&;t t
19088s&@abs_srcdir@&$ac_abs_srcdir&;t t
19089s&@top_srcdir@&$ac_top_srcdir&;t t
19090s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19091s&@builddir@&$ac_builddir&;t t
19092s&@abs_builddir@&$ac_abs_builddir&;t t
19093s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19094s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010019095s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019096$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000019097"
Victor Stinnere0be4232011-10-25 13:06:09 +020019098eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19099 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019101test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019102 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19103 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19104 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Christian Heimes32eba612021-03-19 10:29:25 +010019105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019106which seems to be undefined. Please make sure it is defined" >&5
Christian Heimes32eba612021-03-19 10:29:25 +010019107$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019108which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019109
Victor Stinnere0be4232011-10-25 13:06:09 +020019110 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019111 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019112 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19113 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019114 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019115 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019116 ;;
19117 :H)
19118 #
19119 # CONFIG_HEADER
19120 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019121 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019122 {
Christian Heimes32eba612021-03-19 10:29:25 +010019123 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019124 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19125 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019126 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019127 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Christian Heimes32eba612021-03-19 10:29:25 +010019128 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19129$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019130 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019131 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019132 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019133 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 fi
19135 else
Christian Heimes32eba612021-03-19 10:29:25 +010019136 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019137 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019138 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019139 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019140 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019142
19143 esac
19144
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019145
19146 case $ac_file$ac_mode in
19147 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19148
19149 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019150done # for ac_tag
19151
Guido van Rossum627b2d71993-12-24 10:39:16 +000019152
Matthias Kloseb9621712010-04-24 17:59:49 +000019153as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019154_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019155ac_clean_files=$ac_clean_files_save
19156
Matthias Kloseb9621712010-04-24 17:59:49 +000019157test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019158 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019159
Martin v. Löwis11437992002-04-12 09:54:03 +000019160
19161# configure is writing to config.log, and then calls config.status.
19162# config.status does its own redirection, appending to config.log.
19163# Unfortunately, on DOS this fails, as config.log is still kept open
19164# by configure, so config.status won't be able to write to it; its
19165# output is simply discarded. So we exec the FD to /dev/null,
19166# effectively closing config.log, so it can be properly (re)opened and
19167# appended to by config.status. When coming back to configure, we
19168# need to make the FD available again.
19169if test "$no_create" != yes; then
19170 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019171 ac_config_status_args=
19172 test "$silent" = yes &&
19173 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019174 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019175 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019176 exec 5>>config.log
19177 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19178 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019179 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019180fi
19181if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Christian Heimes32eba612021-03-19 10:29:25 +010019182 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19183$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019184fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019185
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019186
Christian Heimes75ed8902013-11-20 01:11:18 +010019187echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019188if test ! -f Modules/Setup.local
19189then
19190 echo "# Edit this file for local setup changes" >Modules/Setup.local
19191fi
19192
Christian Heimes75ed8902013-11-20 01:11:18 +010019193echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019194$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019195 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019196 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019197mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019198
19199if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19200 echo "" >&6
19201 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019202 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 +000019203 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019204 echo "" >&6
19205 echo "" >&6
19206fi