blob: 86591e2ed2cf829c56f2645930cc6444073016f5 [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 Heimes39258d32021-04-17 11:36:35 +02003# 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 Heimes39258d32021-04-17 11:36:35 +02008# 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 Heimes39258d32021-04-17 11:36:35 +020019if 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 Heimes39258d32021-04-17 11:36:35 +020026else
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 Heimes39258d32021-04-17 11:36:35 +020039# 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 Heimes39258d32021-04-17 11:36:35 +020075if 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 Heimes39258d32021-04-17 11:36:35 +020084# 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 Heimes39258d32021-04-17 11:36:35 +020099 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 Heimes39258d32021-04-17 11:36:35 +0200112 $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 Heimes39258d32021-04-17 11:36:35 +0200116# 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 Heimes39258d32021-04-17 11:36:35 +0200157$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 Heimes39258d32021-04-17 11:36:35 +0200163 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 Heimes39258d32021-04-17 11:36:35 +0200170else
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 Heimes39258d32021-04-17 11:36:35 +0200190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000191
Christian Heimes39258d32021-04-17 11:36:35 +0200192else
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 Heimes39258d32021-04-17 11:36:35 +0200202 if (eval "$as_required") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000203 as_have_required=yes
Christian Heimes39258d32021-04-17 11:36:35 +0200204else
Matthias Kloseb9621712010-04-24 17:59:49 +0000205 as_have_required=no
206fi
Christian Heimes39258d32021-04-17 11:36:35 +0200207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000208
Christian Heimes39258d32021-04-17 11:36:35 +0200209else
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 Heimes39258d32021-04-17 11:36:35 +0200215 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 Heimes39258d32021-04-17 11:36:35 +0200221 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 Heimes39258d32021-04-17 11:36:35 +0200223 { $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 Heimes39258d32021-04-17 11:36:35 +0200225 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 Heimes39258d32021-04-17 11:36:35 +0200233$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 Galindo53e55292021-04-05 17:38:40 +0100235 CONFIG_SHELL=$SHELL as_have_required=yes
Christian Heimes39258d32021-04-17 11:36:35 +0200236fi; }
237IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +0000238
239
Christian Heimes39258d32021-04-17 11:36:35 +0200240 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 Heimes39258d32021-04-17 11:36:35 +0200258$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 Heimes39258d32021-04-17 11:36:35 +0200262 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 Heimes39258d32021-04-17 11:36:35 +0200269 $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 Heimes39258d32021-04-17 11:36:35 +0200328 *\'*) 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 Heimes39258d32021-04-17 11:36:35 +0200337$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 Heimes39258d32021-04-17 11:36:35 +0200376if (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 Heimes39258d32021-04-17 11:36:35 +0200381else
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 Heimes39258d32021-04-17 11:36:35 +0200393if (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 Heimes39258d32021-04-17 11:36:35 +0200398else
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 Heimes39258d32021-04-17 11:36:35 +0200416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Christian Heimes39258d32021-04-17 11:36:35 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +0200445$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 Heimes39258d32021-04-17 11:36:35 +0200489 { $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 Heimes39258d32021-04-17 11:36:35 +0200591#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 Heimes39258d32021-04-17 11:36:35 +0200595#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 Heimes39258d32021-04-17 11:36:35 +0200600# 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 Heimes39258d32021-04-17 11:36:35 +0200607# 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 Heimes39258d32021-04-17 11:36:35 +0200612#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 Heimes39258d32021-04-17 11:36:35 +0200721EGREP
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
Ned Deily0cb33da2021-05-02 04:48:29 -0400755LIPO_INTEL64_FLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000756LIPO_32BIT_FLAGS
757ARCH_RUN_32BIT
758UNIVERSALSDK
759CONFIG_ARGS
760SOVERSION
761VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200762PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200763PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100764host_os
765host_vendor
766host_cpu
767host
768build_os
769build_vendor
770build_cpu
771build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500772HAS_GIT
773GITBRANCH
774GITTAG
775GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400776BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000777target_alias
778host_alias
779build_alias
780LIBS
781ECHO_T
782ECHO_N
783ECHO_C
784DEFS
785mandir
786localedir
787libdir
788psdir
789pdfdir
790dvidir
791htmldir
792infodir
793docdir
794oldincludedir
795includedir
796localstatedir
797sharedstatedir
798sysconfdir
799datadir
800datarootdir
801libexecdir
802sbindir
803bindir
804program_transform_name
805prefix
806exec_prefix
807PACKAGE_URL
808PACKAGE_BUGREPORT
809PACKAGE_STRING
810PACKAGE_VERSION
811PACKAGE_TARNAME
812PACKAGE_NAME
813PATH_SEPARATOR
814SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000815ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000816ac_user_opts='
817enable_option_checking
818enable_universalsdk
819with_universal_archs
820with_framework_name
821enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_cxx_main
823with_suffix
824enable_shared
825enable_profiling
826with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200827with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200828with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000829enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700830with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100831with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400832with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100833with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800834with_memory_sanitizer
835with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_libs
837with_system_expat
838with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100839with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100840with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000841enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700842with_tcltk_includes
843with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000845enable_ipv6
846with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000847with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000848with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000849with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700850with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000851with_libm
852with_libc
853enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100854with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100855with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100856with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000857with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800858with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100859with_openssl
Christian Heimes32eba612021-03-19 10:29:25 +0100860with_openssl_rpath
Christian Heimes892d66e2018-01-29 14:10:18 +0100861with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200862with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200863with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100864with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800865enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000866'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 ac_precious_vars='build_alias
868host_alias
869target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100870MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871CC
872CFLAGS
873LDFLAGS
874LIBS
875CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800876CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700877PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800878PKG_CONFIG
879PKG_CONFIG_PATH
880PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881
Guido van Rossum627b2d71993-12-24 10:39:16 +0000882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000884ac_init_help=
885ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000886ac_unrecognized_opts=
887ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888# The variables have the same names as the options, with
889# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000890cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893no_recursion=
894prefix=NONE
895program_prefix=NONE
896program_suffix=NONE
897program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902x_includes=NONE
903x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000904
905# Installation directory options.
906# These are left unexpanded so users can "make install exec_prefix=/foo"
907# and all the variables that are supposed to be based on exec_prefix
908# by default will actually change.
909# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911bindir='${exec_prefix}/bin'
912sbindir='${exec_prefix}/sbin'
913libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914datarootdir='${prefix}/share'
915datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916sysconfdir='${prefix}/etc'
917sharedstatedir='${prefix}/com'
918localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919includedir='${prefix}/include'
920oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
922infodir='${datarootdir}/info'
923htmldir='${docdir}'
924dvidir='${docdir}'
925pdfdir='${docdir}'
926psdir='${docdir}'
927libdir='${exec_prefix}/lib'
928localedir='${datarootdir}/locale'
929mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000934do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935 # If the previous option needs an argument, assign it.
936 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 ac_prev=
939 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000940 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200943 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
944 *=) ac_optarg= ;;
945 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
Christian Heimes39258d32021-04-17 11:36:35 +0200948 # Accept the important Cygnus configure options, so we can diagnose typos.
949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 case $ac_dashdash$ac_option in
951 --)
952 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 -bindir | --bindir | --bindi | --bind | --bin | --bi)
955 ac_prev=bindir ;;
956 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 -cache-file | --cache-file | --cache-fil | --cache-fi \
965 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
966 ac_prev=cache_file ;;
967 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
968 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 cache_file=$ac_optarg ;;
970
971 --config-cache | -C)
972 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
980 | --dataroo | --dataro | --datar)
981 ac_prev=datarootdir ;;
982 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
983 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
984 datarootdir=$ac_optarg ;;
985
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +0200990 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +0200992 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 case $ac_user_opts in
994 *"
995"enable_$ac_useropt"
996"*) ;;
997 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
998 ac_unrecognized_sep=', ';;
999 esac
1000 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001
1002 -docdir | --docdir | --docdi | --doc | --do)
1003 ac_prev=docdir ;;
1004 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1005 docdir=$ac_optarg ;;
1006
1007 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1008 ac_prev=dvidir ;;
1009 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1010 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001013 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001015 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001016 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001017 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001018 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001019 case $ac_user_opts in
1020 *"
1021"enable_$ac_useropt"
1022"*) ;;
1023 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1024 ac_unrecognized_sep=', ';;
1025 esac
1026 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1029 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1030 | --exec | --exe | --ex)
1031 ac_prev=exec_prefix ;;
1032 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1033 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1034 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
1037 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 # Obsolete; use --with-gas.
1039 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 -help | --help | --hel | --he | -h)
1042 ac_init_help=long ;;
1043 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1044 ac_init_help=recursive ;;
1045 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1046 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
1048 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001053 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1054 ac_prev=htmldir ;;
1055 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1056 | --ht=*)
1057 htmldir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -includedir | --includedir | --includedi | --included | --include \
1060 | --includ | --inclu | --incl | --inc)
1061 ac_prev=includedir ;;
1062 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1063 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -infodir | --infodir | --infodi | --infod | --info | --inf)
1067 ac_prev=infodir ;;
1068 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
1071 -libdir | --libdir | --libdi | --libd)
1072 ac_prev=libdir ;;
1073 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1077 | --libexe | --libex | --libe)
1078 ac_prev=libexecdir ;;
1079 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1080 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001083 -localedir | --localedir | --localedi | --localed | --locale)
1084 ac_prev=localedir ;;
1085 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1086 localedir=$ac_optarg ;;
1087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001089 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 ac_prev=localstatedir ;;
1091 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001092 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
1095 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1096 ac_prev=mandir ;;
1097 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 # Obsolete; use --without-fp.
1102 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 no_create=yes ;;
1107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1109 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1110 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001112 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1113 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1114 | --oldin | --oldi | --old | --ol | --o)
1115 ac_prev=oldincludedir ;;
1116 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1117 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1118 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001120
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1122 ac_prev=prefix ;;
1123 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
1126 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1127 | --program-pre | --program-pr | --program-p)
1128 ac_prev=program_prefix ;;
1129 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1130 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1134 | --program-suf | --program-su | --program-s)
1135 ac_prev=program_suffix ;;
1136 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1137 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
1140 -program-transform-name | --program-transform-name \
1141 | --program-transform-nam | --program-transform-na \
1142 | --program-transform-n | --program-transform- \
1143 | --program-transform | --program-transfor \
1144 | --program-transfo | --program-transf \
1145 | --program-trans | --program-tran \
1146 | --progr-tra | --program-tr | --program-t)
1147 ac_prev=program_transform_name ;;
1148 -program-transform-name=* | --program-transform-name=* \
1149 | --program-transform-nam=* | --program-transform-na=* \
1150 | --program-transform-n=* | --program-transform-=* \
1151 | --program-transform=* | --program-transfor=* \
1152 | --program-transfo=* | --program-transf=* \
1153 | --program-trans=* | --program-tran=* \
1154 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001157 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1158 ac_prev=pdfdir ;;
1159 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1160 pdfdir=$ac_optarg ;;
1161
1162 -psdir | --psdir | --psdi | --psd | --ps)
1163 ac_prev=psdir ;;
1164 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1165 psdir=$ac_optarg ;;
1166
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1168 | -silent | --silent | --silen | --sile | --sil)
1169 silent=yes ;;
1170
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1172 ac_prev=sbindir ;;
1173 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1174 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
1177 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1178 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1179 | --sharedst | --shareds | --shared | --share | --shar \
1180 | --sha | --sh)
1181 ac_prev=sharedstatedir ;;
1182 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1183 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1184 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1185 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 -site | --site | --sit)
1189 ac_prev=site ;;
1190 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1194 ac_prev=srcdir ;;
1195 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001198 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1199 | --syscon | --sysco | --sysc | --sys | --sy)
1200 ac_prev=sysconfdir ;;
1201 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1202 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001204
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1211 verbose=yes ;;
1212
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 -version | --version | --versio | --versi | --vers | -V)
1214 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001220 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001236 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001238 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001239 case $ac_user_opts in
1240 *"
1241"with_$ac_useropt"
1242"*) ;;
1243 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1244 ac_unrecognized_sep=', ';;
1245 esac
1246 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248 --x)
1249 # Obsolete; use --with-x.
1250 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251
1252 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1253 | --x-incl | --x-inc | --x-in | --x-i)
1254 ac_prev=x_includes ;;
1255 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1256 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258
1259 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1260 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1261 ac_prev=x_libraries ;;
1262 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1263 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1267Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 ;;
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 *=*)
1271 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1272 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 case $ac_envvar in #(
1274 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 export $ac_envvar ;;
1279
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001280 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 # FIXME: should be removed in autoconf 3.0.
Christian Heimes39258d32021-04-17 11:36:35 +02001282 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001284 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001285 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286 ;;
1287
1288 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289done
1290
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001292 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001293 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294fi
1295
Matthias Kloseb9621712010-04-24 17:59:49 +00001296if test -n "$ac_unrecognized_opts"; then
1297 case $enable_option_checking in
1298 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001299 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Christian Heimes39258d32021-04-17 11:36:35 +02001300 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 esac
1302fi
1303
1304# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1306 datadir sysconfdir sharedstatedir localstatedir includedir \
1307 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimes39258d32021-04-17 11:36:35 +02001308 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001311 # Remove trailing slashes.
1312 case $ac_val in
1313 */ )
1314 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1315 eval $ac_var=\$ac_val;;
1316 esac
1317 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319 [\\/$]* | ?:[\\/]* ) continue;;
1320 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001322 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001323done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325# There might be people who depend on the old broken behavior: `$host'
1326# used to hold the argument of --host etc.
1327# FIXME: To remove some day.
1328build=$build_alias
1329host=$host_alias
1330target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331
Martin v. Löwis11437992002-04-12 09:54:03 +00001332# FIXME: To remove some day.
1333if test "x$host_alias" != x; then
1334 if test "x$build_alias" = x; then
1335 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001336 elif test "x$build_alias" != "x$host_alias"; then
1337 cross_compiling=yes
1338 fi
1339fi
1340
1341ac_tool_prefix=
1342test -n "$host_alias" && ac_tool_prefix=$host_alias-
1343
1344test "$silent" = yes && exec 6>/dev/null
1345
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347ac_pwd=`pwd` && test -n "$ac_pwd" &&
1348ac_ls_di=`ls -di .` &&
1349ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001350 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001351test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001352 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353
1354
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355# Find the source files, if location was not specified.
1356if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001357 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001358 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001359 ac_confdir=`$as_dirname -- "$as_myself" ||
1360$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1361 X"$as_myself" : 'X\(//\)[^/]' \| \
1362 X"$as_myself" : 'X\(//\)$' \| \
1363 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +02001364$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1366 s//\1/
1367 q
1368 }
1369 /^X\(\/\/\)[^/].*/{
1370 s//\1/
1371 q
1372 }
1373 /^X\(\/\/\)$/{
1374 s//\1/
1375 q
1376 }
1377 /^X\(\/\).*/{
1378 s//\1/
1379 q
1380 }
1381 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001382 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001384 srcdir=..
1385 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001386else
1387 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001389if test ! -r "$srcdir/$ac_unique_file"; then
1390 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001391 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001393ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1394ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001395 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396 pwd)`
1397# When building in place, set srcdir=.
1398if test "$ac_abs_confdir" = "$ac_pwd"; then
1399 srcdir=.
1400fi
1401# Remove unnecessary trailing slashes from srcdir.
1402# Double slashes in file names in object file debugging info
1403# mess up M-x gdb in Emacs.
1404case $srcdir in
1405*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1406esac
1407for ac_var in $ac_precious_vars; do
1408 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1409 eval ac_env_${ac_var}_value=\$${ac_var}
1410 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1411 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1412done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001413
Martin v. Löwis11437992002-04-12 09:54:03 +00001414#
1415# Report the --help message.
1416#
1417if test "$ac_init_help" = "long"; then
1418 # Omit some internal or obsolete options to make the list less imposing.
1419 # This message is too long to be a string in the A/UX 3.1 sh.
1420 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001421\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
1423Usage: $0 [OPTION]... [VAR=VALUE]...
1424
1425To assign environment variables (e.g., CC, CFLAGS...), specify them as
1426VAR=VALUE. See below for descriptions of some of the useful variables.
1427
1428Defaults for the options are specified in brackets.
1429
1430Configuration:
1431 -h, --help display this help and exit
1432 --help=short display options specific to this package
1433 --help=recursive display the short help of all the included packages
1434 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001435 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 --cache-file=FILE cache test results in FILE [disabled]
1437 -C, --config-cache alias for \`--cache-file=config.cache'
1438 -n, --no-create do not create output files
1439 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1440
Martin v. Löwis11437992002-04-12 09:54:03 +00001441Installation directories:
1442 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447By default, \`make install' will install all the files in
1448\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1449an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1450for instance \`--prefix=\$HOME'.
1451
1452For better control, use the options below.
1453
1454Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 --bindir=DIR user executables [EPREFIX/bin]
1456 --sbindir=DIR system admin executables [EPREFIX/sbin]
1457 --libexecdir=DIR program executables [EPREFIX/libexec]
1458 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1459 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1460 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1461 --libdir=DIR object code libraries [EPREFIX/lib]
1462 --includedir=DIR C header files [PREFIX/include]
1463 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1464 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1465 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1466 --infodir=DIR info documentation [DATAROOTDIR/info]
1467 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1468 --mandir=DIR man documentation [DATAROOTDIR/man]
1469 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1470 --htmldir=DIR html documentation [DOCDIR]
1471 --dvidir=DIR dvi documentation [DOCDIR]
1472 --pdfdir=DIR pdf documentation [DOCDIR]
1473 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001474_ACEOF
1475
1476 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001477
1478System types:
1479 --build=BUILD configure for building on BUILD [guessed]
1480 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001481_ACEOF
1482fi
1483
1484if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001485 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001486 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001487 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 cat <<\_ACEOF
1489
1490Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1493 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001494 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001495 create a universal binary build. SDKDIR specifies
1496 which macOS SDK should be used to perform the build,
1497 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001499 create a Python.framework rather than a traditional
1500 Unix install. optional INSTALLDIR specifies the
1501 installation path. see Mac/README.rst (default is
1502 no)
1503 --enable-shared enable building a shared Python library (default is
1504 no)
1505 --enable-profiling enable C-level code profiling with gprof (default is
1506 no)
1507 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1508 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001509 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001510 support loadable extensions in _sqlite module, see
1511 Doc/library/sqlite3.rst (default is no)
1512 --enable-ipv6 enable ipv6 (with ipv4) support, see
1513 Doc/library/socket.rst (default is yes if supported)
1514 --enable-big-digits[=15|30]
1515 use big digits (30 or 15 bits) for Python longs
1516 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001517 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001518
1519Optional Packages:
1520 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1521 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001522 --with-universal-archs=ARCH
Ned Deily0cb33da2021-05-02 04:48:29 -04001523 specify the kind of macOS universal binary that
1524 should be created. This option is only valid when
Anthony Shaw2de064e2020-01-14 17:40:10 +11001525 --enable-universalsdk is set; options are:
Ned Deily0cb33da2021-05-02 04:48:29 -04001526 ("universal2", "intel-64", "intel-32", "intel",
1527 "32-bit", "64-bit", "3-way", or "all") see
1528 Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001529 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001530 specify the name for the python framework on macOS
1531 only valid when --enable-framework is set. see
1532 Mac/README.rst (default is 'Python')
1533 --with-cxx-main[=COMPILER]
1534 compile main() and link Python executable with C++
1535 compiler specified in COMPILER (default is $CXX)
1536 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1537 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001538 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001539 (default is no)
1540 --with-assertions build with C assertions enabled (default is no)
1541 --with-lto enable Link-Time-Optimization in any build (default
1542 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001543 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001544 select hash algorithm for use in Python/pyhash.c
1545 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001546 --with-tzpath=<list of absolute paths separated by pathsep>
1547 Select the default time zone search path for zoneinfo.TZPATH
1548
Charles-François Natalid30b0222014-05-08 23:08:51 +01001549 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001550 enable AddressSanitizer memory error detector,
1551 'asan' (default is no)
1552 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1553 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001554 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001555 enable UndefinedBehaviorSanitizer undefined
1556 behaviour detector, 'ubsan' (default is no)
1557 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001558 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001559 library, see Doc/library/pyexpat.rst (default is no)
1560 --with-system-ffi build _ctypes module using an installed ffi library,
1561 see Doc/library/ctypes.rst (default is
1562 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001563 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001564 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001565 --with-decimal-contextvar
1566 build _decimal module using a coroutine-local rather
1567 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001568 --with-tcltk-includes='-I...'
1569 override search for Tcl and Tk include files
1570 --with-tcltk-libs='-L...'
1571 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001572 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001573 override order to check db backends for dbm; a valid
1574 value is a colon separated string with the backend
1575 names `ndbm', `gdbm' and `bdb'.
1576 --with-doc-strings enable documentation strings (default is yes)
1577 --with-pymalloc enable specialized mallocs (default is yes)
1578 --with-c-locale-coercion
1579 enable C locale coercion to a UTF-8 based locale
1580 (default is yes)
1581 --with-valgrind enable Valgrind support (default is no)
1582 --with-dtrace enable DTrace support (default is no)
1583 --with-libm=STRING override libm math library to STRING (default is
1584 system-dependent)
1585 --with-libc=STRING override libc C library to STRING (default is
1586 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001587 --with-platlibdir=DIRNAME
1588 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001589 --with-wheel-pkg-dir=PATH
1590 Directory of wheel packages used by ensurepip
1591 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001592 --with(out)-readline[=editline]
1593 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001594 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001595 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001596 --with-ensurepip[=install|upgrade|no]
1597 "install" or "upgrade" using bundled pip (default is
1598 upgrade)
Christian Heimes5d6e8c12021-03-27 14:44:04 +01001599 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes32eba612021-03-19 10:29:25 +01001600 --with-openssl-rpath=[DIR|auto|no]
1601 Set runtime library directory (rpath) for OpenSSL
1602 libraries, no (default): don't set rpath, auto:
1603 auto-detect rpath from --with-openssl and
1604 pkg-config, DIR: set an explicit rpath
Christian Heimes892d66e2018-01-29 14:10:18 +01001605 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001606 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001607 Python's preferred selection (default), openssl:
1608 leave OpenSSL's defaults untouched, STRING: use a
Christian Heimese9832522021-05-01 20:53:10 +02001609 custom string, python and STRING also set TLS 1.2 as
1610 minimum TLS version
Christian Heimes9b60e552020-05-15 23:54:53 +02001611 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1612 builtin hash modules, md5, sha1, sha256, sha512,
1613 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001614 --with-experimental-isolated-subinterpreters
1615 better isolate subinterpreters, experimental build
1616 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001617 --without-static-libpython
1618 do not build libpythonMAJOR.MINOR.a and do not
1619 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001620
1621Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001622 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 CC C compiler command
1624 CFLAGS C compiler flags
1625 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1626 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001628 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001631 PROFILE_TASK
1632 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001633 PKG_CONFIG path to pkg-config utility
1634 PKG_CONFIG_PATH
1635 directories to add to pkg-config's search path
1636 PKG_CONFIG_LIBDIR
1637 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001638
1639Use these variables to override the choices made by `configure' or to help
1640it to find libraries and programs with nonstandard names/locations.
1641
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001642Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001643_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001645fi
1646
1647if test "$ac_init_help" = "recursive"; then
1648 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001650 test -d "$ac_dir" ||
1651 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1652 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 ac_builddir=.
1654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655case "$ac_dir" in
1656.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1657*)
Christian Heimes39258d32021-04-17 11:36:35 +02001658 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 # A ".." for each directory in $ac_dir_suffix.
Christian Heimes39258d32021-04-17 11:36:35 +02001660 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661 case $ac_top_builddir_sub in
1662 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1663 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1664 esac ;;
1665esac
1666ac_abs_top_builddir=$ac_pwd
1667ac_abs_builddir=$ac_pwd$ac_dir_suffix
1668# for backward compatibility:
1669ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001670
1671case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001672 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001674 ac_top_srcdir=$ac_top_builddir_sub
1675 ac_abs_top_srcdir=$ac_pwd ;;
1676 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001677 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001678 ac_top_srcdir=$srcdir
1679 ac_abs_top_srcdir=$srcdir ;;
1680 *) # Relative name.
1681 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1682 ac_top_srcdir=$ac_top_build_prefix$srcdir
1683 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001684esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001685ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001687 cd "$ac_dir" || { ac_status=$?; continue; }
Christian Heimes39258d32021-04-17 11:36:35 +02001688 # Check for guested configure.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001689 if test -f "$ac_srcdir/configure.gnu"; then
1690 echo &&
1691 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1692 elif test -f "$ac_srcdir/configure"; then
1693 echo &&
1694 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001695 else
Christian Heimes39258d32021-04-17 11:36:35 +02001696 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697 fi || ac_status=$?
1698 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 done
1700fi
1701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001703if $ac_init_version; then
1704 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001705python configure 3.10
Christian Heimes39258d32021-04-17 11:36:35 +02001706generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001707
Christian Heimes39258d32021-04-17 11:36:35 +02001708Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001709This configure script is free software; the Free Software Foundation
1710gives unlimited permission to copy, distribute and modify it.
1711_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001712 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001714
1715## ------------------------ ##
1716## Autoconf initialization. ##
1717## ------------------------ ##
1718
1719# ac_fn_c_try_compile LINENO
1720# --------------------------
1721# Try to compile conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_compile ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001725 rm -f conftest.$ac_objext
Matthias Kloseb9621712010-04-24 17:59:49 +00001726 if { { ac_try="$ac_compile"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001732$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001733 (eval "$ac_compile") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 test $ac_status = 0; } && {
1742 test -z "$ac_c_werror_flag" ||
1743 test ! -s conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02001744 } && test -s conftest.$ac_objext; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001745 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001746else
1747 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750 ac_retval=1
1751fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001753 as_fn_set_status $ac_retval
1754
1755} # ac_fn_c_try_compile
1756
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001757# ac_fn_c_try_cpp LINENO
1758# ----------------------
1759# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_cpp ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763 if { { ac_try="$ac_cpp conftest.$ac_ext"
1764case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001769$as_echo "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001770 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1771 ac_status=$?
1772 if test -s conftest.err; then
1773 grep -v '^ *+' conftest.err >conftest.er1
1774 cat conftest.er1 >&5
1775 mv -f conftest.er1 conftest.err
1776 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001778 test $ac_status = 0; } > conftest.i && {
1779 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1780 test ! -s conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02001781 }; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001782 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001783else
1784 $as_echo "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001785sed 's/^/| /' conftest.$ac_ext >&5
1786
1787 ac_retval=1
1788fi
1789 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1790 as_fn_set_status $ac_retval
1791
1792} # ac_fn_c_try_cpp
1793
Matthias Kloseb9621712010-04-24 17:59:49 +00001794# ac_fn_c_try_link LINENO
1795# -----------------------
1796# Try to link conftest.$ac_ext, and return whether this succeeded.
1797ac_fn_c_try_link ()
1798{
1799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001800 rm -f conftest.$ac_objext conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001801 if { { ac_try="$ac_link"
1802case "(($ac_try" in
1803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1804 *) ac_try_echo=$ac_try;;
1805esac
1806eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001807$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 (eval "$ac_link") 2>conftest.err
1809 ac_status=$?
1810 if test -s conftest.err; then
1811 grep -v '^ *+' conftest.err >conftest.er1
1812 cat conftest.er1 >&5
1813 mv -f conftest.er1 conftest.err
1814 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 test $ac_status = 0; } && {
1817 test -z "$ac_c_werror_flag" ||
1818 test ! -s conftest.err
1819 } && test -s conftest$ac_exeext && {
1820 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001821 test -x conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02001822 }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001824else
1825 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001826sed 's/^/| /' conftest.$ac_ext >&5
1827
1828 ac_retval=1
1829fi
1830 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1831 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1832 # interfere with the next link command; also delete a directory that is
1833 # left behind by Apple's compiler. We do this before executing the actions.
1834 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001836 as_fn_set_status $ac_retval
1837
1838} # ac_fn_c_try_link
1839
Christian Heimes39258d32021-04-17 11:36:35 +02001840# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001841# -------------------------------------------------------
Christian Heimes39258d32021-04-17 11:36:35 +02001842# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1843# the include files in INCLUDES and setting the cache variable VAR
1844# accordingly.
1845ac_fn_c_check_header_mongrel ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001846{
1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001848 if eval \${$3+:} false; then :
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1850$as_echo_n "checking for $2... " >&6; }
1851if eval \${$3+:} false; then :
1852 $as_echo_n "(cached) " >&6
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
1857else
1858 # Is the header compilable?
1859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1860$as_echo_n "checking $2 usability... " >&6; }
1861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001862/* end confdefs.h. */
1863$4
1864#include <$2>
1865_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02001866if ac_fn_c_try_compile "$LINENO"; then :
1867 ac_header_compiler=yes
1868else
1869 ac_header_compiler=no
Matthias Kloseb9621712010-04-24 17:59:49 +00001870fi
Christian Heimes39258d32021-04-17 11:36:35 +02001871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1873$as_echo "$ac_header_compiler" >&6; }
1874
1875# Is the header present?
1876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1877$as_echo_n "checking $2 presence... " >&6; }
1878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880#include <$2>
1881_ACEOF
1882if ac_fn_c_try_cpp "$LINENO"; then :
1883 ac_header_preproc=yes
1884else
1885 ac_header_preproc=no
1886fi
1887rm -f conftest.err conftest.i conftest.$ac_ext
1888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1889$as_echo "$ac_header_preproc" >&6; }
1890
1891# So? What about this header?
1892case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1893 yes:no: )
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1895$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1897$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1898 ;;
1899 no:yes:* )
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1901$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1903$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1905$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1907$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1909$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1910( $as_echo "## --------------------------------------- ##
1911## Report this to https://bugs.python.org/ ##
1912## --------------------------------------- ##"
1913 ) | sed "s/^/$as_me: WARNING: /" >&2
1914 ;;
1915esac
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1917$as_echo_n "checking for $2... " >&6; }
1918if eval \${$3+:} false; then :
1919 $as_echo_n "(cached) " >&6
1920else
1921 eval "$3=\$ac_header_compiler"
Matthias Kloseb9621712010-04-24 17:59:49 +00001922fi
1923eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02001924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
1926fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001928
Christian Heimes39258d32021-04-17 11:36:35 +02001929} # ac_fn_c_check_header_mongrel
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931# ac_fn_c_try_run LINENO
1932# ----------------------
Christian Heimes39258d32021-04-17 11:36:35 +02001933# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1934# that executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001935ac_fn_c_try_run ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 if { { ac_try="$ac_link"
1939case "(($ac_try" in
1940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941 *) ac_try_echo=$ac_try;;
1942esac
1943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001944$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001945 (eval "$ac_link") 2>&5
1946 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02001947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001948 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1949 { { case "(($ac_try" in
1950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951 *) ac_try_echo=$ac_try;;
1952esac
1953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001954$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001955 (eval "$ac_try") 2>&5
1956 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02001957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958 test $ac_status = 0; }; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001960else
1961 $as_echo "$as_me: program exited with status $ac_status" >&5
1962 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001963sed 's/^/| /' conftest.$ac_ext >&5
1964
1965 ac_retval=$ac_status
1966fi
1967 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001969 as_fn_set_status $ac_retval
1970
1971} # ac_fn_c_try_run
1972
Christian Heimes39258d32021-04-17 11:36:35 +02001973# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1974# -------------------------------------------------------
1975# Tests whether HEADER exists and can be compiled using the include files in
1976# INCLUDES, setting the cache variable VAR accordingly.
1977ac_fn_c_check_header_compile ()
1978{
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1981$as_echo_n "checking for $2... " >&6; }
1982if eval \${$3+:} false; then :
1983 $as_echo_n "(cached) " >&6
1984else
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$4
1988#include <$2>
1989_ACEOF
1990if ac_fn_c_try_compile "$LINENO"; then :
1991 eval "$3=yes"
1992else
1993 eval "$3=no"
1994fi
1995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1996fi
1997eval ac_res=\$$3
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999$as_echo "$ac_res" >&6; }
2000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001
2002} # ac_fn_c_check_header_compile
2003
Matthias Kloseb9621712010-04-24 17:59:49 +00002004# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2005# -------------------------------------------
2006# Tests whether TYPE exists after having included INCLUDES, setting cache
2007# variable VAR accordingly.
2008ac_fn_c_check_type ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2012$as_echo_n "checking for $2... " >&6; }
2013if eval \${$3+:} false; then :
2014 $as_echo_n "(cached) " >&6
2015else
Matthias Kloseb9621712010-04-24 17:59:49 +00002016 eval "$3=no"
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020int
Christian Heimes39258d32021-04-17 11:36:35 +02002021main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002022{
2023if (sizeof ($2))
2024 return 0;
2025 ;
2026 return 0;
2027}
2028_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002029if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
Christian Heimes39258d32021-04-17 11:36:35 +02002034main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002035{
2036if (sizeof (($2)))
2037 return 0;
2038 ;
2039 return 0;
2040}
2041_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002042if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002043
Christian Heimes39258d32021-04-17 11:36:35 +02002044else
Matthias Kloseb9621712010-04-24 17:59:49 +00002045 eval "$3=yes"
2046fi
Christian Heimes39258d32021-04-17 11:36:35 +02002047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002048fi
Christian Heimes39258d32021-04-17 11:36:35 +02002049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002050fi
2051eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002054 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002055
2056} # ac_fn_c_check_type
2057
Matthias Kloseb9621712010-04-24 17:59:49 +00002058# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2059# --------------------------------------------
2060# Tries to find the compile-time value of EXPR in a program that includes
2061# INCLUDES, setting VAR accordingly. Returns whether the value could be
2062# computed
2063ac_fn_c_compute_int ()
2064{
2065 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066 if test "$cross_compiling" = yes; then
2067 # Depending upon the size, compute the lo and hi bounds.
2068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
Christian Heimes39258d32021-04-17 11:36:35 +02002072main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002073{
2074static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002082if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002083 ac_lo=0 ac_mid=0
2084 while :; do
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
2087$4
2088int
Christian Heimes39258d32021-04-17 11:36:35 +02002089main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002090{
2091static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002092test_array [0] = 0;
2093return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002099if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002100 ac_hi=$ac_mid; break
Christian Heimes39258d32021-04-17 11:36:35 +02002101else
Matthias Kloseb9621712010-04-24 17:59:49 +00002102 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2103 if test $ac_lo -le $ac_mid; then
2104 ac_lo= ac_hi=
2105 break
2106 fi
2107 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2108fi
Christian Heimes39258d32021-04-17 11:36:35 +02002109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002110 done
Christian Heimes39258d32021-04-17 11:36:35 +02002111else
Matthias Kloseb9621712010-04-24 17:59:49 +00002112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115int
Christian Heimes39258d32021-04-17 11:36:35 +02002116main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002117{
2118static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002119test_array [0] = 0;
2120return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002121
2122 ;
2123 return 0;
2124}
2125_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002126if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002127 ac_hi=-1 ac_mid=-1
2128 while :; do
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132int
Christian Heimes39258d32021-04-17 11:36:35 +02002133main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002134{
2135static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002136test_array [0] = 0;
2137return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002138
2139 ;
2140 return 0;
2141}
2142_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002143if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002144 ac_lo=$ac_mid; break
Christian Heimes39258d32021-04-17 11:36:35 +02002145else
Matthias Kloseb9621712010-04-24 17:59:49 +00002146 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2147 if test $ac_mid -le $ac_hi; then
2148 ac_lo= ac_hi=
2149 break
2150 fi
2151 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2152fi
Christian Heimes39258d32021-04-17 11:36:35 +02002153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002154 done
Christian Heimes39258d32021-04-17 11:36:35 +02002155else
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 ac_lo= ac_hi=
2157fi
Christian Heimes39258d32021-04-17 11:36:35 +02002158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002159fi
Christian Heimes39258d32021-04-17 11:36:35 +02002160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002161# Binary search between lo and hi bounds.
2162while test "x$ac_lo" != "x$ac_hi"; do
2163 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$4
2167int
Christian Heimes39258d32021-04-17 11:36:35 +02002168main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002169{
2170static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002171test_array [0] = 0;
2172return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002173
2174 ;
2175 return 0;
2176}
2177_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002178if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 ac_hi=$ac_mid
Christian Heimes39258d32021-04-17 11:36:35 +02002180else
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2182fi
Christian Heimes39258d32021-04-17 11:36:35 +02002183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002184done
2185case $ac_lo in #((
2186?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2187'') ac_retval=1 ;;
2188esac
2189 else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192$4
Christian Heimes39258d32021-04-17 11:36:35 +02002193static long int longval () { return $2; }
2194static unsigned long int ulongval () { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002195#include <stdio.h>
2196#include <stdlib.h>
2197int
Christian Heimes39258d32021-04-17 11:36:35 +02002198main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002199{
2200
2201 FILE *f = fopen ("conftest.val", "w");
2202 if (! f)
2203 return 1;
2204 if (($2) < 0)
2205 {
2206 long int i = longval ();
2207 if (i != ($2))
2208 return 1;
2209 fprintf (f, "%ld", i);
2210 }
2211 else
2212 {
2213 unsigned long int i = ulongval ();
2214 if (i != ($2))
2215 return 1;
2216 fprintf (f, "%lu", i);
2217 }
2218 /* Do not output a trailing newline, as this causes \r\n confusion
2219 on some platforms. */
2220 return ferror (f) || fclose (f) != 0;
2221
2222 ;
2223 return 0;
2224}
2225_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002226if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002227 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02002228else
Matthias Kloseb9621712010-04-24 17:59:49 +00002229 ac_retval=1
2230fi
2231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2232 conftest.$ac_objext conftest.beam conftest.$ac_ext
2233rm -f conftest.val
2234
2235 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002236 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002237 as_fn_set_status $ac_retval
2238
2239} # ac_fn_c_compute_int
2240
2241# ac_fn_c_check_func LINENO FUNC VAR
2242# ----------------------------------
2243# Tests whether FUNC exists, setting the cache variable VAR accordingly
2244ac_fn_c_check_func ()
2245{
2246 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2248$as_echo_n "checking for $2... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
Matthias Kloseb9621712010-04-24 17:59:49 +00002252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2256#define $2 innocuous_$2
2257
2258/* System header to define __stub macros and hopefully few prototypes,
Christian Heimes39258d32021-04-17 11:36:35 +02002259 which can conflict with char $2 (); below.
2260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2261 <limits.h> exists even on freestanding compilers. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002262
Christian Heimes39258d32021-04-17 11:36:35 +02002263#ifdef __STDC__
2264# include <limits.h>
2265#else
2266# include <assert.h>
2267#endif
2268
Matthias Kloseb9621712010-04-24 17:59:49 +00002269#undef $2
2270
2271/* Override any GCC internal prototype to avoid an error.
2272 Use char because int might match the return type of a GCC
2273 builtin and then its argument prototype would still apply. */
2274#ifdef __cplusplus
2275extern "C"
2276#endif
2277char $2 ();
2278/* The GNU C library defines this for functions which it implements
2279 to always fail with ENOSYS. Some functions are actually named
2280 something starting with __ and the normal name is an alias. */
2281#if defined __stub_$2 || defined __stub___$2
2282choke me
2283#endif
2284
2285int
Christian Heimes39258d32021-04-17 11:36:35 +02002286main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002287{
2288return $2 ();
2289 ;
2290 return 0;
2291}
2292_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002293if ac_fn_c_try_link "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 eval "$3=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002295else
Matthias Kloseb9621712010-04-24 17:59:49 +00002296 eval "$3=no"
2297fi
Christian Heimes39258d32021-04-17 11:36:35 +02002298rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 conftest$ac_exeext conftest.$ac_ext
2300fi
2301eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002304 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002305
2306} # ac_fn_c_check_func
2307
Christian Heimes39258d32021-04-17 11:36:35 +02002308# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2309# ---------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002310# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Christian Heimes39258d32021-04-17 11:36:35 +02002311# accordingly.
2312ac_fn_c_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002313{
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315 as_decl_name=`echo $2|sed 's/ *(.*//'`
2316 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Christian Heimes39258d32021-04-17 11:36:35 +02002317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2318$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2319if eval \${$3+:} false; then :
2320 $as_echo_n "(cached) " >&6
2321else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$4
2325int
Christian Heimes39258d32021-04-17 11:36:35 +02002326main ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002327{
2328#ifndef $as_decl_name
2329#ifdef __cplusplus
2330 (void) $as_decl_use;
2331#else
2332 (void) $as_decl_name;
2333#endif
2334#endif
2335
2336 ;
2337 return 0;
2338}
2339_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002340if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002341 eval "$3=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002342else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002343 eval "$3=no"
2344fi
Christian Heimes39258d32021-04-17 11:36:35 +02002345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002346fi
2347eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2351
Christian Heimes39258d32021-04-17 11:36:35 +02002352} # ac_fn_c_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002353
Matthias Kloseb9621712010-04-24 17:59:49 +00002354# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2355# ----------------------------------------------------
2356# Tries to find if the field MEMBER exists in type AGGR, after including
2357# INCLUDES, setting cache variable VAR accordingly.
2358ac_fn_c_check_member ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2362$as_echo_n "checking for $2.$3... " >&6; }
2363if eval \${$4+:} false; then :
2364 $as_echo_n "(cached) " >&6
2365else
Matthias Kloseb9621712010-04-24 17:59:49 +00002366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h. */
2368$5
2369int
Christian Heimes39258d32021-04-17 11:36:35 +02002370main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002371{
2372static $2 ac_aggr;
2373if (ac_aggr.$3)
2374return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002379if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 eval "$4=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002381else
Matthias Kloseb9621712010-04-24 17:59:49 +00002382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383/* end confdefs.h. */
2384$5
2385int
Christian Heimes39258d32021-04-17 11:36:35 +02002386main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002387{
2388static $2 ac_aggr;
2389if (sizeof ac_aggr.$3)
2390return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002395if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002396 eval "$4=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002397else
Matthias Kloseb9621712010-04-24 17:59:49 +00002398 eval "$4=no"
2399fi
Christian Heimes39258d32021-04-17 11:36:35 +02002400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002401fi
Christian Heimes39258d32021-04-17 11:36:35 +02002402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002403fi
2404eval ac_res=\$$4
Christian Heimes39258d32021-04-17 11:36:35 +02002405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002408
2409} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002411This file contains any messages produced by compilers while
2412running configure, to aid debugging if configure makes a mistake.
2413
Pablo Galindod4fe0982020-05-19 03:33:01 +01002414It was created by python $as_me 3.10, which was
Christian Heimes39258d32021-04-17 11:36:35 +02002415generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
Christian Heimes39258d32021-04-17 11:36:35 +02002417 $ $0 $@
Martin v. Löwis11437992002-04-12 09:54:03 +00002418
2419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002420exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002421{
2422cat <<_ASUNAME
2423## --------- ##
2424## Platform. ##
2425## --------- ##
2426
2427hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2428uname -m = `(uname -m) 2>/dev/null || echo unknown`
2429uname -r = `(uname -r) 2>/dev/null || echo unknown`
2430uname -s = `(uname -s) 2>/dev/null || echo unknown`
2431uname -v = `(uname -v) 2>/dev/null || echo unknown`
2432
2433/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2434/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2435
2436/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2437/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2438/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002440/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2441/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2442/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2443
2444_ASUNAME
2445
2446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447for as_dir in $PATH
2448do
2449 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002450 test -z "$as_dir" && as_dir=.
2451 $as_echo "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002453IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455} >&5
2456
2457cat >&5 <<_ACEOF
2458
2459
2460## ----------- ##
2461## Core tests. ##
2462## ----------- ##
2463
2464_ACEOF
2465
2466
2467# Keep a trace of the command line.
2468# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002469# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002470# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002471# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002472ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002473ac_configure_args0=
2474ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002475ac_must_keep_next=false
2476for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002477do
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 for ac_arg
2479 do
2480 case $ac_arg in
2481 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2483 | -silent | --silent | --silen | --sile | --sil)
2484 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 *\'*)
Christian Heimes39258d32021-04-17 11:36:35 +02002486 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 esac
2488 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 case $ac_arg in
2496 *=* | --config-cache | -C | -disable-* | --disable-* \
2497 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2498 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2499 | -with-* | --with-* | -without-* | --without-* | --x)
2500 case "$ac_configure_args0 " in
2501 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2502 esac
2503 ;;
2504 -* ) ac_must_keep_next=true ;;
2505 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 ;;
2509 esac
2510 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002511done
Matthias Kloseb9621712010-04-24 17:59:49 +00002512{ ac_configure_args0=; unset ac_configure_args0;}
2513{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002514
2515# When interrupted or exit'd, cleanup temporary files, and complete
2516# config.log. We remove comments because anyway the quotes in there
2517# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518# WARNING: Use '\'' to represent an apostrophe within the trap.
2519# 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 +00002520trap 'exit_status=$?
2521 # Save into config.log some information that might help in debugging.
2522 {
2523 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002524
Christian Heimes39258d32021-04-17 11:36:35 +02002525 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002526## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530(
2531 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2532 eval ac_val=\$$ac_var
2533 case $ac_val in #(
2534 *${as_nl}*)
2535 case $ac_var in #(
Christian Heimes39258d32021-04-17 11:36:35 +02002536 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2537$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac
2539 case $ac_var in #(
2540 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2542 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac ;;
2544 esac
2545 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2548 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 "s/'\''/'\''\\\\'\'''\''/g;
2551 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2552 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002553 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002555 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac |
2557 sort
2558)
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002560
Christian Heimes39258d32021-04-17 11:36:35 +02002561 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002562## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 echo
2565 for ac_var in $ac_subst_vars
2566 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 eval ac_val=\$$ac_var
2568 case $ac_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 esac
Christian Heimes39258d32021-04-17 11:36:35 +02002571 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002572 done | sort
2573 echo
2574
2575 if test -n "$ac_subst_files"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002576 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002579 echo
2580 for ac_var in $ac_subst_files
2581 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 eval ac_val=\$$ac_var
2583 case $ac_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002584 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 esac
Christian Heimes39258d32021-04-17 11:36:35 +02002586 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 done | sort
2588 echo
2589 fi
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 if test -s confdefs.h; then
Christian Heimes39258d32021-04-17 11:36:35 +02002592 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002593## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
2598 fi
2599 test "$ac_signal" != 0 &&
Christian Heimes39258d32021-04-17 11:36:35 +02002600 $as_echo "$as_me: caught signal $ac_signal"
2601 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 rm -f core *.core core.conftest.* &&
2604 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002607for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002609done
2610ac_signal=0
2611
2612# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
Christian Heimes39258d32021-04-17 11:36:35 +02002615$as_echo "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617# Predefined preprocessor variables.
2618
Christian Heimes39258d32021-04-17 11:36:35 +02002619cat >>confdefs.h <<_ACEOF
2620#define PACKAGE_NAME "$PACKAGE_NAME"
2621_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002622
Christian Heimes39258d32021-04-17 11:36:35 +02002623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2625_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002626
Christian Heimes39258d32021-04-17 11:36:35 +02002627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_VERSION "$PACKAGE_VERSION"
2629_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002630
Christian Heimes39258d32021-04-17 11:36:35 +02002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_STRING "$PACKAGE_STRING"
2633_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
Christian Heimes39258d32021-04-17 11:36:35 +02002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2637_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002638
Christian Heimes39258d32021-04-17 11:36:35 +02002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_URL "$PACKAGE_URL"
2641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00002642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643
2644# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002645# Prefer an explicitly selected file to automatically selected ones.
Christian Heimes39258d32021-04-17 11:36:35 +02002646ac_site_file1=NONE
2647ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648if test -n "$CONFIG_SITE"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002649 # We do not want a PATH search for config.site.
2650 case $CONFIG_SITE in #((
2651 -*) ac_site_file1=./$CONFIG_SITE;;
2652 */*) ac_site_file1=$CONFIG_SITE;;
2653 *) ac_site_file1=./$CONFIG_SITE;;
2654 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655elif test "x$prefix" != xNONE; then
Christian Heimes39258d32021-04-17 11:36:35 +02002656 ac_site_file1=$prefix/share/config.site
2657 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658else
Christian Heimes39258d32021-04-17 11:36:35 +02002659 ac_site_file1=$ac_default_prefix/share/config.site
2660 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661fi
Christian Heimes39258d32021-04-17 11:36:35 +02002662for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663do
Christian Heimes39258d32021-04-17 11:36:35 +02002664 test "x$ac_site_file" = xNONE && continue
2665 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002669 . "$ac_site_file" \
Christian Heimes39258d32021-04-17 11:36:35 +02002670 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002672as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002673See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674 fi
2675done
2676
2677if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 # Some versions of bash will fail to source /dev/null (special files
2679 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2680 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002681 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2682$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2685 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 esac
2687 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688else
Christian Heimes39258d32021-04-17 11:36:35 +02002689 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2690$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 >$cache_file
2692fi
2693
2694# Check that the precious variables saved in the cache have kept the same
2695# value.
2696ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2699 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2701 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 case $ac_old_set,$ac_new_set in
2703 set,)
Christian Heimes39258d32021-04-17 11:36:35 +02002704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2705$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 +00002706 ac_cache_corrupted=: ;;
2707 ,set)
Christian Heimes39258d32021-04-17 11:36:35 +02002708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2709$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 ac_cache_corrupted=: ;;
2711 ,);;
2712 *)
2713 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 # differences in whitespace do not lead to failure.
2715 ac_old_val_w=`echo x $ac_old_val`
2716 ac_new_val_w=`echo x $ac_new_val`
2717 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2719$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002720 ac_cache_corrupted=:
2721 else
Christian Heimes39258d32021-04-17 11:36:35 +02002722 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2723$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002724 eval $ac_var=\$ac_old_val
2725 fi
Christian Heimes39258d32021-04-17 11:36:35 +02002726 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2727$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2729$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 fi;;
2731 esac
2732 # Pass precious variables to config.status.
2733 if test "$ac_new_set" = set; then
2734 case $ac_new_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002735 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 *) ac_arg=$ac_var=$ac_new_val ;;
2737 esac
2738 case " $ac_configure_args " in
2739 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 esac
2742 fi
2743done
2744if $ac_cache_corrupted; then
Christian Heimes39258d32021-04-17 11:36:35 +02002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2748$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2749 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002751## -------------------- ##
2752## Main body of script. ##
2753## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754
Guido van Rossum7f43da71994-08-01 12:15:30 +00002755ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002760
Guido van Rossum627b2d71993-12-24 10:39:16 +00002761
Michael W. Hudson54241132001-12-07 15:38:26 +00002762
Trent Nelson4d4ec652012-10-16 08:51:24 -04002763
Christian Heimesff5be6e2018-01-20 13:19:21 +01002764
2765
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002766if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002767 # If we're building out-of-tree, we need to make sure the following
2768 # resources get picked up before their $srcdir counterparts.
2769 # Objects/ -> typeslots.inc
Victor Stinner94faa072021-03-23 20:47:40 +01002770 # Include/ -> Python.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002771 # Python/ -> importlib.h
2772 # (A side effect of this is that these resources will automatically be
2773 # regenerated when building out-of-tree, regardless of whether or not
2774 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2775 # off.)
2776 BASECPPFLAGS="-IObjects -IInclude -IPython"
2777else
2778 BASECPPFLAGS=""
2779fi
2780
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002781
2782
2783
2784
Victor Stinner9ed34a82017-05-02 22:35:58 +02002785if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002786then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002787# Extract the first word of "git", so it can be a program name with args.
2788set dummy git; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02002789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2790$as_echo_n "checking for $ac_word... " >&6; }
2791if ${ac_cv_prog_HAS_GIT+:} false; then :
2792 $as_echo_n "(cached) " >&6
2793else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002794 if test -n "$HAS_GIT"; then
2795 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002796else
2797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2798for as_dir in $PATH
2799do
2800 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002801 test -z "$as_dir" && as_dir=.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02002803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002804 ac_cv_prog_HAS_GIT="found"
Christian Heimes39258d32021-04-17 11:36:35 +02002805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002806 break 2
2807 fi
2808done
2809 done
2810IFS=$as_save_IFS
2811
Ned Deily5c4b0d02017-03-04 00:19:55 -05002812 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002813fi
2814fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002815HAS_GIT=$ac_cv_prog_HAS_GIT
2816if test -n "$HAS_GIT"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2818$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002819else
Christian Heimes39258d32021-04-17 11:36:35 +02002820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2821$as_echo "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002822fi
2823
2824
2825else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002826HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002828if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002829then
Xiang Zhang4c855572018-08-20 22:36:19 +08002830 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2831 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2832 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002833else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002834 GITVERSION=""
2835 GITTAG=""
2836 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002837fi
2838
2839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002841
2842
Christian Heimes39258d32021-04-17 11:36:35 +02002843ac_aux_dir=
2844for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2845 if test -f "$ac_dir/install-sh"; then
2846 ac_aux_dir=$ac_dir
2847 ac_install_sh="$ac_aux_dir/install-sh -c"
2848 break
2849 elif test -f "$ac_dir/install.sh"; then
2850 ac_aux_dir=$ac_dir
2851 ac_install_sh="$ac_aux_dir/install.sh -c"
2852 break
2853 elif test -f "$ac_dir/shtool"; then
2854 ac_aux_dir=$ac_dir
2855 ac_install_sh="$ac_aux_dir/shtool install -c"
2856 break
2857 fi
2858done
2859if test -z "$ac_aux_dir"; then
2860 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2861fi
2862
2863# These three variables are undocumented and unsupported,
2864# and are intended to be withdrawn in a future Autoconf release.
2865# They can cause serious problems if a builder's source tree is in a directory
2866# whose full name contains unusual characters.
2867ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2868ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2869ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002870
2871
Christian Heimes39258d32021-04-17 11:36:35 +02002872# Make sure we can run config.sub.
2873$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2874 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002875
Christian Heimes39258d32021-04-17 11:36:35 +02002876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2877$as_echo_n "checking build system type... " >&6; }
2878if ${ac_cv_build+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002881 ac_build_alias=$build_alias
2882test "x$ac_build_alias" = x &&
Christian Heimes39258d32021-04-17 11:36:35 +02002883 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002884test "x$ac_build_alias" = x &&
2885 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Christian Heimes39258d32021-04-17 11:36:35 +02002886ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2887 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002888
2889fi
Christian Heimes39258d32021-04-17 11:36:35 +02002890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2891$as_echo "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002892case $ac_cv_build in
2893*-*-*) ;;
2894*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2895esac
2896build=$ac_cv_build
2897ac_save_IFS=$IFS; IFS='-'
2898set x $ac_cv_build
2899shift
2900build_cpu=$1
2901build_vendor=$2
2902shift; shift
2903# Remember, the first character of IFS is used to create $*,
2904# except with old shells:
2905build_os=$*
2906IFS=$ac_save_IFS
2907case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2908
2909
Christian Heimes39258d32021-04-17 11:36:35 +02002910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2911$as_echo_n "checking host system type... " >&6; }
2912if ${ac_cv_host+:} false; then :
2913 $as_echo_n "(cached) " >&6
2914else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002915 if test "x$host_alias" = x; then
2916 ac_cv_host=$ac_cv_build
2917else
Christian Heimes39258d32021-04-17 11:36:35 +02002918 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2919 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002920fi
2921
2922fi
Christian Heimes39258d32021-04-17 11:36:35 +02002923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2924$as_echo "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002925case $ac_cv_host in
2926*-*-*) ;;
2927*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2928esac
2929host=$ac_cv_host
2930ac_save_IFS=$IFS; IFS='-'
2931set x $ac_cv_host
2932shift
2933host_cpu=$1
2934host_vendor=$2
2935shift; shift
2936# Remember, the first character of IFS is used to create $*,
2937# except with old shells:
2938host_os=$*
2939IFS=$ac_save_IFS
2940case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2941
2942
2943
doko@python.orga10e4a92013-01-25 18:45:12 +01002944
2945
Ned Deilyfcbc2462014-08-22 13:32:49 -07002946# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2947rm -f pybuilddir.txt
2948
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002949for ac_prog in python$PACKAGE_VERSION python3 python
2950do
2951 # Extract the first word of "$ac_prog", so it can be a program name with args.
2952set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02002953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2954$as_echo_n "checking for $ac_word... " >&6; }
2955if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2956 $as_echo_n "(cached) " >&6
2957else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002958 if test -n "$PYTHON_FOR_REGEN"; then
2959 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002960else
2961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2962for as_dir in $PATH
2963do
2964 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002965 test -z "$as_dir" && as_dir=.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002966 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02002967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002968 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02002969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002970 break 2
2971 fi
2972done
2973 done
2974IFS=$as_save_IFS
2975
2976fi
2977fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002978PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2979if test -n "$PYTHON_FOR_REGEN"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2981$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002982else
Christian Heimes39258d32021-04-17 11:36:35 +02002983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2984$as_echo "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002985fi
2986
2987
Victor Stinnera5c62a82017-05-03 18:21:48 +02002988 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002989done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002990test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002991
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002992
2993
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002994if test "$cross_compiling" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02002995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2996$as_echo_n "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002997 if test -z "$PYTHON_FOR_BUILD"; then
2998 for interp in python$PACKAGE_VERSION python3 python; do
2999 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003000 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 +02003001 break
3002 fi
3003 interp=
3004 done
3005 if test x$interp = x; then
3006 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3007 fi
Christian Heimes39258d32021-04-17 11:36:35 +02003008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3009$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003010 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 +02003011 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003012elif test "$cross_compiling" = maybe; then
3013 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003014else
3015 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3016fi
3017
3018
Martin v. Löwis11437992002-04-12 09:54:03 +00003019
Benjamin Petersond23f8222009-04-05 19:13:16 +00003020if test "$prefix" != "/"; then
3021 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3022fi
3023
3024
Martin v. Löwis11437992002-04-12 09:54:03 +00003025
3026
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003027# We don't use PACKAGE_ variables, and they cause conflicts
3028# with other autoconf-based packages that include Python.h
3029grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3030rm confdefs.h
3031mv confdefs.h.new confdefs.h
3032
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003033
Pablo Galindod4fe0982020-05-19 03:33:01 +01003034VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003035
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003036# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003037
3038SOVERSION=1.0
3039
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003040# The later defininition of _XOPEN_SOURCE disables certain features
3041# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3042
Christian Heimes39258d32021-04-17 11:36:35 +02003043$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003044
3045
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003046# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3047# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3048# them.
3049
Christian Heimes39258d32021-04-17 11:36:35 +02003050$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003051
3052
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003053# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3054# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3055# them.
3056
Christian Heimes39258d32021-04-17 11:36:35 +02003057$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003058
3059
Martin v. Löwisd6320502004-08-12 13:45:08 +00003060# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003061# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3062# them.
3063
Christian Heimes39258d32021-04-17 11:36:35 +02003064$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003065
3066
3067
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003068define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003069
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003070# Arguments passed to configure.
3071
3072CONFIG_ARGS="$ac_configure_args"
3073
Christian Heimes39258d32021-04-17 11:36:35 +02003074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3075$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076# Check whether --enable-universalsdk was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003077if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003079 case $enableval in
3080 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003081 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003082 # information
3083 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003084 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003086 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3087 if test ! -d "${enableval}"
3088 then
3089 enableval=/
3090 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092 ;;
3093 esac
3094 case $enableval in
3095 no)
3096 UNIVERSALSDK=
3097 enable_universalsdk=
3098 ;;
3099 *)
3100 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003101 if test ! -d "${UNIVERSALSDK}"
3102 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003103 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003104 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003105 ;;
3106 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003107
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003108
Christian Heimes39258d32021-04-17 11:36:35 +02003109else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110
3111 UNIVERSALSDK=
3112 enable_universalsdk=
3113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003115
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003116if test -n "${UNIVERSALSDK}"
3117then
Christian Heimes39258d32021-04-17 11:36:35 +02003118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3119$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003120else
Christian Heimes39258d32021-04-17 11:36:35 +02003121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003123fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003126
Ned Deily87adb6e2013-10-18 21:09:56 -07003127ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003128
Ned Deilycbfb9a52012-06-23 16:02:19 -07003129# For backward compatibility reasons we prefer to select '32-bit' if available,
3130# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003132if test "`uname -s`" = "Darwin"
3133then
3134 if test -n "${UNIVERSALSDK}"
3135 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003136 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003137 then
3138 UNIVERSAL_ARCHS="intel"
3139 fi
3140 fi
3141fi
3142
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003143
Ned Deily0cb33da2021-05-02 04:48:29 -04003144
Christian Heimes39258d32021-04-17 11:36:35 +02003145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3146$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003147
3148# Check whether --with-universal-archs was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003149if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003151 UNIVERSAL_ARCHS="$withval"
3152
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003153fi
3154
Ned Deily87adb6e2013-10-18 21:09:56 -07003155if test -n "${UNIVERSALSDK}"
3156then
Christian Heimes39258d32021-04-17 11:36:35 +02003157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3158$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003159else
Christian Heimes39258d32021-04-17 11:36:35 +02003160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3161$as_echo "no" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003162fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003163
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003164
3165# Check whether --with-framework-name was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003166if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003167 withval=$with_framework_name;
3168 PYTHONFRAMEWORK=${withval}
3169 PYTHONFRAMEWORKDIR=${withval}.framework
3170 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3171
Christian Heimes39258d32021-04-17 11:36:35 +02003172else
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003173
3174 PYTHONFRAMEWORK=Python
3175 PYTHONFRAMEWORKDIR=Python.framework
3176 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3177
3178fi
3179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180# Check whether --enable-framework was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003181if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003183 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003184 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003185 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 esac
3187 case $enableval in
3188 no)
3189 PYTHONFRAMEWORK=
3190 PYTHONFRAMEWORKDIR=no-framework
3191 PYTHONFRAMEWORKPREFIX=
3192 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193 FRAMEWORKINSTALLFIRST=
3194 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003195 FRAMEWORKALTINSTALLFIRST=
3196 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003197 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003198 if test "x${prefix}" = "xNONE"; then
3199 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3200 else
3201 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3202 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003204 ;;
3205 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003206 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003207 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003209 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003210 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3211 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003212 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003213 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 if test "x${prefix}" = "xNONE" ; then
3216 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003217
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003218 else
3219 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3220 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003221
3222 case "${enableval}" in
3223 /System*)
3224 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3225 if test "${prefix}" = "NONE" ; then
3226 # See below
3227 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3228 fi
3229 ;;
3230
3231 /Library*)
3232 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3233 ;;
3234
3235 */Library/Frameworks)
3236 MDIR="`dirname "${enableval}"`"
3237 MDIR="`dirname "${MDIR}"`"
3238 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3239
3240 if test "${prefix}" = "NONE"; then
3241 # User hasn't specified the
3242 # --prefix option, but wants to install
3243 # the framework in a non-default location,
3244 # ensure that the compatibility links get
3245 # installed relative to that prefix as well
3246 # instead of in /usr/local.
3247 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3248 fi
3249 ;;
3250
3251 *)
3252 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3253 ;;
3254 esac
3255
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003257
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003258 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003259 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003263
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003264 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3265
3266 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3267
Jack Jansene578a632001-08-15 01:27:14 +00003268 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003269
Christian Heimes39258d32021-04-17 11:36:35 +02003270else
Martin v. Löwis11437992002-04-12 09:54:03 +00003271
Jack Jansene578a632001-08-15 01:27:14 +00003272 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003273 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003274 PYTHONFRAMEWORKPREFIX=
3275 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003276 FRAMEWORKINSTALLFIRST=
3277 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003278 FRAMEWORKALTINSTALLFIRST=
3279 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003280 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003281 if test "x${prefix}" = "xNONE" ; then
3282 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3283 else
3284 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3285 fi
Jack Jansene578a632001-08-15 01:27:14 +00003286 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289fi
3290
Thomas Wouters477c8d52006-05-27 19:21:47 +00003291
3292
Michael W. Hudson54241132001-12-07 15:38:26 +00003293
3294
3295
3296
Jack Jansene578a632001-08-15 01:27:14 +00003297
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003298
3299
3300
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003301
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003302
Ned Deilyb8f944f2013-11-21 22:42:25 -08003303
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003304
Christian Heimes39258d32021-04-17 11:36:35 +02003305cat >>confdefs.h <<_ACEOF
3306#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
3307_ACEOF
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003308
3309
Jack Jansene578a632001-08-15 01:27:14 +00003310##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003311## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003312## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003313##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003314# Set name for machine-dependent library files
3315
Christian Heimes39258d32021-04-17 11:36:35 +02003316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3317$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318if test -z "$MACHDEP"
3319then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003320 # avoid using uname for cross builds
3321 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003322 # ac_sys_system and ac_sys_release are used for setting
3323 # a lot of different things including 'define_xopen_source'
3324 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003325 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003326 *-*-linux-android*)
3327 ac_sys_system=Linux-android
3328 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 *-*-linux*)
3330 ac_sys_system=Linux
3331 ;;
3332 *-*-cygwin*)
3333 ac_sys_system=Cygwin
3334 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003335 *-*-vxworks*)
3336 ac_sys_system=VxWorks
3337 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003338 *)
3339 # for now, limit cross builds to known configurations
3340 MACHDEP="unknown"
3341 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3342 esac
3343 ac_sys_release=
3344 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003345 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003346 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003347 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003348 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003349 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003350 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003351 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003352 fi
3353 ac_md_system=`echo $ac_sys_system |
3354 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3355 ac_md_release=`echo $ac_sys_release |
3356 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3357 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003358
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003359 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003360 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003361 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003362 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003363 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003364 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003365 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003366fi
Christian Heimes39258d32021-04-17 11:36:35 +02003367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3368$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003369
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003370
3371if test "$cross_compiling" = yes; then
3372 case "$host" in
3373 *-*-linux*)
3374 case "$host_cpu" in
3375 arm*)
3376 _host_cpu=arm
3377 ;;
3378 *)
3379 _host_cpu=$host_cpu
3380 esac
3381 ;;
3382 *-*-cygwin*)
3383 _host_cpu=
3384 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003385 *-*-vxworks*)
3386 _host_cpu=$host_cpu
3387 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003388 *)
3389 # for now, limit cross builds to known configurations
3390 MACHDEP="unknown"
3391 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3392 esac
3393 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3394fi
3395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3397# disable features if it is defined, without any means to access these
3398# features as extensions. For these systems, we skip the definition of
3399# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3400# some feature, make sure there is no alternative way to access this
3401# feature. Also, when using wildcards, make sure you have verified the
3402# need for not defining _XOPEN_SOURCE on all systems matching the
3403# wildcard, and that the wildcard does not include future systems
3404# (which may remove their limitations).
3405case $ac_sys_system/$ac_sys_release in
3406 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3407 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003408 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003409 # In addition, Stefan Krah confirms that issue #1244610 exists through
3410 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003411 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003412 define_xopen_source=no
3413 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3414 # also defined. This can be overridden by defining _BSD_SOURCE
3415 # As this has a different meaning on Linux, only define it on OpenBSD
3416
Christian Heimes39258d32021-04-17 11:36:35 +02003417$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003418
3419 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003420 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003421 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3422 # also defined. This can be overridden by defining _BSD_SOURCE
3423 # As this has a different meaning on Linux, only define it on OpenBSD
3424
Christian Heimes39258d32021-04-17 11:36:35 +02003425$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003426
3427 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003428 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3429 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3430 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003431 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 +00003432 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003433 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3434 # request to enable features supported by the standard as a request
3435 # to disable features not supported by the standard. The best way
3436 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3437 # entirely and define __EXTENSIONS__ instead.
3438 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003439 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003440 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3441 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003442 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003443 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003444 define_xopen_source=no;;
3445 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003446 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003447 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003448 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003449 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3450 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3451 # identifies itself as Darwin/7.*
3452 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3453 # disables platform specific features beyond repair.
3454 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3455 # has no effect, don't bother defining them
3456 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003457 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003458 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003459 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003460 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3461 # defining NI_NUMERICHOST.
3462 QNX/6.3.2)
3463 define_xopen_source=no
3464 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003465 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3466 # in network headers still using system V types.
3467 VxWorks/*)
3468 define_xopen_source=no
3469 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003470
Ian Nortona9edf442020-02-14 03:09:11 +00003471 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3472 # chroot() and other functions
3473 hp*|HP*)
3474 define_xopen_source=no
3475 ;;
3476
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003477esac
3478
3479if test $define_xopen_source = yes
3480then
Victor Stinner14d098d2011-09-07 22:29:43 +02003481 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003482
Christian Heimes39258d32021-04-17 11:36:35 +02003483$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003484
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003485
3486 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3487 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3488 # several APIs are not declared. Since this is also needed in some
3489 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003490
Christian Heimes39258d32021-04-17 11:36:35 +02003491$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003492
3493
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003494
Christian Heimes39258d32021-04-17 11:36:35 +02003495$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003496
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003497fi
3498
Christian Heimes647cd872013-12-07 23:39:33 +01003499# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3500case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003501 hp*|HP*)
3502 define_stdc_a1=yes;;
3503 *)
3504 define_stdc_a1=no;;
3505esac
3506
3507if test $define_stdc_a1 = yes
3508then
Christian Heimes647cd872013-12-07 23:39:33 +01003509
Christian Heimes39258d32021-04-17 11:36:35 +02003510$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
Christian Heimes647cd872013-12-07 23:39:33 +01003511
Christian Heimesb02bcae2013-12-08 15:21:08 +01003512fi
Christian Heimes647cd872013-12-07 23:39:33 +01003513
Jack Jansen6b08a402004-06-03 12:41:45 +00003514# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3515# it may influence the way we can build extensions, so distutils
3516# needs to check it
3517
Thomas Wouters477c8d52006-05-27 19:21:47 +00003518
Jack Jansen6b08a402004-06-03 12:41:45 +00003519CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003520EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003521
Guido van Rossum627b2d71993-12-24 10:39:16 +00003522# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003523
3524# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3525# for debug/optimization stuff. BASECFLAGS is for flags that are required
3526# just to get things to compile and link. Users are free to override OPT
3527# when running configure or make. The build should not break if they do.
3528# BASECFLAGS should generally not be messed with, however.
3529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003547 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003557 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003558 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003559 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003560 fi
3561 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003562 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003563 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003564 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
Christian Heimes39258d32021-04-17 11:36:35 +02003574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
Christian Heimes39258d32021-04-17 11:36:35 +02003583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
Christian Heimes39258d32021-04-17 11:36:35 +02003593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
3613if ${ac_cv_prog_CC+:} false; then :
3614 $as_echo_n "(cached) " >&6
3615else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Christian Heimes39258d32021-04-17 11:36:35 +02003627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Christian Heimes39258d32021-04-17 11:36:35 +02003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
3653if ${ac_cv_prog_ac_ct_CC+:} false; then :
3654 $as_echo_n "(cached) " >&6
3655else
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Christian Heimes39258d32021-04-17 11:36:35 +02003667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Christian Heimes39258d32021-04-17 11:36:35 +02003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003703set dummy ${ac_tool_prefix}cc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
3706if ${ac_cv_prog_CC+:} false; then :
3707 $as_echo_n "(cached) " >&6
3708else
Jack Jansendd19cf82001-12-06 22:36:17 +00003709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="${ac_tool_prefix}cc"
Christian Heimes39258d32021-04-17 11:36:35 +02003720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Christian Heimes39258d32021-04-17 11:36:35 +02003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
3746if ${ac_cv_prog_CC+:} false; then :
3747 $as_echo_n "(cached) " >&6
3748else
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Christian Heimes39258d32021-04-17 11:36:35 +02003765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Christian Heimes39258d32021-04-17 11:36:35 +02003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Christian Heimes39258d32021-04-17 11:36:35 +02003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
3805if ${ac_cv_prog_CC+:} false; then :
3806 $as_echo_n "(cached) " >&6
3807else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02003819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Christian Heimes39258d32021-04-17 11:36:35 +02003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
3849if ${ac_cv_prog_ac_ct_CC+:} false; then :
3850 $as_echo_n "(cached) " >&6
3851else
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02003863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Christian Heimes39258d32021-04-17 11:36:35 +02003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Christian Heimes39258d32021-04-17 11:36:35 +02003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Christian Heimes39258d32021-04-17 11:36:35 +02003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003908set X $ac_compile
3909ac_compiler=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003910for ac_option in --version -v -V -qversion; do
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02003917$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02003927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
Christian Heimes39258d32021-04-17 11:36:35 +02003935main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00003936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Christian Heimes39258d32021-04-17 11:36:35 +02003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Matthias Kloseb9621712010-04-24 17:59:49 +00003950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02003970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Christian Heimes39258d32021-04-17 11:36:35 +02003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Christian Heimes39258d32021-04-17 11:36:35 +02004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Christian Heimes39258d32021-04-17 11:36:35 +02004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Christian Heimes39258d32021-04-17 11:36:35 +02004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes39258d32021-04-17 11:36:35 +02004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Christian Heimes39258d32021-04-17 11:36:35 +02004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Christian Heimes39258d32021-04-17 11:36:35 +02004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Christian Heimes39258d32021-04-17 11:36:35 +02004058else
4059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02004065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
Christian Heimes39258d32021-04-17 11:36:35 +02004075main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00004076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
Christian Heimes39258d32021-04-17 11:36:35 +02004087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004096$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 (eval "$ac_link") 2>&5
4098 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004107$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 (eval "$ac_try") 2>&5
4109 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
Christian Heimes39258d32021-04-17 11:36:35 +02004117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
Christian Heimes39258d32021-04-17 11:36:35 +02004125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
Christian Heimes39258d32021-04-17 11:36:35 +02004130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
4132if ${ac_cv_objext+:} false; then :
4133 $as_echo_n "(cached) " >&6
4134else
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
Christian Heimes39258d32021-04-17 11:36:35 +02004139main ()
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
Christian Heimes39258d32021-04-17 11:36:35 +02004166else
4167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Christian Heimes39258d32021-04-17 11:36:35 +02004170{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Christian Heimes39258d32021-04-17 11:36:35 +02004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Christian Heimes39258d32021-04-17 11:36:35 +02004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4183if ${ac_cv_c_compiler_gnu+:} false; then :
4184 $as_echo_n "(cached) " >&6
4185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
Christian Heimes39258d32021-04-17 11:36:35 +02004190main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
Christian Heimes39258d32021-04-17 11:36:35 +02004202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Christian Heimes39258d32021-04-17 11:36:35 +02004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Christian Heimes39258d32021-04-17 11:36:35 +02004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Christian Heimes39258d32021-04-17 11:36:35 +02004216ac_test_CFLAGS=${CFLAGS+set}
Martin v. Löwis11437992002-04-12 09:54:03 +00004217ac_save_CFLAGS=$CFLAGS
Christian Heimes39258d32021-04-17 11:36:35 +02004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
4220if ${ac_cv_prog_cc_g+:} false; then :
4221 $as_echo_n "(cached) " >&6
4222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
Christian Heimes39258d32021-04-17 11:36:35 +02004231main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Christian Heimes39258d32021-04-17 11:36:35 +02004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
Christian Heimes39258d32021-04-17 11:36:35 +02004246main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Christian Heimes39258d32021-04-17 11:36:35 +02004255else
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
Christian Heimes39258d32021-04-17 11:36:35 +02004262main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Christian Heimes39258d32021-04-17 11:36:35 +02004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Christian Heimes39258d32021-04-17 11:36:35 +02004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275fi
Christian Heimes39258d32021-04-17 11:36:35 +02004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Christian Heimes39258d32021-04-17 11:36:35 +02004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
4281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Christian Heimes39258d32021-04-17 11:36:35 +02004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4298if ${ac_cv_prog_cc_c89+:} false; then :
4299 $as_echo_n "(cached) " >&6
4300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004305#include <stdarg.h>
4306#include <stdio.h>
4307struct stat;
4308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
4326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
4330 as 'x'. The following induces an error, until -std is added to get
4331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
4333 that's true only with -std. */
4334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
4336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
4341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
Skip Montanaro6dead952003-09-25 14:50:04 +00004354_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Christian Heimes39258d32021-04-17 11:36:35 +02004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Christian Heimes39258d32021-04-17 11:36:35 +02004362rm -f core conftest.err conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
Christian Heimes32eba612021-03-19 10:29:25 +01004367
Pablo Galindo53e55292021-04-05 17:38:40 +01004368fi
Christian Heimes39258d32021-04-17 11:36:35 +02004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
4372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
4374 xno)
4375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
4377 *)
4378 CC="$CC $ac_cv_prog_cc_c89"
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4381esac
4382if test "x$ac_cv_prog_cc_c89" != xno; then :
4383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
Christian Heimes39258d32021-04-17 11:36:35 +02004397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4398$as_echo_n "checking how to run the C preprocessor... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004399# On Suns, sometimes $CPP names a directory.
4400if test -n "$CPP" && test -d "$CPP"; then
4401 CPP=
4402fi
4403if test -z "$CPP"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004404 if ${ac_cv_prog_CPP+:} false; then :
4405 $as_echo_n "(cached) " >&6
4406else
4407 # Double quotes because CPP needs to be expanded
4408 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004409 do
4410 ac_preproc_ok=false
4411for ac_c_preproc_warn_flag in '' yes
4412do
4413 # Use a header file that comes with gcc, so configuring glibc
4414 # with a fresh cross-compiler works.
Christian Heimes39258d32021-04-17 11:36:35 +02004415 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4416 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004417 # On the NeXT, cc -E runs the code through the compiler's parser,
4418 # not just through cpp. "Syntax error" is here to catch this case.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004421#ifdef __STDC__
4422# include <limits.h>
4423#else
4424# include <assert.h>
4425#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004426 Syntax error
4427_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004428if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004429
Christian Heimes39258d32021-04-17 11:36:35 +02004430else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004431 # Broken: fails on valid input.
4432continue
4433fi
4434rm -f conftest.err conftest.i conftest.$ac_ext
4435
4436 # OK, works on sane cases. Now check whether nonexistent headers
4437 # can be detected and how.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#include <ac_nonexistent.h>
4441_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004442if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004443 # Broken: success on invalid input.
4444continue
Christian Heimes39258d32021-04-17 11:36:35 +02004445else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004446 # Passes both tests.
4447ac_preproc_ok=:
4448break
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452done
4453# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4454rm -f conftest.i conftest.err conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02004455if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004456 break
4457fi
4458
4459 done
4460 ac_cv_prog_CPP=$CPP
4461
4462fi
4463 CPP=$ac_cv_prog_CPP
4464else
4465 ac_cv_prog_CPP=$CPP
4466fi
Christian Heimes39258d32021-04-17 11:36:35 +02004467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4468$as_echo "$CPP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004469ac_preproc_ok=false
4470for ac_c_preproc_warn_flag in '' yes
4471do
4472 # Use a header file that comes with gcc, so configuring glibc
4473 # with a fresh cross-compiler works.
Christian Heimes39258d32021-04-17 11:36:35 +02004474 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4475 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004476 # On the NeXT, cc -E runs the code through the compiler's parser,
4477 # not just through cpp. "Syntax error" is here to catch this case.
4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4479/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004480#ifdef __STDC__
4481# include <limits.h>
4482#else
4483# include <assert.h>
4484#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004485 Syntax error
4486_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004487if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004488
Christian Heimes39258d32021-04-17 11:36:35 +02004489else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004490 # Broken: fails on valid input.
4491continue
4492fi
4493rm -f conftest.err conftest.i conftest.$ac_ext
4494
4495 # OK, works on sane cases. Now check whether nonexistent headers
4496 # can be detected and how.
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#include <ac_nonexistent.h>
4500_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004501if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004502 # Broken: success on invalid input.
4503continue
Christian Heimes39258d32021-04-17 11:36:35 +02004504else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004505 # Passes both tests.
4506ac_preproc_ok=:
4507break
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511done
4512# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4513rm -f conftest.i conftest.err conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02004514if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004515
Christian Heimes39258d32021-04-17 11:36:35 +02004516else
4517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4518$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004519as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4520See \`config.log' for more details" "$LINENO" 5; }
4521fi
4522
4523ac_ext=c
4524ac_cpp='$CPP $CPPFLAGS'
4525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4527ac_compiler_gnu=$ac_cv_c_compiler_gnu
4528
Christian Heimes39258d32021-04-17 11:36:35 +02004529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4530$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4531if ${ac_cv_path_GREP+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004534 if test -z "$GREP"; then
4535 ac_path_GREP_found=false
4536 # Loop through the user's path and test for each of PROGNAME-LIST
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4539do
4540 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004541 test -z "$as_dir" && as_dir=.
4542 for ac_prog in grep ggrep; do
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004543 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004544 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004545 as_fn_executable_p "$ac_path_GREP" || continue
4546# Check for GNU ac_path_GREP and select it if it is found.
4547 # Check for GNU $ac_path_GREP
4548case `"$ac_path_GREP" --version 2>&1` in
4549*GNU*)
4550 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4551*)
4552 ac_count=0
Christian Heimes39258d32021-04-17 11:36:35 +02004553 $as_echo_n 0123456789 >"conftest.in"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004554 while :
4555 do
4556 cat "conftest.in" "conftest.in" >"conftest.tmp"
4557 mv "conftest.tmp" "conftest.in"
4558 cp "conftest.in" "conftest.nl"
Christian Heimes39258d32021-04-17 11:36:35 +02004559 $as_echo 'GREP' >> "conftest.nl"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004560 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4562 as_fn_arith $ac_count + 1 && ac_count=$as_val
4563 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4564 # Best one so far, save it but keep looking for a better one
4565 ac_cv_path_GREP="$ac_path_GREP"
4566 ac_path_GREP_max=$ac_count
4567 fi
4568 # 10*(2^10) chars as input seems more than enough
4569 test $ac_count -gt 10 && break
4570 done
4571 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
4574 $ac_path_GREP_found && break 3
4575 done
4576 done
4577 done
4578IFS=$as_save_IFS
4579 if test -z "$ac_cv_path_GREP"; then
4580 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4581 fi
4582else
4583 ac_cv_path_GREP=$GREP
4584fi
4585
4586fi
Christian Heimes39258d32021-04-17 11:36:35 +02004587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4588$as_echo "$ac_cv_path_GREP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004589 GREP="$ac_cv_path_GREP"
4590
4591
Christian Heimes39258d32021-04-17 11:36:35 +02004592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4593$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4594if ${ac_cv_path_SED+:} false; then :
4595 $as_echo_n "(cached) " >&6
4596else
Łukasz Langaa785c872016-09-09 17:37:37 -07004597 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4598 for ac_i in 1 2 3 4 5 6 7; do
4599 ac_script="$ac_script$as_nl$ac_script"
4600 done
4601 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4602 { ac_script=; unset ac_script;}
4603 if test -z "$SED"; then
4604 ac_path_SED_found=false
4605 # Loop through the user's path and test for each of PROGNAME-LIST
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004610 test -z "$as_dir" && as_dir=.
4611 for ac_prog in sed gsed; do
Łukasz Langaa785c872016-09-09 17:37:37 -07004612 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004613 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
Łukasz Langaa785c872016-09-09 17:37:37 -07004614 as_fn_executable_p "$ac_path_SED" || continue
4615# Check for GNU ac_path_SED and select it if it is found.
4616 # Check for GNU $ac_path_SED
4617case `"$ac_path_SED" --version 2>&1` in
4618*GNU*)
4619 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4620*)
4621 ac_count=0
Christian Heimes39258d32021-04-17 11:36:35 +02004622 $as_echo_n 0123456789 >"conftest.in"
Łukasz Langaa785c872016-09-09 17:37:37 -07004623 while :
4624 do
4625 cat "conftest.in" "conftest.in" >"conftest.tmp"
4626 mv "conftest.tmp" "conftest.in"
4627 cp "conftest.in" "conftest.nl"
Christian Heimes39258d32021-04-17 11:36:35 +02004628 $as_echo '' >> "conftest.nl"
Łukasz Langaa785c872016-09-09 17:37:37 -07004629 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4630 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4631 as_fn_arith $ac_count + 1 && ac_count=$as_val
4632 if test $ac_count -gt ${ac_path_SED_max-0}; then
4633 # Best one so far, save it but keep looking for a better one
4634 ac_cv_path_SED="$ac_path_SED"
4635 ac_path_SED_max=$ac_count
4636 fi
4637 # 10*(2^10) chars as input seems more than enough
4638 test $ac_count -gt 10 && break
4639 done
4640 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4641esac
4642
4643 $ac_path_SED_found && break 3
4644 done
4645 done
4646 done
4647IFS=$as_save_IFS
4648 if test -z "$ac_cv_path_SED"; then
4649 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4650 fi
4651else
4652 ac_cv_path_SED=$SED
4653fi
4654
4655fi
Christian Heimes39258d32021-04-17 11:36:35 +02004656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4657$as_echo "$ac_cv_path_SED" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -07004658 SED="$ac_cv_path_SED"
4659 rm -f conftest.sed
4660
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004661
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
4663
Christian Heimes39258d32021-04-17 11:36:35 +02004664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4665$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667# Check whether --with-cxx_main was given.
Christian Heimes39258d32021-04-17 11:36:35 +02004668if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004670
4671 case $withval in
4672 no) with_cxx_main=no
4673 MAINCC='$(CC)';;
4674 yes) with_cxx_main=yes
4675 MAINCC='$(CXX)';;
4676 *) with_cxx_main=yes
4677 MAINCC=$withval
4678 if test -z "$CXX"
4679 then
4680 CXX=$withval
4681 fi;;
4682 esac
Christian Heimes39258d32021-04-17 11:36:35 +02004683else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004684
4685 with_cxx_main=no
4686 MAINCC='$(CC)'
4687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004688fi
4689
Christian Heimes39258d32021-04-17 11:36:35 +02004690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4691$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004692
4693preset_cxx="$CXX"
4694if test -z "$CXX"
4695then
4696 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 gcc) if test -n "$ac_tool_prefix"; then
4698 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4699set dummy ${ac_tool_prefix}g++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4701$as_echo_n "checking for $ac_word... " >&6; }
4702if ${ac_cv_path_CXX+:} false; then :
4703 $as_echo_n "(cached) " >&6
4704else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004705 case $CXX in
4706 [\\/]* | ?:[\\/]*)
4707 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4708 ;;
4709 *)
4710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in notfound
4712do
4713 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004714 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004715 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4717 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004719 break 2
4720 fi
4721done
4722 done
4723IFS=$as_save_IFS
4724
4725 ;;
4726esac
4727fi
4728CXX=$ac_cv_path_CXX
4729if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4731$as_echo "$CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004732else
Christian Heimes39258d32021-04-17 11:36:35 +02004733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004735fi
4736
4737
4738fi
4739if test -z "$ac_cv_path_CXX"; then
4740 ac_pt_CXX=$CXX
4741 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742set dummy g++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
4745if ${ac_cv_path_ac_pt_CXX+:} false; then :
4746 $as_echo_n "(cached) " >&6
4747else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004748 case $ac_pt_CXX in
4749 [\\/]* | ?:[\\/]*)
4750 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4751 ;;
4752 *)
4753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in notfound
4755do
4756 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004757 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4760 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004762 break 2
4763 fi
4764done
4765 done
4766IFS=$as_save_IFS
4767
4768 ;;
4769esac
4770fi
4771ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4772if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4774$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775else
Christian Heimes39258d32021-04-17 11:36:35 +02004776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778fi
4779
4780 if test "x$ac_pt_CXX" = x; then
4781 CXX="g++"
4782 else
4783 case $cross_compiling:$ac_tool_warned in
4784yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787ac_tool_warned=yes ;;
4788esac
4789 CXX=$ac_pt_CXX
4790 fi
4791else
4792 CXX="$ac_cv_path_CXX"
4793fi
4794 ;;
4795 cc) if test -n "$ac_tool_prefix"; then
4796 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4797set dummy ${ac_tool_prefix}c++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
4800if ${ac_cv_path_CXX+:} false; then :
4801 $as_echo_n "(cached) " >&6
4802else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 case $CXX in
4804 [\\/]* | ?:[\\/]*)
4805 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4806 ;;
4807 *)
4808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in notfound
4810do
4811 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4815 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 break 2
4818 fi
4819done
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004821IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 ;;
4824esac
4825fi
4826CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4829$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830else
Christian Heimes39258d32021-04-17 11:36:35 +02004831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004834
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835
4836fi
4837if test -z "$ac_cv_path_CXX"; then
4838 ac_pt_CXX=$CXX
4839 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840set dummy c++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842$as_echo_n "checking for $ac_word... " >&6; }
4843if ${ac_cv_path_ac_pt_CXX+:} false; then :
4844 $as_echo_n "(cached) " >&6
4845else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 ;;
4850 *)
4851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4852for as_dir in notfound
4853do
4854 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004855 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4858 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 break 2
4861 fi
4862done
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004864IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866 ;;
4867esac
4868fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4870if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4872$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873else
Christian Heimes39258d32021-04-17 11:36:35 +02004874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4875$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004877
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004878 if test "x$ac_pt_CXX" = x; then
4879 CXX="c++"
4880 else
4881 case $cross_compiling:$ac_tool_warned in
4882yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004885ac_tool_warned=yes ;;
4886esac
4887 CXX=$ac_pt_CXX
4888 fi
4889else
4890 CXX="$ac_cv_path_CXX"
4891fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004892 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893 clang|*/clang) if test -n "$ac_tool_prefix"; then
4894 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4895set dummy ${ac_tool_prefix}clang++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if ${ac_cv_path_CXX+:} false; then :
4899 $as_echo_n "(cached) " >&6
4900else
Ned Deilycbfb9a52012-06-23 16:02:19 -07004901 case $CXX in
4902 [\\/]* | ?:[\\/]*)
4903 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4904 ;;
4905 *)
4906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907for as_dir in notfound
4908do
4909 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004910 test -z "$as_dir" && as_dir=.
Ned Deilycbfb9a52012-06-23 16:02:19 -07004911 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4913 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Ned Deilycbfb9a52012-06-23 16:02:19 -07004915 break 2
4916 fi
4917done
4918 done
4919IFS=$as_save_IFS
4920
Ned Deilycbfb9a52012-06-23 16:02:19 -07004921 ;;
4922esac
4923fi
4924CXX=$ac_cv_path_CXX
4925if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4927$as_echo "$CXX" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004928else
Christian Heimes39258d32021-04-17 11:36:35 +02004929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930$as_echo "no" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004931fi
4932
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004933
4934fi
4935if test -z "$ac_cv_path_CXX"; then
4936 ac_pt_CXX=$CXX
4937 # Extract the first word of "clang++", so it can be a program name with args.
4938set dummy clang++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940$as_echo_n "checking for $ac_word... " >&6; }
4941if ${ac_cv_path_ac_pt_CXX+:} false; then :
4942 $as_echo_n "(cached) " >&6
4943else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004944 case $ac_pt_CXX in
4945 [\\/]* | ?:[\\/]*)
4946 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4947 ;;
4948 *)
4949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4950for as_dir in notfound
4951do
4952 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004953 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004954 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4956 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004958 break 2
4959 fi
4960done
4961 done
4962IFS=$as_save_IFS
4963
4964 ;;
4965esac
4966fi
4967ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4968if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4970$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004971else
Christian Heimes39258d32021-04-17 11:36:35 +02004972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4973$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004974fi
4975
4976 if test "x$ac_pt_CXX" = x; then
4977 CXX="clang++"
4978 else
4979 case $cross_compiling:$ac_tool_warned in
4980yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004983ac_tool_warned=yes ;;
4984esac
4985 CXX=$ac_pt_CXX
4986 fi
4987else
4988 CXX="$ac_cv_path_CXX"
4989fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004990 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004991 icc|*/icc) if test -n "$ac_tool_prefix"; then
4992 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4993set dummy ${ac_tool_prefix}icpc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4995$as_echo_n "checking for $ac_word... " >&6; }
4996if ${ac_cv_path_CXX+:} false; then :
4997 $as_echo_n "(cached) " >&6
4998else
Zachary Ware5af85642015-12-21 12:09:17 -06004999 case $CXX in
5000 [\\/]* | ?:[\\/]*)
5001 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5002 ;;
5003 *)
5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5005for as_dir in notfound
5006do
5007 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005008 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005009 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5011 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005013 break 2
5014 fi
5015done
5016 done
5017IFS=$as_save_IFS
5018
5019 ;;
5020esac
5021fi
5022CXX=$ac_cv_path_CXX
5023if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5025$as_echo "$CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005026else
Christian Heimes39258d32021-04-17 11:36:35 +02005027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5028$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005029fi
5030
5031
5032fi
5033if test -z "$ac_cv_path_CXX"; then
5034 ac_pt_CXX=$CXX
5035 # Extract the first word of "icpc", so it can be a program name with args.
5036set dummy icpc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_ac_pt_CXX+:} false; then :
5040 $as_echo_n "(cached) " >&6
5041else
Zachary Ware5af85642015-12-21 12:09:17 -06005042 case $ac_pt_CXX in
5043 [\\/]* | ?:[\\/]*)
5044 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5045 ;;
5046 *)
5047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in notfound
5049do
5050 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005051 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005052 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005056 break 2
5057 fi
5058done
5059 done
5060IFS=$as_save_IFS
5061
5062 ;;
5063esac
5064fi
5065ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5066if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5068$as_echo "$ac_pt_CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005069else
Christian Heimes39258d32021-04-17 11:36:35 +02005070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005072fi
5073
5074 if test "x$ac_pt_CXX" = x; then
5075 CXX="icpc"
5076 else
5077 case $cross_compiling:$ac_tool_warned in
5078yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02005079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Zachary Ware5af85642015-12-21 12:09:17 -06005081ac_tool_warned=yes ;;
5082esac
5083 CXX=$ac_pt_CXX
5084 fi
5085else
5086 CXX="$ac_cv_path_CXX"
5087fi
5088 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089 esac
5090 if test "$CXX" = "notfound"
5091 then
5092 CXX=""
5093 fi
5094fi
5095if test -z "$CXX"
5096then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 if test -n "$ac_tool_prefix"; then
5098 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5099 do
5100 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5101set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
5104if ${ac_cv_prog_CXX+:} false; then :
5105 $as_echo_n "(cached) " >&6
5106else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107 if test -n "$CXX"; then
5108 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005117 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02005118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119 break 2
5120 fi
5121done
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125fi
5126fi
5127CXX=$ac_cv_prog_CXX
5128if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5130$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131else
Christian Heimes39258d32021-04-17 11:36:35 +02005132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005134fi
5135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 test -n "$CXX" && break
5138 done
5139fi
5140if test -z "$CXX"; then
5141 ac_ct_CXX=$CXX
5142 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5143do
5144 # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5149 $as_echo_n "(cached) " >&6
5150else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005151 if test -n "$ac_ct_CXX"; then
5152 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005158 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005159 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005160 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005161 ac_cv_prog_ac_ct_CXX="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02005162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005163 break 2
5164 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005165done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005166 done
5167IFS=$as_save_IFS
5168
5169fi
5170fi
5171ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5172if test -n "$ac_ct_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5174$as_echo "$ac_ct_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005175else
Christian Heimes39258d32021-04-17 11:36:35 +02005176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005178fi
5179
5180
5181 test -n "$ac_ct_CXX" && break
5182done
5183
5184 if test "x$ac_ct_CXX" = x; then
5185 CXX="notfound"
5186 else
5187 case $cross_compiling:$ac_tool_warned in
5188yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02005189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005191ac_tool_warned=yes ;;
5192esac
5193 CXX=$ac_ct_CXX
5194 fi
5195fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196
5197 if test "$CXX" = "notfound"
5198 then
5199 CXX=""
5200 fi
5201fi
5202if test "$preset_cxx" != "$CXX"
5203then
Christian Heimes39258d32021-04-17 11:36:35 +02005204 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005205
5206 By default, distutils will build C++ extension modules with \"$CXX\".
5207 If this is not intended, then set CXX on the configure command line.
5208 " >&5
Christian Heimes39258d32021-04-17 11:36:35 +02005209$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005210
5211 By default, distutils will build C++ extension modules with \"$CXX\".
5212 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005213 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005214fi
5215
5216
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5218
5219
Christian Heimes39258d32021-04-17 11:36:35 +02005220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5221$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005222cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005223#undef bfin
5224#undef cris
5225#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef hppa
5228#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005229#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005231#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005232#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005233#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005234#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005235 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005236#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005237# if defined(__x86_64__) && defined(__LP64__)
5238 x86_64-linux-gnu
5239# elif defined(__x86_64__) && defined(__ILP32__)
5240 x86_64-linux-gnux32
5241# elif defined(__i386__)
5242 i386-linux-gnu
5243# elif defined(__aarch64__) && defined(__AARCH64EL__)
5244# if defined(__ILP32__)
5245 aarch64_ilp32-linux-gnu
5246# else
5247 aarch64-linux-gnu
5248# endif
5249# elif defined(__aarch64__) && defined(__AARCH64EB__)
5250# if defined(__ILP32__)
5251 aarch64_be_ilp32-linux-gnu
5252# else
5253 aarch64_be-linux-gnu
5254# endif
5255# elif defined(__alpha__)
5256 alpha-linux-gnu
5257# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5258# if defined(__ARMEL__)
5259 arm-linux-gnueabihf
5260# else
5261 armeb-linux-gnueabihf
5262# endif
5263# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5264# if defined(__ARMEL__)
5265 arm-linux-gnueabi
5266# else
5267 armeb-linux-gnueabi
5268# endif
5269# elif defined(__hppa__)
5270 hppa-linux-gnu
5271# elif defined(__ia64__)
5272 ia64-linux-gnu
5273# elif defined(__m68k__) && !defined(__mcoldfire__)
5274 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005275# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5276# if _MIPS_SIM == _ABIO32
5277 mipsisa32r6el-linux-gnu
5278# elif _MIPS_SIM == _ABIN32
5279 mipsisa64r6el-linux-gnuabin32
5280# elif _MIPS_SIM == _ABI64
5281 mipsisa64r6el-linux-gnuabi64
5282# else
5283# error unknown platform triplet
5284# endif
5285# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5286# if _MIPS_SIM == _ABIO32
5287 mipsisa32r6-linux-gnu
5288# elif _MIPS_SIM == _ABIN32
5289 mipsisa64r6-linux-gnuabin32
5290# elif _MIPS_SIM == _ABI64
5291 mipsisa64r6-linux-gnuabi64
5292# else
5293# error unknown platform triplet
5294# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005295# elif defined(__mips_hard_float) && defined(_MIPSEL)
5296# if _MIPS_SIM == _ABIO32
5297 mipsel-linux-gnu
5298# elif _MIPS_SIM == _ABIN32
5299 mips64el-linux-gnuabin32
5300# elif _MIPS_SIM == _ABI64
5301 mips64el-linux-gnuabi64
5302# else
5303# error unknown platform triplet
5304# endif
5305# elif defined(__mips_hard_float)
5306# if _MIPS_SIM == _ABIO32
5307 mips-linux-gnu
5308# elif _MIPS_SIM == _ABIN32
5309 mips64-linux-gnuabin32
5310# elif _MIPS_SIM == _ABI64
5311 mips64-linux-gnuabi64
5312# else
5313# error unknown platform triplet
5314# endif
5315# elif defined(__or1k__)
5316 or1k-linux-gnu
5317# elif defined(__powerpc__) && defined(__SPE__)
5318 powerpc-linux-gnuspe
5319# elif defined(__powerpc64__)
5320# if defined(__LITTLE_ENDIAN__)
5321 powerpc64le-linux-gnu
5322# else
5323 powerpc64-linux-gnu
5324# endif
5325# elif defined(__powerpc__)
5326 powerpc-linux-gnu
5327# elif defined(__s390x__)
5328 s390x-linux-gnu
5329# elif defined(__s390__)
5330 s390-linux-gnu
5331# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5332 sh4-linux-gnu
5333# elif defined(__sparc__) && defined(__arch64__)
5334 sparc64-linux-gnu
5335# elif defined(__sparc__)
5336 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005337# elif defined(__riscv)
5338# if __riscv_xlen == 32
5339 riscv32-linux-gnu
5340# elif __riscv_xlen == 64
5341 riscv64-linux-gnu
5342# else
5343# error unknown platform triplet
5344# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345# else
5346# error unknown platform triplet
5347# endif
5348#elif defined(__FreeBSD_kernel__)
5349# if defined(__LP64__)
5350 x86_64-kfreebsd-gnu
5351# elif defined(__i386__)
5352 i386-kfreebsd-gnu
5353# else
5354# error unknown platform triplet
5355# endif
5356#elif defined(__gnu_hurd__)
5357 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005358#elif defined(__APPLE__)
5359 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005360#elif defined(__VXWORKS__)
5361 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005362#else
5363# error unknown platform triplet
5364#endif
5365
5366EOF
5367
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005368if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005369 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
Christian Heimes39258d32021-04-17 11:36:35 +02005370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5371$as_echo "$PLATFORM_TRIPLET" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005372else
Christian Heimes39258d32021-04-17 11:36:35 +02005373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5374$as_echo "none" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005375fi
5376rm -f conftest.c conftest.out
5377
5378if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5379 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5380 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5381 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005382elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5383 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005384fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005385
doko@ubuntu.com55532312016-06-14 08:55:19 +02005386if test x$MULTIARCH != x; then
5387 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5388fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005389
5390
Christian Heimes39258d32021-04-17 11:36:35 +02005391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5392$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005393save_LDFLAGS="$LDFLAGS"
5394LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005395
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397/* end confdefs.h. */
5398
5399int
Christian Heimes39258d32021-04-17 11:36:35 +02005400main ()
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005401{
5402
5403 ;
5404 return 0;
5405}
5406_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005407if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005408 NO_AS_NEEDED="-Wl,--no-as-needed"
Christian Heimes39258d32021-04-17 11:36:35 +02005409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5410$as_echo "yes" >&6; }
5411else
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005412 NO_AS_NEEDED=""
Christian Heimes39258d32021-04-17 11:36:35 +02005413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5414$as_echo "no" >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005415fi
Christian Heimes39258d32021-04-17 11:36:35 +02005416rm -f core conftest.err conftest.$ac_objext \
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005417 conftest$ac_exeext conftest.$ac_ext
5418LDFLAGS="$save_LDFLAGS"
5419
5420
5421
5422# checks for UNIX variants that set C preprocessor variables
Christian Heimes39258d32021-04-17 11:36:35 +02005423
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5425$as_echo_n "checking for egrep... " >&6; }
5426if ${ac_cv_path_EGREP+:} false; then :
5427 $as_echo_n "(cached) " >&6
5428else
5429 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5430 then ac_cv_path_EGREP="$GREP -E"
5431 else
5432 if test -z "$EGREP"; then
5433 ac_path_EGREP_found=false
5434 # Loop through the user's path and test for each of PROGNAME-LIST
5435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437do
Christian Heimes39258d32021-04-17 11:36:35 +02005438 IFS=$as_save_IFS
5439 test -z "$as_dir" && as_dir=.
5440 for ac_prog in egrep; do
5441 for ac_exec_ext in '' $ac_executable_extensions; do
5442 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5443 as_fn_executable_p "$ac_path_EGREP" || continue
5444# Check for GNU ac_path_EGREP and select it if it is found.
5445 # Check for GNU $ac_path_EGREP
5446case `"$ac_path_EGREP" --version 2>&1` in
5447*GNU*)
5448 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5449*)
5450 ac_count=0
5451 $as_echo_n 0123456789 >"conftest.in"
5452 while :
5453 do
5454 cat "conftest.in" "conftest.in" >"conftest.tmp"
5455 mv "conftest.tmp" "conftest.in"
5456 cp "conftest.in" "conftest.nl"
5457 $as_echo 'EGREP' >> "conftest.nl"
5458 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5459 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5460 as_fn_arith $ac_count + 1 && ac_count=$as_val
5461 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5462 # Best one so far, save it but keep looking for a better one
5463 ac_cv_path_EGREP="$ac_path_EGREP"
5464 ac_path_EGREP_max=$ac_count
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465 fi
Christian Heimes39258d32021-04-17 11:36:35 +02005466 # 10*(2^10) chars as input seems more than enough
5467 test $ac_count -gt 10 && break
5468 done
5469 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5470esac
5471
5472 $ac_path_EGREP_found && break 3
5473 done
5474 done
5475 done
5476IFS=$as_save_IFS
5477 if test -z "$ac_cv_path_EGREP"; then
5478 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 +00005479 fi
Christian Heimes39258d32021-04-17 11:36:35 +02005480else
5481 ac_cv_path_EGREP=$EGREP
5482fi
5483
5484 fi
5485fi
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5487$as_echo "$ac_cv_path_EGREP" >&6; }
5488 EGREP="$ac_cv_path_EGREP"
5489
5490
5491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5492$as_echo_n "checking for ANSI C header files... " >&6; }
5493if ${ac_cv_header_stdc+:} false; then :
5494 $as_echo_n "(cached) " >&6
5495else
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497/* end confdefs.h. */
5498#include <stdlib.h>
5499#include <stdarg.h>
5500#include <string.h>
5501#include <float.h>
5502
5503int
5504main ()
5505{
5506
5507 ;
5508 return 0;
5509}
5510_ACEOF
5511if ac_fn_c_try_compile "$LINENO"; then :
5512 ac_cv_header_stdc=yes
5513else
5514 ac_cv_header_stdc=no
5515fi
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517
5518if test $ac_cv_header_stdc = yes; then
5519 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h. */
5522#include <string.h>
5523
5524_ACEOF
5525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5526 $EGREP "memchr" >/dev/null 2>&1; then :
5527
5528else
5529 ac_cv_header_stdc=no
5530fi
5531rm -f conftest*
5532
5533fi
5534
5535if test $ac_cv_header_stdc = yes; then
5536 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5538/* end confdefs.h. */
5539#include <stdlib.h>
5540
5541_ACEOF
5542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5543 $EGREP "free" >/dev/null 2>&1; then :
5544
5545else
5546 ac_cv_header_stdc=no
5547fi
5548rm -f conftest*
5549
5550fi
5551
5552if test $ac_cv_header_stdc = yes; then
5553 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5554 if test "$cross_compiling" = yes; then :
5555 :
5556else
5557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5558/* end confdefs.h. */
5559#include <ctype.h>
5560#include <stdlib.h>
5561#if ((' ' & 0x0FF) == 0x020)
5562# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5563# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5564#else
5565# define ISLOWER(c) \
5566 (('a' <= (c) && (c) <= 'i') \
5567 || ('j' <= (c) && (c) <= 'r') \
5568 || ('s' <= (c) && (c) <= 'z'))
5569# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5570#endif
5571
5572#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5573int
5574main ()
5575{
5576 int i;
5577 for (i = 0; i < 256; i++)
5578 if (XOR (islower (i), ISLOWER (i))
5579 || toupper (i) != TOUPPER (i))
5580 return 2;
5581 return 0;
5582}
5583_ACEOF
5584if ac_fn_c_try_run "$LINENO"; then :
5585
5586else
5587 ac_cv_header_stdc=no
5588fi
5589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5590 conftest.$ac_objext conftest.beam conftest.$ac_ext
5591fi
5592
5593fi
5594fi
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5596$as_echo "$ac_cv_header_stdc" >&6; }
5597if test $ac_cv_header_stdc = yes; then
5598
5599$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5600
5601fi
5602
5603# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5604for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5605 inttypes.h stdint.h unistd.h
5606do :
5607 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5608ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5609"
5610if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5611 cat >>confdefs.h <<_ACEOF
5612#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5613_ACEOF
5614
5615fi
5616
Matthias Kloseb9621712010-04-24 17:59:49 +00005617done
5618
5619
5620
Christian Heimes39258d32021-04-17 11:36:35 +02005621 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5622if test "x$ac_cv_header_minix_config_h" = xyes; then :
5623 MINIX=yes
5624else
5625 MINIX=
Matthias Kloseb9621712010-04-24 17:59:49 +00005626fi
5627
5628
Christian Heimes39258d32021-04-17 11:36:35 +02005629 if test "$MINIX" = yes; then
5630
5631$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005632
5633
Christian Heimes39258d32021-04-17 11:36:35 +02005634$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005635
5636
Christian Heimes39258d32021-04-17 11:36:35 +02005637$as_echo "#define _MINIX 1" >>confdefs.h
5638
5639 fi
5640
5641
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5643$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5644if ${ac_cv_safe_to_define___extensions__+:} false; then :
5645 $as_echo_n "(cached) " >&6
5646else
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5648/* end confdefs.h. */
5649
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005650# define __EXTENSIONS__ 1
5651 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005652int
Christian Heimes39258d32021-04-17 11:36:35 +02005653main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00005654{
5655
5656 ;
5657 return 0;
5658}
5659_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005660if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 ac_cv_safe_to_define___extensions__=yes
Christian Heimes39258d32021-04-17 11:36:35 +02005662else
Matthias Kloseb9621712010-04-24 17:59:49 +00005663 ac_cv_safe_to_define___extensions__=no
5664fi
Christian Heimes39258d32021-04-17 11:36:35 +02005665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005666fi
Christian Heimes39258d32021-04-17 11:36:35 +02005667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5668$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5669 test $ac_cv_safe_to_define___extensions__ = yes &&
5670 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005671
Christian Heimes39258d32021-04-17 11:36:35 +02005672 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005673
Christian Heimes39258d32021-04-17 11:36:35 +02005674 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005675
Christian Heimes39258d32021-04-17 11:36:35 +02005676 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005677
Christian Heimes39258d32021-04-17 11:36:35 +02005678 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005679
5680
Christian Heimes39258d32021-04-17 11:36:35 +02005681
5682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5683$as_echo_n "checking for the Android API level... " >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005684cat >> conftest.c <<EOF
5685#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005686android_api = __ANDROID_API__
5687arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005688#else
5689#error not Android
5690#endif
5691EOF
5692
5693if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005694 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5695 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Christian Heimes39258d32021-04-17 11:36:35 +02005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5697$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005698 if test -z "$ANDROID_API_LEVEL"; then
5699 echo 'Fatal: you must define __ANDROID_API__'
5700 exit 1
5701 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005702
Christian Heimes39258d32021-04-17 11:36:35 +02005703cat >>confdefs.h <<_ACEOF
5704#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5705_ACEOF
Xavier de Gaye95750b12016-07-09 11:05:42 +02005706
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005707
Christian Heimes39258d32021-04-17 11:36:35 +02005708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5709$as_echo_n "checking for the Android arm ABI... " >&6; }
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5711$as_echo "$_arm_arch" >&6; }
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005712 if test "$_arm_arch" = 7; then
5713 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5714 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5715 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005716else
Christian Heimes39258d32021-04-17 11:36:35 +02005717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5718$as_echo "not Android" >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005719fi
5720rm -f conftest.c conftest.out
5721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722# Check for unsupported systems
5723case $ac_sys_system/$ac_sys_release in
5724atheos*|Linux*/1*)
5725 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5726 echo See README for details.
5727 exit 1;;
5728esac
5729
5730
Christian Heimes39258d32021-04-17 11:36:35 +02005731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5732$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734# Check whether --with-suffix was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005735if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 withval=$with_suffix;
5737 case $withval in
5738 no) EXEEXT=;;
5739 yes) EXEEXT=.exe;;
5740 *) EXEEXT=$withval;;
5741 esac
5742fi
5743
Christian Heimes39258d32021-04-17 11:36:35 +02005744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5745$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747# Test whether we're running on a non-case-sensitive system, in which
5748# case we give a warning if no ext is given
5749
Christian Heimes39258d32021-04-17 11:36:35 +02005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5751$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752if test ! -d CaseSensitiveTestDir; then
5753mkdir CaseSensitiveTestDir
5754fi
5755
5756if test -d casesensitivetestdir
5757then
Christian Heimes39258d32021-04-17 11:36:35 +02005758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5759$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760 BUILDEXEEXT=.exe
5761else
Christian Heimes39258d32021-04-17 11:36:35 +02005762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5763$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764 BUILDEXEEXT=$EXEEXT
5765fi
5766rmdir CaseSensitiveTestDir
5767
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768case $ac_sys_system in
5769hp*|HP*)
5770 case $CC in
5771 cc|*/cc) CC="$CC -Ae";;
5772 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773esac
5774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
Christian Heimes39258d32021-04-17 11:36:35 +02005776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5777$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778if test -z "$LIBRARY"
5779then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005780 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781fi
Christian Heimes39258d32021-04-17 11:36:35 +02005782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5783$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784
5785# LDLIBRARY is the name of the library to link against (as opposed to the
5786# name of the library into which to insert object files). BLDLIBRARY is also
5787# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5788# is blank as the main program is not linked directly against LDLIBRARY.
5789# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5790# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5791# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5792# DLLLIBRARY is the shared (i.e., DLL) library.
5793#
5794# RUNSHARED is used to run shared python without installed libraries
5795#
5796# INSTSONAME is the name of the shared library that will be use to install
5797# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005798#
5799# LDVERSION is the shared library version number, normally the Python version
5800# with the ABI build flags appended.
5801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
5803
5804
5805
5806
5807
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809LDLIBRARY="$LIBRARY"
5810BLDLIBRARY='$(LDLIBRARY)'
5811INSTSONAME='$(LDLIBRARY)'
5812DLLLIBRARY=''
5813LDLIBRARYDIR=''
5814RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005815LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816
5817# LINKCC is the command that links the python executable -- default is $(CC).
5818# If CXX is set, and if it is needed to link a main function that was
5819# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5820# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821
Christian Heimes39258d32021-04-17 11:36:35 +02005822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5823$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824if test -z "$LINKCC"
5825then
5826 LINKCC='$(PURIFY) $(MAINCC)'
5827 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828 QNX*)
5829 # qcc must be used because the other compilers do not
5830 # support -N.
5831 LINKCC=qcc;;
5832 esac
5833fi
Christian Heimes39258d32021-04-17 11:36:35 +02005834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5835$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836
Stefan Krahe6dcd372020-08-29 17:00:08 +02005837# EXPORTSYMS holds the list of exported symbols for AIX.
5838# EXPORTSFROM holds the module name exporting symbols on AIX.
5839EXPORTSYMS=
5840EXPORTSFROM=
5841
5842
Christian Heimes39258d32021-04-17 11:36:35 +02005843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5844$as_echo_n "checking EXPORTSYMS... " >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005845case $ac_sys_system in
5846AIX*)
5847 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005848 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005849 ;;
5850esac
Christian Heimes39258d32021-04-17 11:36:35 +02005851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5852$as_echo "$EXPORTSYMS" >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5855# make sure we default having it set to "no": this is used by
5856# distutils.unixccompiler to know if it should add --enable-new-dtags
5857# to linker command lines, and failing to detect GNU ld simply results
5858# in the same bahaviour as before.
5859
Christian Heimes39258d32021-04-17 11:36:35 +02005860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5861$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862ac_prog=ld
5863if test "$GCC" = yes; then
5864 ac_prog=`$CC -print-prog-name=ld`
5865fi
5866case `"$ac_prog" -V 2>&1 < /dev/null` in
5867 *GNU*)
5868 GNULD=yes;;
5869 *)
5870 GNULD=no;;
5871esac
Christian Heimes39258d32021-04-17 11:36:35 +02005872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5873$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874
Christian Heimes39258d32021-04-17 11:36:35 +02005875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5876$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877# Check whether --enable-shared was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005878if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 enableval=$enable_shared;
5880fi
5881
5882
5883if test -z "$enable_shared"
5884then
5885 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005886 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887 enable_shared="yes";;
5888 *)
5889 enable_shared="no";;
5890 esac
5891fi
Christian Heimes39258d32021-04-17 11:36:35 +02005892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5893$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894
Christian Heimes39258d32021-04-17 11:36:35 +02005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5896$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897# Check whether --enable-profiling was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005898if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005899 enableval=$enable_profiling;
5900fi
5901
5902if test "x$enable_profiling" = xyes; then
5903 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005904 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906/* end confdefs.h. */
5907int main() { return 0; }
5908_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005909if ac_fn_c_try_link "$LINENO"; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005910
Christian Heimes39258d32021-04-17 11:36:35 +02005911else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005912 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913fi
Christian Heimes39258d32021-04-17 11:36:35 +02005914rm -f core conftest.err conftest.$ac_objext \
doko@ubuntu.comba015832012-06-30 16:52:05 +02005915 conftest$ac_exeext conftest.$ac_ext
5916 CC="$ac_save_cc"
5917else
5918 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919fi
Christian Heimes39258d32021-04-17 11:36:35 +02005920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5921$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922
doko@ubuntu.comba015832012-06-30 16:52:05 +02005923if test "x$enable_profiling" = xyes; then
5924 BASECFLAGS="-pg $BASECFLAGS"
5925 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926fi
5927
Christian Heimes39258d32021-04-17 11:36:35 +02005928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5929$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930
5931# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5932# library that we build, but we do not want to link against it (we
5933# will find it with a -framework option). For this reason there is an
5934# extra variable BLDLIBRARY against which Python and the extension
5935# modules are linked, BLDLIBRARY. This is normally the same as
5936# LDLIBRARY, but empty for MacOSX framework builds.
5937if test "$enable_framework"
5938then
5939 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005940 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 BLDLIBRARY=''
5942else
5943 BLDLIBRARY='$(LDLIBRARY)'
5944fi
5945
5946# Other platforms follow
5947if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005948 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
Christian Heimes39258d32021-04-17 11:36:35 +02005950$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
5952 case $ac_sys_system in
5953 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 LDLIBRARY='libpython$(LDVERSION).dll.a'
5955 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ;;
5957 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).so'
5959 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005962 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005963 then
5964 PY3LIBRARY=libpython3.so
5965 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
pxinwrc1174262020-12-15 06:14:43 +08005967 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).so'
5969 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005970 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005972 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005973 then
5974 PY3LIBRARY=libpython3.so
5975 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 ;;
5977 hp*|HP*)
5978 case `uname -m` in
5979 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005980 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ;;
5982 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005983 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 ;;
5985 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005986 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005987 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005990 LDLIBRARY='libpython$(LDVERSION).dylib'
5991 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005992 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005994 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005995 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005996 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005997 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998
5999 esac
6000else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006001 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 case $ac_sys_system in
6003 CYGWIN*)
6004 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006005 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006 ;;
6007 esac
6008fi
6009
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006010if test "$cross_compiling" = yes; then
6011 RUNSHARED=
6012fi
6013
Christian Heimes39258d32021-04-17 11:36:35 +02006014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6015$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006018if test -n "$ac_tool_prefix"; then
6019 for ac_prog in ar aal
6020 do
6021 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6022set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6024$as_echo_n "checking for $ac_word... " >&6; }
6025if ${ac_cv_prog_AR+:} false; then :
6026 $as_echo_n "(cached) " >&6
6027else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 if test -n "$AR"; then
6029 ac_cv_prog_AR="$AR" # Let the user override the test.
6030else
6031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006038 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040 break 2
6041 fi
6042done
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044IFS=$as_save_IFS
6045
6046fi
6047fi
6048AR=$ac_cv_prog_AR
6049if test -n "$AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6051$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052else
Christian Heimes39258d32021-04-17 11:36:35 +02006053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055fi
6056
6057
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006058 test -n "$AR" && break
6059 done
6060fi
6061if test -z "$AR"; then
6062 ac_ct_AR=$AR
6063 for ac_prog in ar aal
6064do
6065 # Extract the first word of "$ac_prog", so it can be a program name with args.
6066set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6068$as_echo_n "checking for $ac_word... " >&6; }
6069if ${ac_cv_prog_ac_ct_AR+:} false; then :
6070 $as_echo_n "(cached) " >&6
6071else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006072 if test -n "$ac_ct_AR"; then
6073 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6074else
6075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076for as_dir in $PATH
6077do
6078 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006079 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006080 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006082 ac_cv_prog_ac_ct_AR="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006084 break 2
6085 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006087 done
6088IFS=$as_save_IFS
6089
6090fi
6091fi
6092ac_ct_AR=$ac_cv_prog_ac_ct_AR
6093if test -n "$ac_ct_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6095$as_echo "$ac_ct_AR" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006096else
Christian Heimes39258d32021-04-17 11:36:35 +02006097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6098$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006099fi
6100
6101
6102 test -n "$ac_ct_AR" && break
6103done
6104
6105 if test "x$ac_ct_AR" = x; then
6106 AR="ar"
6107 else
6108 case $cross_compiling:$ac_tool_warned in
6109yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006110{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6111$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006112ac_tool_warned=yes ;;
6113esac
6114 AR=$ac_ct_AR
6115 fi
6116fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117
6118
6119# tweak ARFLAGS only if the user didn't set it on the command line
6120
6121if test -z "$ARFLAGS"
6122then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006123 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124fi
6125
doko@ubuntu.com58844492012-06-30 18:25:32 +02006126if test -n "$ac_tool_prefix"; then
6127 for ac_prog in readelf
6128 do
6129 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6130set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132$as_echo_n "checking for $ac_word... " >&6; }
6133if ${ac_cv_prog_READELF+:} false; then :
6134 $as_echo_n "(cached) " >&6
6135else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006136 if test -n "$READELF"; then
6137 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6138else
6139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH
6141do
6142 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006143 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006144 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006145 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006146 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006148 break 2
6149 fi
6150done
6151 done
6152IFS=$as_save_IFS
6153
6154fi
6155fi
6156READELF=$ac_cv_prog_READELF
6157if test -n "$READELF"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6159$as_echo "$READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006160else
Christian Heimes39258d32021-04-17 11:36:35 +02006161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6162$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006163fi
6164
6165
6166 test -n "$READELF" && break
6167 done
6168fi
6169if test -z "$READELF"; then
6170 ac_ct_READELF=$READELF
6171 for ac_prog in readelf
6172do
6173 # Extract the first word of "$ac_prog", so it can be a program name with args.
6174set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6178 $as_echo_n "(cached) " >&6
6179else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006180 if test -n "$ac_ct_READELF"; then
6181 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6182else
6183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6184for as_dir in $PATH
6185do
6186 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006187 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006188 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006190 ac_cv_prog_ac_ct_READELF="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006192 break 2
6193 fi
6194done
6195 done
6196IFS=$as_save_IFS
6197
6198fi
6199fi
6200ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6201if test -n "$ac_ct_READELF"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6203$as_echo "$ac_ct_READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006204else
Christian Heimes39258d32021-04-17 11:36:35 +02006205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006207fi
6208
6209
6210 test -n "$ac_ct_READELF" && break
6211done
6212
6213 if test "x$ac_ct_READELF" = x; then
6214 READELF=":"
6215 else
6216 case $cross_compiling:$ac_tool_warned in
6217yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006218{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6219$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com58844492012-06-30 18:25:32 +02006220ac_tool_warned=yes ;;
6221esac
6222 READELF=$ac_ct_READELF
6223 fi
6224fi
6225
6226if test "$cross_compiling" = yes; then
6227 case "$READELF" in
6228 readelf|:)
6229 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6230 ;;
6231 esac
6232fi
6233
6234
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006237hp*|HP*)
6238 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239 if test -z "$INSTALL"
6240 then
6241 INSTALL="${srcdir}/install-sh -c"
6242 fi
6243esac
Christian Heimes39258d32021-04-17 11:36:35 +02006244# Find a good install program. We prefer a C program (faster),
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245# so one script is as good as another. But avoid the broken or
6246# incompatible versions:
6247# SysV /etc/install, /usr/sbin/install
6248# SunOS /usr/etc/install
6249# IRIX /sbin/install
6250# AIX /bin/install
6251# AmigaOS /C/install, which installs bootblocks on floppy discs
6252# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6253# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6254# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6255# OS/2's system install, which has a completely different semantic
6256# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006257# Reject install programs that cannot install multiple files.
Christian Heimes39258d32021-04-17 11:36:35 +02006258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6259$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260if test -z "$INSTALL"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006261if ${ac_cv_path_install+:} false; then :
6262 $as_echo_n "(cached) " >&6
6263else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH
6266do
6267 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006268 test -z "$as_dir" && as_dir=.
6269 # Account for people who put trailing slashes in PATH elements.
6270case $as_dir/ in #((
6271 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006273 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274 /usr/ucb/* ) ;;
6275 *)
6276 # OSF1 and SCO ODT 3.0 have their own names for install.
6277 # Don't use installbsd from OSF since it installs stuff as root
6278 # by default.
6279 for ac_prog in ginstall scoinst install; do
6280 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006281 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282 if test $ac_prog = install &&
Christian Heimes39258d32021-04-17 11:36:35 +02006283 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284 # AIX install. It has an incompatible calling convention.
6285 :
6286 elif test $ac_prog = install &&
Christian Heimes39258d32021-04-17 11:36:35 +02006287 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288 # program-specific install script used by HP pwplus--don't use.
6289 :
6290 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006291 rm -rf conftest.one conftest.two conftest.dir
6292 echo one > conftest.one
6293 echo two > conftest.two
6294 mkdir conftest.dir
Christian Heimes39258d32021-04-17 11:36:35 +02006295 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 test -s conftest.one && test -s conftest.two &&
6297 test -s conftest.dir/conftest.one &&
6298 test -s conftest.dir/conftest.two
6299 then
Christian Heimes39258d32021-04-17 11:36:35 +02006300 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
Matthias Kloseb9621712010-04-24 17:59:49 +00006301 break 3
6302 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303 fi
6304 fi
6305 done
6306 done
6307 ;;
6308esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006309
6310 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311IFS=$as_save_IFS
6312
Matthias Kloseb9621712010-04-24 17:59:49 +00006313rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315fi
Christian Heimes39258d32021-04-17 11:36:35 +02006316 if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 INSTALL=$ac_cv_path_install
6318 else
6319 # As a last resort, use the slow shell script. Don't cache a
6320 # value for INSTALL within a source directory, because that will
6321 # break other packages using the cache if that directory is
6322 # removed, or if the value is a relative name.
6323 INSTALL=$ac_install_sh
6324 fi
6325fi
Christian Heimes39258d32021-04-17 11:36:35 +02006326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6327$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328
6329# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6330# It thinks the first close brace ends the variable substitution.
6331test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6332
6333test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6334
6335test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6336
Christian Heimes39258d32021-04-17 11:36:35 +02006337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6338$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006339if test -z "$MKDIR_P"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006340 if ${ac_cv_path_mkdir+:} false; then :
6341 $as_echo_n "(cached) " >&6
6342else
Matthias Klose93a0ef12012-03-15 18:08:34 +01006343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6344for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6345do
6346 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006347 test -z "$as_dir" && as_dir=.
Matthias Klose93a0ef12012-03-15 18:08:34 +01006348 for ac_prog in mkdir gmkdir; do
6349 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006350 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6351 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6352 'mkdir (GNU coreutils) '* | \
6353 'mkdir (coreutils) '* | \
Matthias Klose93a0ef12012-03-15 18:08:34 +01006354 'mkdir (fileutils) '4.1*)
Christian Heimes39258d32021-04-17 11:36:35 +02006355 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
Matthias Klose93a0ef12012-03-15 18:08:34 +01006356 break 3;;
6357 esac
6358 done
6359 done
6360 done
6361IFS=$as_save_IFS
6362
6363fi
6364
6365 test -d ./--version && rmdir ./--version
Christian Heimes39258d32021-04-17 11:36:35 +02006366 if test "${ac_cv_path_mkdir+set}" = set; then
Matthias Klose93a0ef12012-03-15 18:08:34 +01006367 MKDIR_P="$ac_cv_path_mkdir -p"
6368 else
6369 # As a last resort, use the slow shell script. Don't cache a
6370 # value for MKDIR_P within a source directory, because that will
6371 # break other packages using the cache if that directory is
6372 # removed, or if the value is a relative name.
6373 MKDIR_P="$ac_install_sh -d"
6374 fi
6375fi
Christian Heimes39258d32021-04-17 11:36:35 +02006376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6377$as_echo "$MKDIR_P" >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006378
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379
6380# Not every filesystem supports hard links
6381
6382if test -z "$LN" ; then
6383 case $ac_sys_system in
6384 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385 *) LN=ln;;
6386 esac
6387fi
6388
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006389# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006390
6391ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006392
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393# Check for --with-pydebug
Christian Heimes39258d32021-04-17 11:36:35 +02006394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6395$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396
6397# Check whether --with-pydebug was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006398if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399 withval=$with_pydebug;
6400if test "$withval" != no
6401then
6402
Christian Heimes39258d32021-04-17 11:36:35 +02006403$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006404
Christian Heimes39258d32021-04-17 11:36:35 +02006405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6406$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006408 ABIFLAGS="${ABIFLAGS}d"
Christian Heimes39258d32021-04-17 11:36:35 +02006409else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411fi
Christian Heimes39258d32021-04-17 11:36:35 +02006412else
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415fi
6416
6417
Victor Stinnerf4e47032019-04-25 00:56:28 +02006418# Check for --with-trace-refs
6419# --with-trace-refs
Christian Heimes39258d32021-04-17 11:36:35 +02006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6421$as_echo_n "checking for --with-trace-refs... " >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006422
6423# Check whether --with-trace-refs was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006424if test "${with_trace_refs+set}" = set; then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02006425 withval=$with_trace_refs;
Christian Heimes39258d32021-04-17 11:36:35 +02006426else
Victor Stinnerf4e47032019-04-25 00:56:28 +02006427 with_trace_refs=no
6428fi
6429
Christian Heimes39258d32021-04-17 11:36:35 +02006430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6431$as_echo "$with_trace_refs" >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006432
6433if test "$with_trace_refs" = "yes"
6434then
6435
Christian Heimes39258d32021-04-17 11:36:35 +02006436$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
Victor Stinnerf4e47032019-04-25 00:56:28 +02006437
6438fi
6439
6440# Check for --with-assertions.
6441# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006442assertions='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6444$as_echo_n "checking for --with-assertions... " >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006445
6446# Check whether --with-assertions was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006447if test "${with_assertions+set}" = set; then :
T. Woutersddbfa2c2017-05-23 01:30:49 +02006448 withval=$with_assertions;
6449if test "$withval" != no
6450then
6451 assertions='true'
6452fi
6453fi
6454
6455if test "$assertions" = 'true'; then
Christian Heimes39258d32021-04-17 11:36:35 +02006456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6457$as_echo "yes" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006458elif test "$Py_DEBUG" = 'true'; then
6459 assertions='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6461$as_echo "implied by --with-pydebug" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006462else
Christian Heimes39258d32021-04-17 11:36:35 +02006463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006465fi
6466
Brett Cannon63d98bc2016-09-06 17:12:40 -07006467# Enable optimization flags
6468
6469
6470Py_OPT='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6472$as_echo_n "checking for --enable-optimizations... " >&6; }
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006473# Check whether --enable-optimizations was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006474if test "${enable_optimizations+set}" = set; then :
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006475 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006476if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006477then
6478 Py_OPT='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006481else
6482 Py_OPT='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006485fi
Christian Heimes39258d32021-04-17 11:36:35 +02006486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
Brett Cannon63d98bc2016-09-06 17:12:40 -07006489fi
6490
6491if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006492 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6493 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006494 # 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 +00006495 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006496 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006498 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006499 case $CC in
6500 *gcc*)
Christian Heimes39258d32021-04-17 11:36:35 +02006501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6502$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6503if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6504 $as_echo_n "(cached) " >&6
6505else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006506
6507 ax_check_save_flags=$CFLAGS
6508 CFLAGS="$CFLAGS -fno-semantic-interposition"
6509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6510/* end confdefs.h. */
6511
6512int
Christian Heimes39258d32021-04-17 11:36:35 +02006513main ()
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006514{
6515
6516 ;
6517 return 0;
6518}
6519_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02006520if ac_fn_c_try_compile "$LINENO"; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006521 ax_cv_check_cflags___fno_semantic_interposition=yes
Christian Heimes39258d32021-04-17 11:36:35 +02006522else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006523 ax_cv_check_cflags___fno_semantic_interposition=no
6524fi
Christian Heimes39258d32021-04-17 11:36:35 +02006525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006526 CFLAGS=$ax_check_save_flags
6527fi
Christian Heimes39258d32021-04-17 11:36:35 +02006528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6529$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6530if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006531
Pablo Galindob451b0e2020-10-21 22:46:52 +01006532 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6533 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006534
Christian Heimes39258d32021-04-17 11:36:35 +02006535else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006536 :
6537fi
6538
Pablo Galindob451b0e2020-10-21 22:46:52 +01006539 ;;
6540 esac
6541
6542
Brett Cannon63d98bc2016-09-06 17:12:40 -07006543else
6544 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006545 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006546 DEF_MAKE_RULE="all"
6547fi
6548
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006549
Christian Heimes39258d32021-04-17 11:36:35 +02006550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6551$as_echo_n "checking PROFILE_TASK... " >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006552if test -z "$PROFILE_TASK"
6553then
Victor Stinner67900052021-01-27 11:16:15 +01006554 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006555fi
Christian Heimes39258d32021-04-17 11:36:35 +02006556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6557$as_echo "$PROFILE_TASK" >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006558
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006559# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6560# normal names in the default $PATH (ie: Ubuntu). They exist under the
6561# non-suffixed name in their versioned llvm directory.
6562
6563llvm_bin_dir=''
6564llvm_path="${PATH}"
6565if test "${CC}" = "clang"
6566then
6567 clang_bin=`which clang`
6568 # Some systems install clang elsewhere as a symlink to the real path
6569 # which is where the related llvm tools are located.
6570 if test -L "${clang_bin}"
6571 then
6572 clang_dir=`dirname "${clang_bin}"`
6573 clang_bin=`readlink "${clang_bin}"`
6574 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6575 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6576 fi
6577fi
6578
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006579# Enable LTO flags
Christian Heimes39258d32021-04-17 11:36:35 +02006580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6581$as_echo_n "checking for --with-lto... " >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006582
6583# Check whether --with-lto was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006584if test "${with_lto+set}" = set; then :
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006585 withval=$with_lto;
6586if test "$withval" != no
6587then
6588 Py_LTO='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6590$as_echo "yes" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006591else
6592 Py_LTO='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006595fi
Christian Heimes39258d32021-04-17 11:36:35 +02006596else
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6598$as_echo "no" >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006599fi
6600
6601if test "$Py_LTO" = 'true' ; then
6602 case $CC in
6603 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006604
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006605 if test -n "$ac_tool_prefix"; then
6606 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6607set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6609$as_echo_n "checking for $ac_word... " >&6; }
6610if ${ac_cv_path_LLVM_AR+:} false; then :
6611 $as_echo_n "(cached) " >&6
6612else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006613 case $LLVM_AR in
6614 [\\/]* | ?:[\\/]*)
6615 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6616 ;;
6617 *)
6618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6619for as_dir in ${llvm_path}
6620do
6621 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006622 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006623 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6625 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006627 break 2
6628 fi
6629done
6630 done
6631IFS=$as_save_IFS
6632
6633 ;;
6634esac
6635fi
6636LLVM_AR=$ac_cv_path_LLVM_AR
6637if test -n "$LLVM_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6639$as_echo "$LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006640else
Christian Heimes39258d32021-04-17 11:36:35 +02006641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6642$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006643fi
6644
6645
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006646fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006647if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006648 ac_pt_LLVM_AR=$LLVM_AR
6649 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006650set dummy llvm-ar; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6652$as_echo_n "checking for $ac_word... " >&6; }
6653if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6654 $as_echo_n "(cached) " >&6
6655else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006656 case $ac_pt_LLVM_AR in
6657 [\\/]* | ?:[\\/]*)
6658 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6659 ;;
6660 *)
6661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6662for as_dir in ${llvm_path}
6663do
6664 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006665 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006666 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6668 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006670 break 2
6671 fi
6672done
6673 done
6674IFS=$as_save_IFS
6675
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006676 ;;
6677esac
6678fi
6679ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6680if test -n "$ac_pt_LLVM_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6682$as_echo "$ac_pt_LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006683else
Christian Heimes39258d32021-04-17 11:36:35 +02006684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006686fi
6687
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006688 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006689 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006690 else
6691 case $cross_compiling:$ac_tool_warned in
6692yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006693{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6694$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006695ac_tool_warned=yes ;;
6696esac
6697 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006698 fi
6699else
6700 LLVM_AR="$ac_cv_path_LLVM_AR"
6701fi
6702
6703
6704 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6705 then
6706 LLVM_AR_FOUND="found"
6707 else
6708 LLVM_AR_FOUND="not-found"
6709 fi
6710 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6711 then
6712 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6713 if test -n "${found_llvm_ar}"
6714 then
6715 LLVM_AR='/usr/bin/xcrun llvm-ar'
6716 LLVM_AR_FOUND=found
Christian Heimes39258d32021-04-17 11:36:35 +02006717 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6718$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006719 fi
6720 fi
6721 if test $LLVM_AR_FOUND = not-found
6722 then
6723 LLVM_PROFR_ERR=yes
6724 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6725 else
6726 LLVM_AR_ERR=no
6727 fi
6728 AR="${LLVM_AR}"
6729 case $ac_sys_system in
6730 Darwin*)
6731 # Any changes made here should be reflected in the GCC+Darwin case below
6732 LTOFLAGS="-flto -Wl,-export_dynamic"
6733 ;;
6734 *)
6735 LTOFLAGS="-flto"
6736 ;;
6737 esac
6738 ;;
6739 *gcc*)
6740 case $ac_sys_system in
6741 Darwin*)
6742 LTOFLAGS="-flto -Wl,-export_dynamic"
6743 ;;
6744 *)
6745 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6746 ;;
6747 esac
6748 ;;
6749 esac
6750
6751 if test "$ac_cv_prog_cc_g" = "yes"
6752 then
6753 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6754 # to get debug symbols.
6755 LTOFLAGS="$LTOFLAGS -g"
6756 fi
6757
stratakisf92c7aa2018-12-04 15:54:01 +01006758 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006759 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006760fi
6761
6762# Enable PGO flags.
6763
6764
6765
6766
6767
6768
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006769if test -n "$ac_tool_prefix"; then
6770 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6771set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6773$as_echo_n "checking for $ac_word... " >&6; }
6774if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6775 $as_echo_n "(cached) " >&6
6776else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006777 case $LLVM_PROFDATA in
6778 [\\/]* | ?:[\\/]*)
6779 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6780 ;;
6781 *)
6782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6783for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784do
6785 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006786 test -z "$as_dir" && as_dir=.
Brett Cannon7188a3e2015-09-18 15:13:44 -07006787 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6789 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07006791 break 2
6792 fi
6793done
6794 done
6795IFS=$as_save_IFS
6796
Gregory P. Smith799520c2016-09-07 16:10:00 -07006797 ;;
6798esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006799fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6801if test -n "$LLVM_PROFDATA"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6803$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006804else
Christian Heimes39258d32021-04-17 11:36:35 +02006805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6806$as_echo "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006807fi
6808
6809
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006810fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006811if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006812 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6813 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006814set dummy llvm-profdata; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816$as_echo_n "checking for $ac_word... " >&6; }
6817if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6818 $as_echo_n "(cached) " >&6
6819else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 case $ac_pt_LLVM_PROFDATA in
6821 [\\/]* | ?:[\\/]*)
6822 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6823 ;;
6824 *)
6825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826for as_dir in ${llvm_path}
6827do
6828 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006829 test -z "$as_dir" && as_dir=.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006830 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006834 break 2
6835 fi
6836done
6837 done
6838IFS=$as_save_IFS
6839
Gregory P. Smith799520c2016-09-07 16:10:00 -07006840 ;;
6841esac
6842fi
6843ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6844if test -n "$ac_pt_LLVM_PROFDATA"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6846$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006847else
Christian Heimes39258d32021-04-17 11:36:35 +02006848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849$as_echo "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006850fi
6851
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006852 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006853 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006854 else
6855 case $cross_compiling:$ac_tool_warned in
6856yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006859ac_tool_warned=yes ;;
6860esac
6861 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006862 fi
6863else
6864 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6865fi
6866
6867
6868if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6869then
6870 LLVM_PROF_FOUND="found"
6871else
6872 LLVM_PROF_FOUND="not-found"
6873fi
6874if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6875then
6876 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6877 if test -n "${found_llvm_profdata}"
6878 then
6879 # llvm-profdata isn't directly in $PATH in some cases.
6880 # https://apple.stackexchange.com/questions/197053/
6881 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6882 LLVM_PROF_FOUND=found
Christian Heimes39258d32021-04-17 11:36:35 +02006883 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6884$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07006885 fi
6886fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006887LLVM_PROF_ERR=no
6888case $CC in
6889 *clang*)
6890 # Any changes made here should be reflected in the GCC+Darwin case below
6891 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6892 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006893 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006894 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6895 if test $LLVM_PROF_FOUND = not-found
6896 then
6897 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006898 if test "${REQUIRE_PGO}" = "yes"
6899 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006900 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 -07006901 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006902 fi
6903 ;;
6904 *gcc*)
6905 case $ac_sys_system in
6906 Darwin*)
6907 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6908 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006909 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006910 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006911 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006912 then
6913 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006914 if test "${REQUIRE_PGO}" = "yes"
6915 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006916 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 -07006917 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006918 fi
6919 ;;
6920 *)
6921 PGO_PROF_GEN_FLAG="-fprofile-generate"
6922 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6923 LLVM_PROF_MERGER="true"
6924 LLVM_PROF_FILE=""
6925 ;;
6926 esac
6927 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006928 *icc*)
6929 PGO_PROF_GEN_FLAG="-prof-gen"
6930 PGO_PROF_USE_FLAG="-prof-use"
6931 LLVM_PROF_MERGER="true"
6932 LLVM_PROF_FILE=""
6933 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006934esac
6935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6937# merged with this chunk of code?
6938
6939# Optimizer/debugger flags
6940# ------------------------
6941# (The following bit of code is complicated enough - please keep things
6942# indented properly. Just pretend you're editing Python code. ;-)
6943
6944# There are two parallel sets of case statements below, one that checks to
6945# see if OPT was set and one that does BASECFLAGS setting based upon
6946# compiler and platform. BASECFLAGS tweaks need to be made even if the
6947# user set OPT.
6948
Victor Stinner23a683a2019-04-12 21:27:37 +02006949case $CC in
6950 *clang*)
6951 cc_is_clang=1
6952 ;;
6953 *)
6954 if $CC --version 2>&1 | grep -q clang
6955 then
6956 cc_is_clang=1
6957 else
6958 cc_is_clang=
6959 fi
6960esac
6961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962# tweak OPT based on compiler and platform, only if the user didn't set
6963# it on the command line
6964
Victor Stinner9ed34a82017-05-02 22:35:58 +02006965
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006966if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967then
6968 case $GCC in
6969 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6971 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6972 WRAP="-fwrapv"
6973 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006974
Victor Stinner35f3d242017-04-21 12:35:24 +02006975 if test -n "${cc_is_clang}"
6976 then
6977 # Clang also needs -fwrapv
6978 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006979 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6980 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006981 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006982 fi
6983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 case $ac_cv_prog_cc_g in
6985 yes)
6986 if test "$Py_DEBUG" = 'true' ; then
6987 # Optimization messes up debuggers, so turn it off for
6988 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006989 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006990 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006991 else
Victor Stinner28205b22017-04-21 11:24:34 +02006992 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006993 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994 else
Victor Stinner28205b22017-04-21 11:24:34 +02006995 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006996 fi
6997 ;;
6998 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006999 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 ;;
7001 esac
Victor Stinner28205b22017-04-21 11:24:34 +02007002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007003 case $ac_sys_system in
7004 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7005 ;;
7006 esac
7007 ;;
7008
7009 *)
7010 OPT="-O"
7011 ;;
7012 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013fi
7014
7015
7016
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007017
stratakiscf10a752018-12-19 18:19:01 +01007018
Ronald Oussoren41761932020-11-08 10:05:27 +01007019# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020UNIVERSAL_ARCH_FLAGS=
7021
7022
7023# tweak BASECFLAGS based on compiler and platform
7024case $GCC in
7025yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007026 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007027
Christian Heimes39258d32021-04-17 11:36:35 +02007028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7029$as_echo_n "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007030 ac_save_cc="$CC"
7031 CC="$CC -Wextra -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007032 if ${ac_cv_extra_warnings+:} false; then :
7033 $as_echo_n "(cached) " >&6
7034else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7036/* end confdefs.h. */
7037
7038
7039int
Christian Heimes39258d32021-04-17 11:36:35 +02007040main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007041{
7042
7043 ;
7044 return 0;
7045}
7046
7047_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007048if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007049
7050 ac_cv_extra_warnings=yes
7051
Christian Heimes39258d32021-04-17 11:36:35 +02007052else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007053
7054 ac_cv_extra_warnings=no
7055
7056fi
Christian Heimes39258d32021-04-17 11:36:35 +02007057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007058fi
7059
7060 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7062$as_echo "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007063
7064 if test $ac_cv_extra_warnings = yes
7065 then
7066 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7067 fi
7068
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007069 # Python doesn't violate C99 aliasing rules, but older versions of
7070 # GCC produce warnings for legal Python code. Enable
7071 # -fno-strict-aliasing on versions of GCC that support but produce
7072 # warnings. See Issue3326
Christian Heimes39258d32021-04-17 11:36:35 +02007073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7074$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007075 ac_save_cc="$CC"
7076 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007077 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007078 if ${ac_cv_no_strict_aliasing+:} false; then :
7079 $as_echo_n "(cached) " >&6
7080else
Matthias Kloseb9621712010-04-24 17:59:49 +00007081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007082/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007083
Matthias Kloseb159a552010-04-25 21:00:44 +00007084
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007085int
Christian Heimes39258d32021-04-17 11:36:35 +02007086main ()
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007087{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007088
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007089 ;
7090 return 0;
7091}
Matthias Kloseb159a552010-04-25 21:00:44 +00007092
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007093_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007094if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007095
7096 CC="$ac_save_cc -fstrict-aliasing"
7097 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007099/* end confdefs.h. */
7100
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007101 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007102int
Christian Heimes39258d32021-04-17 11:36:35 +02007103main ()
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007104{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007105double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007106 ;
7107 return 0;
7108}
Matthias Kloseb159a552010-04-25 21:00:44 +00007109
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007110_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007111if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007112
7113 ac_cv_no_strict_aliasing=no
7114
Christian Heimes39258d32021-04-17 11:36:35 +02007115else
Matthias Kloseb159a552010-04-25 21:00:44 +00007116
7117 ac_cv_no_strict_aliasing=yes
7118
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007119fi
Christian Heimes39258d32021-04-17 11:36:35 +02007120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007121
Christian Heimes39258d32021-04-17 11:36:35 +02007122else
Matthias Kloseb159a552010-04-25 21:00:44 +00007123
7124 ac_cv_no_strict_aliasing=no
7125
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007126fi
Christian Heimes39258d32021-04-17 11:36:35 +02007127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007128fi
7129
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007130 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007131 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7133$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007134 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007135 then
7136 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7137 fi
7138
Zachary Ware5af85642015-12-21 12:09:17 -06007139 # ICC doesn't recognize the option, but only emits a warning
7140 ## XXX does it emit an unused result warning and can it be disabled?
7141 case "$CC" in
7142 *icc*)
7143 ac_cv_disable_unused_result_warning=no
7144 ;;
7145 *)
Christian Heimes39258d32021-04-17 11:36:35 +02007146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7147$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007148 ac_save_cc="$CC"
7149 CC="$CC -Wunused-result -Werror"
7150 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007151 if ${ac_cv_disable_unused_result_warning+:} false; then :
7152 $as_echo_n "(cached) " >&6
7153else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7155/* end confdefs.h. */
7156
7157
7158int
Christian Heimes39258d32021-04-17 11:36:35 +02007159main ()
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007160{
7161
7162 ;
7163 return 0;
7164}
7165
7166_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007167if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007168
7169 ac_cv_disable_unused_result_warning=yes
7170
Christian Heimes39258d32021-04-17 11:36:35 +02007171else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007172
7173 ac_cv_disable_unused_result_warning=no
7174
7175fi
Christian Heimes39258d32021-04-17 11:36:35 +02007176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007177fi
7178
7179 CFLAGS="$save_CFLAGS"
7180 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7182$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007183 ;;
7184 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007185
7186 if test $ac_cv_disable_unused_result_warning = yes
7187 then
7188 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007189 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7190 fi
7191
Christian Heimes39258d32021-04-17 11:36:35 +02007192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7193$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007194 ac_save_cc="$CC"
7195 CC="$CC -Wunused-parameter -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007196 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7197 $as_echo_n "(cached) " >&6
7198else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h. */
7201
7202
7203int
Christian Heimes39258d32021-04-17 11:36:35 +02007204main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007205{
7206
7207 ;
7208 return 0;
7209}
7210
7211_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007212if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007213
7214 ac_cv_disable_unused_parameter_warning=yes
7215
Christian Heimes39258d32021-04-17 11:36:35 +02007216else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007217
7218 ac_cv_disable_unused_parameter_warning=no
7219
7220fi
Christian Heimes39258d32021-04-17 11:36:35 +02007221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007222fi
7223
7224 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7226$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007227
7228 if test $ac_cv_disable_unused_parameter_warning = yes
7229 then
7230 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7231 fi
7232
Christian Heimes39258d32021-04-17 11:36:35 +02007233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7234$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007235 ac_save_cc="$CC"
7236 CC="$CC -Wmissing-field-initializers -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007237 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7238 $as_echo_n "(cached) " >&6
7239else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241/* end confdefs.h. */
7242
7243
7244int
Christian Heimes39258d32021-04-17 11:36:35 +02007245main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007246{
7247
7248 ;
7249 return 0;
7250}
7251
7252_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007253if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007254
7255 ac_cv_disable_missing_field_initializers=yes
7256
Christian Heimes39258d32021-04-17 11:36:35 +02007257else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007258
7259 ac_cv_disable_missing_field_initializers=no
7260
7261fi
Christian Heimes39258d32021-04-17 11:36:35 +02007262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007263fi
7264
7265 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7267$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007268
7269 if test $ac_cv_disable_missing_field_initializers = yes
7270 then
7271 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007272 fi
7273
Christian Heimes39258d32021-04-17 11:36:35 +02007274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7275$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007276 ac_save_cc="$CC"
7277 CC="$CC -Wsign-compare"
7278 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007279 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7280 $as_echo_n "(cached) " >&6
7281else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7283/* end confdefs.h. */
7284
7285
7286int
Christian Heimes39258d32021-04-17 11:36:35 +02007287main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007288{
7289
7290 ;
7291 return 0;
7292}
7293
7294_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007295if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007296
7297 ac_cv_enable_sign_compare_warning=yes
7298
Christian Heimes39258d32021-04-17 11:36:35 +02007299else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007300
7301 ac_cv_enable_sign_compare_warning=no
7302
7303fi
Christian Heimes39258d32021-04-17 11:36:35 +02007304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007305fi
7306
7307 CFLAGS="$save_CFLAGS"
7308 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7310$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007311
7312 if test $ac_cv_enable_sign_compare_warning = yes
7313 then
7314 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7315 fi
7316
Christian Heimes39258d32021-04-17 11:36:35 +02007317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7318$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007319 ac_save_cc="$CC"
7320 CC="$CC -Wunreachable-code"
7321 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007322 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7323 $as_echo_n "(cached) " >&6
7324else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7326/* end confdefs.h. */
7327
7328
7329int
Christian Heimes39258d32021-04-17 11:36:35 +02007330main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007331{
7332
7333 ;
7334 return 0;
7335}
7336
7337_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007338if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007339
7340 ac_cv_enable_unreachable_code_warning=yes
7341
Christian Heimes39258d32021-04-17 11:36:35 +02007342else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007343
7344 ac_cv_enable_unreachable_code_warning=no
7345
7346fi
Christian Heimes39258d32021-04-17 11:36:35 +02007347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007348fi
7349
7350 CFLAGS="$save_CFLAGS"
7351 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007352
7353 # Don't enable unreachable code warning in debug mode, since it usually
7354 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007355 # Issue #24324: Unfortunately, the unreachable code warning does not work
7356 # correctly on gcc and has been silently removed from the compiler.
7357 # It is supported on clang but on OS X systems gcc may be an alias
7358 # for clang. Try to determine if the compiler is not really gcc and,
7359 # if so, only then enable the warning.
7360 if test $ac_cv_enable_unreachable_code_warning = yes && \
7361 test "$Py_DEBUG" != "true" && \
7362 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007363 then
7364 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007365 else
7366 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007367 fi
Christian Heimes39258d32021-04-17 11:36:35 +02007368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7369$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007370
Christian Heimes39258d32021-04-17 11:36:35 +02007371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7372$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007373 ac_save_cc="$CC"
7374 CC="$CC -Werror -Wstrict-prototypes"
Christian Heimes39258d32021-04-17 11:36:35 +02007375 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7376 $as_echo_n "(cached) " >&6
7377else
INADA Naokie3364842018-06-05 20:40:53 +09007378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7379/* end confdefs.h. */
7380
7381
7382int
Christian Heimes39258d32021-04-17 11:36:35 +02007383main ()
INADA Naokie3364842018-06-05 20:40:53 +09007384{
7385
7386 ;
7387 return 0;
7388}
7389
7390_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007391if ac_fn_c_try_compile "$LINENO"; then :
INADA Naokie3364842018-06-05 20:40:53 +09007392
7393 ac_cv_enable_strict_prototypes_warning=yes
7394
Christian Heimes39258d32021-04-17 11:36:35 +02007395else
INADA Naokie3364842018-06-05 20:40:53 +09007396
7397 ac_cv_enable_strict_prototypes_warning=no
7398
7399fi
Christian Heimes39258d32021-04-17 11:36:35 +02007400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09007401fi
7402
7403 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7405$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007406
7407 if test $ac_cv_enable_strict_prototypes_warning = yes
7408 then
7409 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7410 fi
7411
Christian Heimes39258d32021-04-17 11:36:35 +02007412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7413$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007414 ac_save_cc="$CC"
7415 CC="$CC -Werror=implicit-function-declaration"
Christian Heimes39258d32021-04-17 11:36:35 +02007416 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7417 $as_echo_n "(cached) " >&6
7418else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7420/* end confdefs.h. */
7421
7422
7423int
Christian Heimes39258d32021-04-17 11:36:35 +02007424main ()
Victor Stinner193ee0a2017-02-06 14:24:00 +01007425{
7426
7427 ;
7428 return 0;
7429}
7430
7431_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007432if ac_fn_c_try_compile "$LINENO"; then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01007433
7434 ac_cv_enable_implicit_function_declaration_error=yes
7435
Christian Heimes39258d32021-04-17 11:36:35 +02007436else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007437
7438 ac_cv_enable_implicit_function_declaration_error=no
7439
7440fi
Christian Heimes39258d32021-04-17 11:36:35 +02007441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01007442fi
7443
7444 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7446$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007447
7448 if test $ac_cv_enable_implicit_function_declaration_error = yes
7449 then
7450 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7451 fi
7452
Christian Heimes39258d32021-04-17 11:36:35 +02007453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7454$as_echo_n "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007455 ac_save_cc="$CC"
7456 CC="$CC -fvisibility=hidden"
Christian Heimes39258d32021-04-17 11:36:35 +02007457 if ${ac_cv_enable_visibility+:} false; then :
7458 $as_echo_n "(cached) " >&6
7459else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7461/* end confdefs.h. */
7462
7463
7464int
Christian Heimes39258d32021-04-17 11:36:35 +02007465main ()
Vinay Sajip0b60f642019-10-15 08:26:12 +01007466{
7467
7468 ;
7469 return 0;
7470}
7471
7472_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007473if ac_fn_c_try_compile "$LINENO"; then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01007474
7475 ac_cv_enable_visibility=yes
7476
Christian Heimes39258d32021-04-17 11:36:35 +02007477else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007478
7479 ac_cv_enable_visibility=no
7480
7481fi
Christian Heimes39258d32021-04-17 11:36:35 +02007482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01007483fi
7484
7485 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7487$as_echo "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007488
7489 if test $ac_cv_enable_visibility = yes
7490 then
7491 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7492 fi
7493
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7495 # support. Without this, treatment of subnormals doesn't follow
7496 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007497 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498 alpha*)
7499 BASECFLAGS="$BASECFLAGS -mieee"
7500 ;;
7501 esac
7502
7503 case $ac_sys_system in
7504 SCO_SV*)
7505 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7506 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007507
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 Darwin*)
7509 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7510 # used to be here, but non-Apple gcc doesn't accept them.
7511 if test "${CC}" = gcc
7512 then
Christian Heimes39258d32021-04-17 11:36:35 +02007513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
7514$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007515 case "${UNIVERSALSDK}" in
7516 */MacOSX10.4u.sdk)
7517 # Build using 10.4 SDK, force usage of gcc when the
7518 # compiler is gcc, otherwise the user will get very
7519 # confusing error messages when building on OSX 10.6
7520 CC=gcc-4.0
7521 CPP=cpp-4.0
7522 ;;
7523 esac
Christian Heimes39258d32021-04-17 11:36:35 +02007524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7525$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007526 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527
Ned Deily0cb33da2021-05-02 04:48:29 -04007528 LIPO_INTEL64_FLAGS=""
Ned Deily87adb6e2013-10-18 21:09:56 -07007529 if test "${enable_universalsdk}"
7530 then
7531 case "$UNIVERSAL_ARCHS" in
7532 32-bit)
7533 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7534 LIPO_32BIT_FLAGS=""
7535 ARCH_RUN_32BIT=""
7536 ;;
7537 64-bit)
7538 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7539 LIPO_32BIT_FLAGS=""
7540 ARCH_RUN_32BIT="true"
7541 ;;
7542 all)
7543 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7544 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7545 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7546 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007547 universal2)
7548 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7549 LIPO_32BIT_FLAGS=""
Ned Deily0cb33da2021-05-02 04:48:29 -04007550 LIPO_INTEL64_FLAGS="-extract x86_64"
Ronald Oussoren41761932020-11-08 10:05:27 +01007551 ARCH_RUN_32BIT="true"
Ned Deily0cb33da2021-05-02 04:48:29 -04007552 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007553 intel)
7554 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7555 LIPO_32BIT_FLAGS="-extract i386"
7556 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7557 ;;
7558 intel-32)
7559 UNIVERSAL_ARCH_FLAGS="-arch i386"
7560 LIPO_32BIT_FLAGS=""
7561 ARCH_RUN_32BIT=""
7562 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007563 intel-64)
7564 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7565 LIPO_32BIT_FLAGS=""
7566 ARCH_RUN_32BIT="true"
7567 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007568 3-way)
7569 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7570 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7571 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7572 ;;
7573 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007574 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 -07007575 ;;
7576 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577
Ned Deily87adb6e2013-10-18 21:09:56 -07007578 if test "${UNIVERSALSDK}" != "/"
7579 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007580 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7581 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007582 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007583 else
7584 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7585 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007586 fi
7587 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588
Ned Deily87adb6e2013-10-18 21:09:56 -07007589 # Calculate an appropriate deployment target for this build:
7590 # The deployment target value is used explicitly to enable certain
7591 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007592 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007593 # component of the string returned by distutils.get_platform().
7594 #
7595 # Use the value from:
7596 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7597 # 2. the operating system version of the build machine if >= 10.6
7598 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7599 # below to pick either 10.3, 10.4, or 10.5 as the target.
7600 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601
Christian Heimes39258d32021-04-17 11:36:35 +02007602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7603$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007604 cur_target_major=`sw_vers -productVersion | \
7605 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7606 cur_target_minor=`sw_vers -productVersion | \
7607 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7608 cur_target="${cur_target_major}.${cur_target_minor}"
7609 if test ${cur_target_major} -eq 10 && \
7610 test ${cur_target_minor} -ge 3 && \
7611 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007612 then
Ned Deily36820b62014-06-25 13:44:22 -07007613 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007614 cur_target=10.3
7615 if test ${enable_universalsdk}
7616 then
7617 case "$UNIVERSAL_ARCHS" in
7618 all|3-way|intel|64-bit)
7619 # These configurations were first supported in 10.5
7620 cur_target='10.5'
7621 ;;
7622 esac
7623 else
7624 if test `/usr/bin/arch` = "i386"
7625 then
7626 # 10.4 was the first release to support Intel archs
7627 cur_target="10.4"
7628 fi
7629 fi
7630 fi
7631 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007632
Ned Deily87adb6e2013-10-18 21:09:56 -07007633 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7634 # environment with a value that is the same as what we'll use
7635 # in the Makefile to ensure that we'll get the same compiler
7636 # environment during configure and build time.
7637 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7638 export MACOSX_DEPLOYMENT_TARGET
7639 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Christian Heimes39258d32021-04-17 11:36:35 +02007640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7641$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007642
Christian Heimes39258d32021-04-17 11:36:35 +02007643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7644$as_echo_n "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7646/* end confdefs.h. */
7647#include <stdio.h>
7648int
Christian Heimes39258d32021-04-17 11:36:35 +02007649main ()
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007650{
7651printf("%d", 42);
7652 ;
7653 return 0;
7654}
7655_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007656if ac_fn_c_try_link "$LINENO"; then :
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7658$as_echo "yes" >&6; }
7659else
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7661$as_echo "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007662 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7663
7664fi
Christian Heimes39258d32021-04-17 11:36:35 +02007665rm -f core conftest.err conftest.$ac_objext \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007666 conftest$ac_exeext conftest.$ac_ext
7667
Ned Deily87adb6e2013-10-18 21:09:56 -07007668 # end of Darwin* tests
7669 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670 esac
7671 ;;
7672
7673*)
7674 case $ac_sys_system in
7675 OpenUNIX*|UnixWare*)
7676 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7677 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678 SCO_SV*)
7679 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7680 ;;
7681 esac
7682 ;;
7683esac
7684
Zachary Ware5af85642015-12-21 12:09:17 -06007685case "$CC" in
7686*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007687 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007688 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7689 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007690*xlc*)
7691 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7692 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007693esac
7694
T. Woutersddbfa2c2017-05-23 01:30:49 +02007695if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696 :
7697else
7698 OPT="-DNDEBUG $OPT"
7699fi
7700
7701if test "$ac_arch_flags"
7702then
7703 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7704fi
7705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706# On some compilers, pthreads are available without further options
7707# (e.g. MacOS X). On some of these systems, the compiler will not
7708# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7709# So we have to see first whether pthreads are available without
7710# options before we can check whether -Kpthread improves anything.
Christian Heimes39258d32021-04-17 11:36:35 +02007711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7712$as_echo_n "checking whether pthreads are available without options... " >&6; }
7713if ${ac_cv_pthread_is_default+:} false; then :
7714 $as_echo_n "(cached) " >&6
7715else
7716 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717 ac_cv_pthread_is_default=no
Christian Heimes39258d32021-04-17 11:36:35 +02007718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720/* end confdefs.h. */
7721
Stefan Krah7dba5942012-11-22 22:49:11 +01007722#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723#include <pthread.h>
7724
7725void* routine(void* p){return NULL;}
7726
7727int main(){
7728 pthread_t p;
7729 if(pthread_create(&p,NULL,routine,NULL)!=0)
7730 return 1;
7731 (void)pthread_detach(p);
7732 return 0;
7733}
7734
7735_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007736if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737
7738 ac_cv_pthread_is_default=yes
7739 ac_cv_kthread=no
7740 ac_cv_pthread=no
7741
Christian Heimes39258d32021-04-17 11:36:35 +02007742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747fi
7748
7749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750fi
7751
Christian Heimes39258d32021-04-17 11:36:35 +02007752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7753$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754
7755
7756if test $ac_cv_pthread_is_default = yes
7757then
7758 ac_cv_kpthread=no
7759else
7760# -Kpthread, if available, provides the right #defines
7761# and linker options to make pthread_create available
7762# Some compilers won't report that they do not support -Kpthread,
7763# so we need to run a program to see whether it really made the
7764# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7766$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
7767if ${ac_cv_kpthread+:} false; then :
7768 $as_echo_n "(cached) " >&6
7769else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770 ac_save_cc="$CC"
7771CC="$CC -Kpthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007772if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007773 ac_cv_kpthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776/* end confdefs.h. */
7777
Stefan Krah7dba5942012-11-22 22:49:11 +01007778#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779#include <pthread.h>
7780
7781void* routine(void* p){return NULL;}
7782
7783int main(){
7784 pthread_t p;
7785 if(pthread_create(&p,NULL,routine,NULL)!=0)
7786 return 1;
7787 (void)pthread_detach(p);
7788 return 0;
7789}
7790
7791_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007792if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793 ac_cv_kpthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007794else
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799fi
7800
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801CC="$ac_save_cc"
7802fi
7803
Christian Heimes39258d32021-04-17 11:36:35 +02007804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7805$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007806fi
7807
7808if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7809then
7810# -Kthread, if available, provides the right #defines
7811# and linker options to make pthread_create available
7812# Some compilers won't report that they do not support -Kthread,
7813# so we need to run a program to see whether it really made the
7814# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7816$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
7817if ${ac_cv_kthread+:} false; then :
7818 $as_echo_n "(cached) " >&6
7819else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820 ac_save_cc="$CC"
7821CC="$CC -Kthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007822if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823 ac_cv_kthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007824else
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007826/* end confdefs.h. */
7827
Stefan Krah7dba5942012-11-22 22:49:11 +01007828#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007829#include <pthread.h>
7830
7831void* routine(void* p){return NULL;}
7832
7833int main(){
7834 pthread_t p;
7835 if(pthread_create(&p,NULL,routine,NULL)!=0)
7836 return 1;
7837 (void)pthread_detach(p);
7838 return 0;
7839}
7840
7841_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007842if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843 ac_cv_kthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007844else
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849fi
7850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851CC="$ac_save_cc"
7852fi
7853
Christian Heimes39258d32021-04-17 11:36:35 +02007854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7855$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856fi
7857
7858if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7859then
7860# -pthread, if available, provides the right #defines
7861# and linker options to make pthread_create available
7862# Some compilers won't report that they do not support -pthread,
7863# so we need to run a program to see whether it really made the
7864# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7866$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
7867if ${ac_cv_pthread+:} false; then :
7868 $as_echo_n "(cached) " >&6
7869else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007870 ac_save_cc="$CC"
7871CC="$CC -pthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007872if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007873 ac_cv_pthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007874else
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876/* end confdefs.h. */
7877
Stefan Krah7dba5942012-11-22 22:49:11 +01007878#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879#include <pthread.h>
7880
7881void* routine(void* p){return NULL;}
7882
7883int main(){
7884 pthread_t p;
7885 if(pthread_create(&p,NULL,routine,NULL)!=0)
7886 return 1;
7887 (void)pthread_detach(p);
7888 return 0;
7889}
7890
7891_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893 ac_cv_pthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007894else
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007899fi
7900
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007901CC="$ac_save_cc"
7902fi
7903
Christian Heimes39258d32021-04-17 11:36:35 +02007904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7905$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007906fi
7907
7908# If we have set a CC compiler flag for thread support then
7909# check if it works for CXX, too.
7910ac_cv_cxx_thread=no
7911if test ! -z "$CXX"
7912then
Christian Heimes39258d32021-04-17 11:36:35 +02007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7914$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007915ac_save_cxx="$CXX"
7916
7917if test "$ac_cv_kpthread" = "yes"
7918then
7919 CXX="$CXX -Kpthread"
7920 ac_cv_cxx_thread=yes
7921elif test "$ac_cv_kthread" = "yes"
7922then
7923 CXX="$CXX -Kthread"
7924 ac_cv_cxx_thread=yes
7925elif test "$ac_cv_pthread" = "yes"
7926then
7927 CXX="$CXX -pthread"
7928 ac_cv_cxx_thread=yes
7929fi
7930
7931if test $ac_cv_cxx_thread = yes
7932then
7933 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7934 $CXX -c conftest.$ac_ext 2>&5
7935 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7936 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7937 then
7938 ac_cv_cxx_thread=yes
7939 else
7940 ac_cv_cxx_thread=no
7941 fi
7942 rm -fr conftest*
7943fi
Christian Heimes39258d32021-04-17 11:36:35 +02007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7945$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007946fi
7947CXX="$ac_save_cxx"
7948
7949
7950# checks for header files
Christian Heimes39258d32021-04-17 11:36:35 +02007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7952$as_echo_n "checking for ANSI C header files... " >&6; }
7953if ${ac_cv_header_stdc+:} false; then :
7954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007955else
Christian Heimes39258d32021-04-17 11:36:35 +02007956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7957/* end confdefs.h. */
7958#include <stdlib.h>
7959#include <stdarg.h>
7960#include <string.h>
7961#include <float.h>
Pablo Galindocc128882021-03-01 16:47:53 +00007962
Christian Heimes39258d32021-04-17 11:36:35 +02007963int
7964main ()
7965{
Pablo Galindo53e55292021-04-05 17:38:40 +01007966
Christian Heimes39258d32021-04-17 11:36:35 +02007967 ;
7968 return 0;
7969}
7970_ACEOF
7971if ac_fn_c_try_compile "$LINENO"; then :
7972 ac_cv_header_stdc=yes
7973else
7974 ac_cv_header_stdc=no
Pablo Galindocc128882021-03-01 16:47:53 +00007975fi
Christian Heimes39258d32021-04-17 11:36:35 +02007976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +00007977
Christian Heimes39258d32021-04-17 11:36:35 +02007978if test $ac_cv_header_stdc = yes; then
7979 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7981/* end confdefs.h. */
7982#include <string.h>
Pablo Galindocc128882021-03-01 16:47:53 +00007983
Christian Heimes39258d32021-04-17 11:36:35 +02007984_ACEOF
7985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7986 $EGREP "memchr" >/dev/null 2>&1; then :
Pablo Galindocc128882021-03-01 16:47:53 +00007987
Christian Heimes39258d32021-04-17 11:36:35 +02007988else
7989 ac_cv_header_stdc=no
Pablo Galindocc128882021-03-01 16:47:53 +00007990fi
Christian Heimes39258d32021-04-17 11:36:35 +02007991rm -f conftest*
Pablo Galindocc128882021-03-01 16:47:53 +00007992
Pablo Galindo53e55292021-04-05 17:38:40 +01007993fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007994
Christian Heimes39258d32021-04-17 11:36:35 +02007995if test $ac_cv_header_stdc = yes; then
7996 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7998/* end confdefs.h. */
7999#include <stdlib.h>
Pablo Galindo53e55292021-04-05 17:38:40 +01008000
Christian Heimes39258d32021-04-17 11:36:35 +02008001_ACEOF
8002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8003 $EGREP "free" >/dev/null 2>&1; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01008004
Christian Heimes39258d32021-04-17 11:36:35 +02008005else
8006 ac_cv_header_stdc=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008007fi
Christian Heimes39258d32021-04-17 11:36:35 +02008008rm -f conftest*
Pablo Galindo53e55292021-04-05 17:38:40 +01008009
8010fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008011
Christian Heimes39258d32021-04-17 11:36:35 +02008012if test $ac_cv_header_stdc = yes; then
8013 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8014 if test "$cross_compiling" = yes; then :
8015 :
8016else
8017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8018/* end confdefs.h. */
8019#include <ctype.h>
8020#include <stdlib.h>
8021#if ((' ' & 0x0FF) == 0x020)
8022# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8023# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8024#else
8025# define ISLOWER(c) \
8026 (('a' <= (c) && (c) <= 'i') \
8027 || ('j' <= (c) && (c) <= 'r') \
8028 || ('s' <= (c) && (c) <= 'z'))
8029# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8030#endif
Pablo Galindo53e55292021-04-05 17:38:40 +01008031
Christian Heimes39258d32021-04-17 11:36:35 +02008032#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8033int
8034main ()
8035{
8036 int i;
8037 for (i = 0; i < 256; i++)
8038 if (XOR (islower (i), ISLOWER (i))
8039 || toupper (i) != TOUPPER (i))
8040 return 2;
8041 return 0;
8042}
8043_ACEOF
8044if ac_fn_c_try_run "$LINENO"; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01008045
Christian Heimes39258d32021-04-17 11:36:35 +02008046else
8047 ac_cv_header_stdc=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008048fi
Christian Heimes39258d32021-04-17 11:36:35 +02008049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +01008051fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008052
8053fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008054fi
Christian Heimes39258d32021-04-17 11:36:35 +02008055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8056$as_echo "$ac_cv_header_stdc" >&6; }
8057if test $ac_cv_header_stdc = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01008058
Christian Heimes39258d32021-04-17 11:36:35 +02008059$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01008060
8061fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008062
Christian Heimes39258d32021-04-17 11:36:35 +02008063for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
8064fcntl.h grp.h \
8065ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
8066sched.h shadow.h signal.h stropts.h termios.h \
8067utime.h \
8068poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
8069sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
8070sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
8071sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
8072sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
8073sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
8074libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
8075linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
8076sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8077sys/mman.h sys/eventfd.h
8078do :
8079 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8080ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8081if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8082 cat >>confdefs.h <<_ACEOF
8083#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8084_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008085
8086fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008087
Christian Heimes39258d32021-04-17 11:36:35 +02008088done
Guido van Rossum627b2d71993-12-24 10:39:16 +00008089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008090ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008091for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Christian Heimes39258d32021-04-17 11:36:35 +02008092 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8094$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8095if eval \${$as_ac_Header+:} false; then :
8096 $as_echo_n "(cached) " >&6
8097else
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008099/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008100#include <sys/types.h>
8101#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008102
Martin v. Löwis11437992002-04-12 09:54:03 +00008103int
Christian Heimes39258d32021-04-17 11:36:35 +02008104main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008105{
8106if ((DIR *) 0)
8107return 0;
8108 ;
8109 return 0;
8110}
8111_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008112if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 eval "$as_ac_Header=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02008114else
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116fi
Christian Heimes39258d32021-04-17 11:36:35 +02008117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119eval ac_res=\$$as_ac_Header
Christian Heimes39258d32021-04-17 11:36:35 +02008120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8121$as_echo "$ac_res" >&6; }
8122if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 cat >>confdefs.h <<_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008124#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008125_ACEOF
8126
8127ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008130done
8131# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8132if test $ac_header_dirent = dirent.h; then
Christian Heimes39258d32021-04-17 11:36:35 +02008133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8134$as_echo_n "checking for library containing opendir... " >&6; }
8135if ${ac_cv_search_opendir+:} false; then :
8136 $as_echo_n "(cached) " >&6
8137else
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142/* Override any GCC internal prototype to avoid an error.
8143 Use char because int might match the return type of a GCC
8144 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02008145#ifdef __cplusplus
8146extern "C"
8147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008148char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008149int
Christian Heimes39258d32021-04-17 11:36:35 +02008150main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008153 ;
8154 return 0;
8155}
8156_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008157for ac_lib in '' dir; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 if test -z "$ac_lib"; then
8159 ac_res="none required"
8160 else
8161 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008162 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163 fi
Christian Heimes39258d32021-04-17 11:36:35 +02008164 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008166fi
Christian Heimes39258d32021-04-17 11:36:35 +02008167rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02008169 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008170 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172done
Christian Heimes39258d32021-04-17 11:36:35 +02008173if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008174
Christian Heimes39258d32021-04-17 11:36:35 +02008175else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176 ac_cv_search_opendir=no
8177fi
8178rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008179LIBS=$ac_func_search_save_LIBS
8180fi
Christian Heimes39258d32021-04-17 11:36:35 +02008181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8182$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008183ac_res=$ac_cv_search_opendir
Christian Heimes39258d32021-04-17 11:36:35 +02008184if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008185 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008188
Michael W. Hudson54241132001-12-07 15:38:26 +00008189else
Christian Heimes39258d32021-04-17 11:36:35 +02008190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8191$as_echo_n "checking for library containing opendir... " >&6; }
8192if ${ac_cv_search_opendir+:} false; then :
8193 $as_echo_n "(cached) " >&6
8194else
Martin v. Löwis11437992002-04-12 09:54:03 +00008195 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199/* Override any GCC internal prototype to avoid an error.
8200 Use char because int might match the return type of a GCC
8201 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02008202#ifdef __cplusplus
8203extern "C"
8204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008205char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
Christian Heimes39258d32021-04-17 11:36:35 +02008207main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ;
8211 return 0;
8212}
8213_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008214for ac_lib in '' x; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 if test -z "$ac_lib"; then
8216 ac_res="none required"
8217 else
8218 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008219 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220 fi
Christian Heimes39258d32021-04-17 11:36:35 +02008221 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008223fi
Christian Heimes39258d32021-04-17 11:36:35 +02008224rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02008226 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229done
Christian Heimes39258d32021-04-17 11:36:35 +02008230if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008231
Christian Heimes39258d32021-04-17 11:36:35 +02008232else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233 ac_cv_search_opendir=no
8234fi
8235rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008236LIBS=$ac_func_search_save_LIBS
8237fi
Christian Heimes39258d32021-04-17 11:36:35 +02008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8239$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240ac_res=$ac_cv_search_opendir
Christian Heimes39258d32021-04-17 11:36:35 +02008241if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008244fi
8245
8246fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008247
Christian Heimes39258d32021-04-17 11:36:35 +02008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8249$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
8250if ${ac_cv_header_sys_types_h_makedev+:} false; then :
8251 $as_echo_n "(cached) " >&6
8252else
8253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8254/* end confdefs.h. */
8255#include <sys/types.h>
8256int
8257main ()
8258{
8259return makedev(0, 0);
8260 ;
8261 return 0;
8262}
8263_ACEOF
8264if ac_fn_c_try_link "$LINENO"; then :
8265 ac_cv_header_sys_types_h_makedev=yes
8266else
8267 ac_cv_header_sys_types_h_makedev=no
8268fi
8269rm -f core conftest.err conftest.$ac_objext \
8270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008271
Christian Heimes39258d32021-04-17 11:36:35 +02008272fi
8273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8274$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008275
Christian Heimes39258d32021-04-17 11:36:35 +02008276if test $ac_cv_header_sys_types_h_makedev = no; then
8277ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8278if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
8279
8280$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008281
8282fi
8283
8284
Christian Heimes39258d32021-04-17 11:36:35 +02008285
8286 if test $ac_cv_header_sys_mkdev_h = no; then
8287 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
8288if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
8289
8290$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008291
8292fi
8293
Christian Heimes39258d32021-04-17 11:36:35 +02008294
8295 fi
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008296fi
8297
Michael W. Hudson54241132001-12-07 15:38:26 +00008298
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008299# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8300# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8301SAVE_CFLAGS=$CFLAGS
8302CFLAGS="-std=c99 $CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02008303for ac_header in bluetooth/bluetooth.h
8304do :
8305 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8306if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8307 cat >>confdefs.h <<_ACEOF
8308#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8309_ACEOF
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008310
8311fi
8312
Christian Heimes39258d32021-04-17 11:36:35 +02008313done
8314
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008315CFLAGS=$SAVE_CFLAGS
8316
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008317# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Christian Heimes39258d32021-04-17 11:36:35 +02008318for ac_header in net/if.h
8319do :
8320 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 -07008321#ifdef STDC_HEADERS
8322# include <stdlib.h>
8323# include <stddef.h>
8324#else
8325# ifdef HAVE_STDLIB_H
8326# include <stdlib.h>
8327# endif
8328#endif
8329#ifdef HAVE_SYS_SOCKET_H
8330# include <sys/socket.h>
8331#endif
8332
8333"
Christian Heimes39258d32021-04-17 11:36:35 +02008334if test "x$ac_cv_header_net_if_h" = xyes; then :
8335 cat >>confdefs.h <<_ACEOF
8336#define HAVE_NET_IF_H 1
8337_ACEOF
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008338
8339fi
8340
Christian Heimes39258d32021-04-17 11:36:35 +02008341done
8342
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008343
Martin v. Löwis11017b12006-01-14 18:12:57 +00008344# On Linux, netlink.h requires asm/types.h
Christian Heimes39258d32021-04-17 11:36:35 +02008345for ac_header in linux/netlink.h
8346do :
8347 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 +00008348#ifdef HAVE_ASM_TYPES_H
8349#include <asm/types.h>
8350#endif
8351#ifdef HAVE_SYS_SOCKET_H
8352#include <sys/socket.h>
8353#endif
8354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355"
Christian Heimes39258d32021-04-17 11:36:35 +02008356if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
8357 cat >>confdefs.h <<_ACEOF
8358#define HAVE_LINUX_NETLINK_H 1
8359_ACEOF
Martin v. Löwis11017b12006-01-14 18:12:57 +00008360
8361fi
8362
Christian Heimes39258d32021-04-17 11:36:35 +02008363done
8364
Martin v. Löwis11017b12006-01-14 18:12:57 +00008365
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008366# On Linux, qrtr.h requires asm/types.h
Christian Heimes39258d32021-04-17 11:36:35 +02008367for ac_header in linux/qrtr.h
8368do :
8369 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008370#ifdef HAVE_ASM_TYPES_H
8371#include <asm/types.h>
8372#endif
8373#ifdef HAVE_SYS_SOCKET_H
8374#include <sys/socket.h>
8375#endif
8376
8377"
Christian Heimes39258d32021-04-17 11:36:35 +02008378if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8379 cat >>confdefs.h <<_ACEOF
8380#define HAVE_LINUX_QRTR_H 1
8381_ACEOF
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008382
8383fi
8384
Christian Heimes39258d32021-04-17 11:36:35 +02008385done
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008386
Christian Heimes39258d32021-04-17 11:36:35 +02008387
8388for ac_header in linux/vm_sockets.h
8389do :
8390 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04008391#ifdef HAVE_SYS_SOCKET_H
8392#include <sys/socket.h>
8393#endif
8394
8395"
Christian Heimes39258d32021-04-17 11:36:35 +02008396if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8397 cat >>confdefs.h <<_ACEOF
8398#define HAVE_LINUX_VM_SOCKETS_H 1
8399_ACEOF
caaveryeffc12f2017-09-06 18:18:10 -04008400
8401fi
8402
Christian Heimes39258d32021-04-17 11:36:35 +02008403done
8404
caaveryeffc12f2017-09-06 18:18:10 -04008405
karl ding360371f2020-04-29 15:31:19 -07008406# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Christian Heimes39258d32021-04-17 11:36:35 +02008407for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
8408do :
8409 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8410ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
Charles-François Natali47413c12011-10-06 19:47:44 +02008411#ifdef HAVE_SYS_SOCKET_H
8412#include <sys/socket.h>
8413#endif
8414
8415"
Christian Heimes39258d32021-04-17 11:36:35 +02008416if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8417 cat >>confdefs.h <<_ACEOF
8418#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8419_ACEOF
Charles-François Natali47413c12011-10-06 19:47:44 +02008420
8421fi
8422
Christian Heimes39258d32021-04-17 11:36:35 +02008423done
Charles-François Natali47413c12011-10-06 19:47:44 +02008424
8425
Guido van Rossum627b2d71993-12-24 10:39:16 +00008426# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008427was_it_defined=no
Christian Heimes39258d32021-04-17 11:36:35 +02008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8429$as_echo_n "checking for clock_t in time.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008431/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008432#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008433
8434_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +02008436 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008437 was_it_defined=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008438else
Martin v. Löwis11437992002-04-12 09:54:03 +00008439
8440
Christian Heimes39258d32021-04-17 11:36:35 +02008441$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008442
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008443
Guido van Rossum627b2d71993-12-24 10:39:16 +00008444fi
Christian Heimes39258d32021-04-17 11:36:35 +02008445rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008446
Christian Heimes39258d32021-04-17 11:36:35 +02008447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8448$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008449
Christian Heimes39258d32021-04-17 11:36:35 +02008450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8451$as_echo_n "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008454
Jesus Cea740f53a2010-04-28 11:35:30 +00008455#if defined(MAJOR_IN_MKDEV)
8456#include <sys/mkdev.h>
8457#elif defined(MAJOR_IN_SYSMACROS)
8458#include <sys/sysmacros.h>
8459#else
8460#include <sys/types.h>
8461#endif
8462
Neal Norwitz11690112002-07-30 01:08:28 +00008463int
Christian Heimes39258d32021-04-17 11:36:35 +02008464main ()
Neal Norwitz11690112002-07-30 01:08:28 +00008465{
Jesus Cea740f53a2010-04-28 11:35:30 +00008466
8467 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008468 ;
8469 return 0;
8470}
Matthias Kloseb159a552010-04-25 21:00:44 +00008471
Neal Norwitz11690112002-07-30 01:08:28 +00008472_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008473if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008474 ac_cv_has_makedev=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008475else
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008477fi
Christian Heimes39258d32021-04-17 11:36:35 +02008478rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8481$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008482if test "$ac_cv_has_makedev" = "yes"; then
8483
Christian Heimes39258d32021-04-17 11:36:35 +02008484$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008485
8486fi
8487
Christian Heimes985ecdc2013-11-20 11:46:18 +01008488# byte swapping
Christian Heimes39258d32021-04-17 11:36:35 +02008489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8490$as_echo_n "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8492/* end confdefs.h. */
8493
8494#ifdef HAVE_ENDIAN_H
8495#include <endian.h>
8496#elif defined(HAVE_SYS_ENDIAN_H)
8497#include <sys/endian.h>
8498#endif
8499
8500int
Christian Heimes39258d32021-04-17 11:36:35 +02008501main ()
Christian Heimes985ecdc2013-11-20 11:46:18 +01008502{
8503
8504 le64toh(1)
8505 ;
8506 return 0;
8507}
8508
8509_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008510if ac_fn_c_try_link "$LINENO"; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01008511 ac_cv_has_le64toh=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008512else
Christian Heimes985ecdc2013-11-20 11:46:18 +01008513 ac_cv_has_le64toh=no
8514fi
Christian Heimes39258d32021-04-17 11:36:35 +02008515rm -f core conftest.err conftest.$ac_objext \
Christian Heimes985ecdc2013-11-20 11:46:18 +01008516 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8518$as_echo "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008519if test "$ac_cv_has_le64toh" = "yes"; then
8520
Christian Heimes39258d32021-04-17 11:36:35 +02008521$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01008522
8523fi
8524
Martin v. Löwis399a6892002-10-04 10:22:02 +00008525use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008526# Don't use largefile support for GNU/Hurd
8527case $ac_sys_system in GNU*)
8528 use_lfs=no
8529esac
8530
Martin v. Löwis399a6892002-10-04 10:22:02 +00008531if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008532# Two defines needed to enable largefile support on various platforms
8533# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008534case $ac_sys_system/$ac_sys_release in
8535AIX*)
8536
Christian Heimes39258d32021-04-17 11:36:35 +02008537$as_echo "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00008538
8539 ;;
8540esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008541
Christian Heimes39258d32021-04-17 11:36:35 +02008542$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008543
8544
Christian Heimes39258d32021-04-17 11:36:35 +02008545$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008546
Martin v. Löwis399a6892002-10-04 10:22:02 +00008547fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008548
Guido van Rossum84e7b241996-08-19 21:59:00 +00008549# Add some code to confdefs.h so that the test for off_t works on SCO
8550cat >> confdefs.h <<\EOF
8551#if defined(SCO_DS)
8552#undef _OFF_T
8553#endif
8554EOF
8555
Guido van Rossumef2255b2000-03-10 22:30:29 +00008556# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008557ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008558if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008559
Christian Heimes39258d32021-04-17 11:36:35 +02008560else
Martin v. Löwis11437992002-04-12 09:54:03 +00008561
Christian Heimes39258d32021-04-17 11:36:35 +02008562cat >>confdefs.h <<_ACEOF
8563#define mode_t int
8564_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008565
8566fi
8567
Matthias Kloseb9621712010-04-24 17:59:49 +00008568ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008569if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008570
Christian Heimes39258d32021-04-17 11:36:35 +02008571else
Martin v. Löwis11437992002-04-12 09:54:03 +00008572
Christian Heimes39258d32021-04-17 11:36:35 +02008573cat >>confdefs.h <<_ACEOF
8574#define off_t long int
Christian Heimes32eba612021-03-19 10:29:25 +01008575_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008576
Pablo Galindo53e55292021-04-05 17:38:40 +01008577fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008578
Christian Heimes39258d32021-04-17 11:36:35 +02008579ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8580if test "x$ac_cv_type_pid_t" = xyes; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01008581
Christian Heimes39258d32021-04-17 11:36:35 +02008582else
8583
8584cat >>confdefs.h <<_ACEOF
8585#define pid_t int
8586_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008587
8588fi
8589
8590
Christian Heimes39258d32021-04-17 11:36:35 +02008591cat >>confdefs.h <<_ACEOF
8592#define RETSIGTYPE void
8593_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008596if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008597
Christian Heimes39258d32021-04-17 11:36:35 +02008598else
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Christian Heimes39258d32021-04-17 11:36:35 +02008600cat >>confdefs.h <<_ACEOF
8601#define size_t unsigned int
8602_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008603
8604fi
8605
Christian Heimes39258d32021-04-17 11:36:35 +02008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8607$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8608if ${ac_cv_type_uid_t+:} false; then :
8609 $as_echo_n "(cached) " >&6
8610else
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008612/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008613#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
8615_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +02008617 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008618 ac_cv_type_uid_t=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008619else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008620 ac_cv_type_uid_t=no
8621fi
Christian Heimes39258d32021-04-17 11:36:35 +02008622rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008624fi
Christian Heimes39258d32021-04-17 11:36:35 +02008625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8626$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008627if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008628
Christian Heimes39258d32021-04-17 11:36:35 +02008629$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008630
8631
Christian Heimes39258d32021-04-17 11:36:35 +02008632$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008633
8634fi
8635
Mark Dickinson983bc162012-12-02 12:11:38 +00008636
Matthias Kloseb9621712010-04-24 17:59:49 +00008637ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008638if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639
Christian Heimes39258d32021-04-17 11:36:35 +02008640$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008641
8642fi
8643
Stefan Krah1919b7e2012-03-21 18:25:23 +01008644ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008645if test "x$ac_cv_type___uint128_t" = xyes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01008646
Christian Heimes39258d32021-04-17 11:36:35 +02008647$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01008648
8649fi
8650
Jack Jansendd19cf82001-12-06 22:36:17 +00008651
Jessica Clarkedec07572021-03-31 11:12:39 +01008652# Sizes and alignments of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008653# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654# The cast to long int works around a bug in the HP C Compiler
8655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8657# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8659$as_echo_n "checking size of int... " >&6; }
8660if ${ac_cv_sizeof_int+:} false; then :
8661 $as_echo_n "(cached) " >&6
8662else
8663 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 +00008664
Christian Heimes39258d32021-04-17 11:36:35 +02008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 if test "$ac_cv_type_int" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008669as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008670See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671 else
8672 ac_cv_sizeof_int=0
8673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676fi
Christian Heimes39258d32021-04-17 11:36:35 +02008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8678$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679
8680
8681
Christian Heimes39258d32021-04-17 11:36:35 +02008682cat >>confdefs.h <<_ACEOF
8683#define SIZEOF_INT $ac_cv_sizeof_int
8684_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008685
8686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687# The cast to long int works around a bug in the HP C Compiler
8688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8690# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8692$as_echo_n "checking size of long... " >&6; }
8693if ${ac_cv_sizeof_long+:} false; then :
8694 $as_echo_n "(cached) " >&6
8695else
8696 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 +00008697
Christian Heimes39258d32021-04-17 11:36:35 +02008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 if test "$ac_cv_type_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008702as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008703See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704 else
8705 ac_cv_sizeof_long=0
8706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708
Martin v. Löwis11437992002-04-12 09:54:03 +00008709fi
Christian Heimes39258d32021-04-17 11:36:35 +02008710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8711$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712
8713
8714
Christian Heimes39258d32021-04-17 11:36:35 +02008715cat >>confdefs.h <<_ACEOF
8716#define SIZEOF_LONG $ac_cv_sizeof_long
8717_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008718
8719
Jessica Clarkedec07572021-03-31 11:12:39 +01008720# The cast to long int works around a bug in the HP C Compiler,
8721# see AC_CHECK_SIZEOF for more information.
Christian Heimes39258d32021-04-17 11:36:35 +02008722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
8723$as_echo_n "checking alignment of long... " >&6; }
8724if ${ac_cv_alignof_long+:} false; then :
8725 $as_echo_n "(cached) " >&6
8726else
Jessica Clarkedec07572021-03-31 11:12:39 +01008727 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
Christian Heimes39258d32021-04-17 11:36:35 +02008728#ifndef offsetof
8729# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
8730#endif
8731typedef struct { char x; long y; } ac__type_alignof_;"; then :
Jessica Clarkedec07572021-03-31 11:12:39 +01008732
Christian Heimes39258d32021-04-17 11:36:35 +02008733else
Jessica Clarkedec07572021-03-31 11:12:39 +01008734 if test "$ac_cv_type_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01008737as_fn_error 77 "cannot compute alignment of long
8738See \`config.log' for more details" "$LINENO" 5; }
8739 else
8740 ac_cv_alignof_long=0
8741 fi
8742fi
8743
8744fi
Christian Heimes39258d32021-04-17 11:36:35 +02008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
8746$as_echo "$ac_cv_alignof_long" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01008747
8748
8749
Christian Heimes39258d32021-04-17 11:36:35 +02008750cat >>confdefs.h <<_ACEOF
8751#define ALIGNOF_LONG $ac_cv_alignof_long
8752_ACEOF
Jessica Clarkedec07572021-03-31 11:12:39 +01008753
8754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755# The cast to long int works around a bug in the HP C Compiler
8756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8758# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8760$as_echo_n "checking size of long long... " >&6; }
8761if ${ac_cv_sizeof_long_long+:} false; then :
8762 $as_echo_n "(cached) " >&6
8763else
8764 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 -07008765
Christian Heimes39258d32021-04-17 11:36:35 +02008766else
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008767 if test "$ac_cv_type_long_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008770as_fn_error 77 "cannot compute sizeof (long long)
8771See \`config.log' for more details" "$LINENO" 5; }
8772 else
8773 ac_cv_sizeof_long_long=0
8774 fi
8775fi
8776
8777fi
Christian Heimes39258d32021-04-17 11:36:35 +02008778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8779$as_echo "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008780
8781
8782
Christian Heimes39258d32021-04-17 11:36:35 +02008783cat >>confdefs.h <<_ACEOF
8784#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8785_ACEOF
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008786
8787
8788# The cast to long int works around a bug in the HP C Compiler
8789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8791# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8793$as_echo_n "checking size of void *... " >&6; }
8794if ${ac_cv_sizeof_void_p+:} false; then :
8795 $as_echo_n "(cached) " >&6
8796else
8797 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 +00008798
Christian Heimes39258d32021-04-17 11:36:35 +02008799else
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 if test "$ac_cv_type_void_p" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008803as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008804See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008805 else
8806 ac_cv_sizeof_void_p=0
8807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008809
Martin v. Löwis11437992002-04-12 09:54:03 +00008810fi
Christian Heimes39258d32021-04-17 11:36:35 +02008811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8812$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008813
8814
8815
Christian Heimes39258d32021-04-17 11:36:35 +02008816cat >>confdefs.h <<_ACEOF
8817#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
8818_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008819
8820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821# The cast to long int works around a bug in the HP C Compiler
8822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8824# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8826$as_echo_n "checking size of short... " >&6; }
8827if ${ac_cv_sizeof_short+:} false; then :
8828 $as_echo_n "(cached) " >&6
8829else
8830 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 +00008831
Christian Heimes39258d32021-04-17 11:36:35 +02008832else
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 if test "$ac_cv_type_short" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008836as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008837See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838 else
8839 ac_cv_sizeof_short=0
8840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843fi
Christian Heimes39258d32021-04-17 11:36:35 +02008844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8845$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008846
8847
8848
Christian Heimes39258d32021-04-17 11:36:35 +02008849cat >>confdefs.h <<_ACEOF
8850#define SIZEOF_SHORT $ac_cv_sizeof_short
8851_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008852
8853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854# The cast to long int works around a bug in the HP C Compiler
8855# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8856# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8857# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8859$as_echo_n "checking size of float... " >&6; }
8860if ${ac_cv_sizeof_float+:} false; then :
8861 $as_echo_n "(cached) " >&6
8862else
8863 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 +00008864
Christian Heimes39258d32021-04-17 11:36:35 +02008865else
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 if test "$ac_cv_type_float" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008869as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008870See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871 else
8872 ac_cv_sizeof_float=0
8873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008875
Martin v. Löwis11437992002-04-12 09:54:03 +00008876fi
Christian Heimes39258d32021-04-17 11:36:35 +02008877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8878$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879
8880
8881
Christian Heimes39258d32021-04-17 11:36:35 +02008882cat >>confdefs.h <<_ACEOF
8883#define SIZEOF_FLOAT $ac_cv_sizeof_float
8884_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008885
8886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887# The cast to long int works around a bug in the HP C Compiler
8888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8890# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8892$as_echo_n "checking size of double... " >&6; }
8893if ${ac_cv_sizeof_double+:} false; then :
8894 $as_echo_n "(cached) " >&6
8895else
8896 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 +00008897
Christian Heimes39258d32021-04-17 11:36:35 +02008898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 if test "$ac_cv_type_double" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008902as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008903See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904 else
8905 ac_cv_sizeof_double=0
8906 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908
Martin v. Löwis11437992002-04-12 09:54:03 +00008909fi
Christian Heimes39258d32021-04-17 11:36:35 +02008910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8911$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912
8913
8914
Christian Heimes39258d32021-04-17 11:36:35 +02008915cat >>confdefs.h <<_ACEOF
8916#define SIZEOF_DOUBLE $ac_cv_sizeof_double
8917_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008918
8919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920# The cast to long int works around a bug in the HP C Compiler
8921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8923# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8925$as_echo_n "checking size of fpos_t... " >&6; }
8926if ${ac_cv_sizeof_fpos_t+:} false; then :
8927 $as_echo_n "(cached) " >&6
8928else
8929 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 +00008930
Christian Heimes39258d32021-04-17 11:36:35 +02008931else
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 if test "$ac_cv_type_fpos_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008935as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008936See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937 else
8938 ac_cv_sizeof_fpos_t=0
8939 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941
Martin v. Löwis11437992002-04-12 09:54:03 +00008942fi
Christian Heimes39258d32021-04-17 11:36:35 +02008943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8944$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945
8946
8947
Christian Heimes39258d32021-04-17 11:36:35 +02008948cat >>confdefs.h <<_ACEOF
8949#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
8950_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008951
Michael W. Hudson54241132001-12-07 15:38:26 +00008952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953# The cast to long int works around a bug in the HP C Compiler
8954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8956# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8958$as_echo_n "checking size of size_t... " >&6; }
8959if ${ac_cv_sizeof_size_t+:} false; then :
8960 $as_echo_n "(cached) " >&6
8961else
8962 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 +00008963
Christian Heimes39258d32021-04-17 11:36:35 +02008964else
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 if test "$ac_cv_type_size_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008968as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008969See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970 else
8971 ac_cv_sizeof_size_t=0
8972 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974
Martin v. Löwis18e16552006-02-15 17:27:45 +00008975fi
Christian Heimes39258d32021-04-17 11:36:35 +02008976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8977$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978
8979
8980
Christian Heimes39258d32021-04-17 11:36:35 +02008981cat >>confdefs.h <<_ACEOF
8982#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8983_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00008984
8985
Jessica Clarkedec07572021-03-31 11:12:39 +01008986# The cast to long int works around a bug in the HP C Compiler,
8987# see AC_CHECK_SIZEOF for more information.
Christian Heimes39258d32021-04-17 11:36:35 +02008988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5
8989$as_echo_n "checking alignment of size_t... " >&6; }
8990if ${ac_cv_alignof_size_t+:} false; then :
8991 $as_echo_n "(cached) " >&6
8992else
Jessica Clarkedec07572021-03-31 11:12:39 +01008993 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default
Christian Heimes39258d32021-04-17 11:36:35 +02008994#ifndef offsetof
8995# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
8996#endif
8997typedef struct { char x; size_t y; } ac__type_alignof_;"; then :
Jessica Clarkedec07572021-03-31 11:12:39 +01008998
Christian Heimes39258d32021-04-17 11:36:35 +02008999else
Jessica Clarkedec07572021-03-31 11:12:39 +01009000 if test "$ac_cv_type_size_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01009003as_fn_error 77 "cannot compute alignment of size_t
9004See \`config.log' for more details" "$LINENO" 5; }
9005 else
9006 ac_cv_alignof_size_t=0
9007 fi
9008fi
9009
9010fi
Christian Heimes39258d32021-04-17 11:36:35 +02009011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5
9012$as_echo "$ac_cv_alignof_size_t" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01009013
9014
9015
Christian Heimes39258d32021-04-17 11:36:35 +02009016cat >>confdefs.h <<_ACEOF
9017#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t
9018_ACEOF
Jessica Clarkedec07572021-03-31 11:12:39 +01009019
9020
Christian Heimes400adb02008-02-01 08:12:03 +00009021# The cast to long int works around a bug in the HP C Compiler
9022# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9023# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9024# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
9026$as_echo_n "checking size of pid_t... " >&6; }
9027if ${ac_cv_sizeof_pid_t+:} false; then :
9028 $as_echo_n "(cached) " >&6
9029else
9030 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 +00009031
Christian Heimes39258d32021-04-17 11:36:35 +02009032else
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 if test "$ac_cv_type_pid_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009036as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009037See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00009038 else
9039 ac_cv_sizeof_pid_t=0
9040 fi
9041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009042
Christian Heimes400adb02008-02-01 08:12:03 +00009043fi
Christian Heimes39258d32021-04-17 11:36:35 +02009044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
9045$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00009046
9047
9048
Christian Heimes39258d32021-04-17 11:36:35 +02009049cat >>confdefs.h <<_ACEOF
9050#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
9051_ACEOF
Christian Heimes400adb02008-02-01 08:12:03 +00009052
9053
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009054# The cast to long int works around a bug in the HP C Compiler
9055# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9056# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9057# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
9059$as_echo_n "checking size of uintptr_t... " >&6; }
9060if ${ac_cv_sizeof_uintptr_t+:} false; then :
9061 $as_echo_n "(cached) " >&6
9062else
9063 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 -07009064
Christian Heimes39258d32021-04-17 11:36:35 +02009065else
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009066 if test "$ac_cv_type_uintptr_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009069as_fn_error 77 "cannot compute sizeof (uintptr_t)
9070See \`config.log' for more details" "$LINENO" 5; }
9071 else
9072 ac_cv_sizeof_uintptr_t=0
9073 fi
9074fi
9075
9076fi
Christian Heimes39258d32021-04-17 11:36:35 +02009077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
9078$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009079
9080
9081
Christian Heimes39258d32021-04-17 11:36:35 +02009082cat >>confdefs.h <<_ACEOF
9083#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
9084_ACEOF
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009085
9086
Michael W. Hudson54241132001-12-07 15:38:26 +00009087
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009088
Christian Heimes39258d32021-04-17 11:36:35 +02009089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
9090$as_echo_n "checking for long double... " >&6; }
9091if ${ac_cv_type_long_double+:} false; then :
9092 $as_echo_n "(cached) " >&6
9093else
Eitan Adler3055c942018-05-15 22:58:09 -07009094 if test "$GCC" = yes; then
9095 ac_cv_type_long_double=yes
9096 else
9097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9098/* end confdefs.h. */
9099/* The Stardent Vistra knows sizeof (long double), but does
9100 not support it. */
9101 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009102int
Christian Heimes39258d32021-04-17 11:36:35 +02009103main ()
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009104{
Eitan Adler3055c942018-05-15 22:58:09 -07009105static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9106 sizeof (double) <= sizeof (long double))];
9107test_array [0] = 0;
9108return test_array [0];
9109
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009110 ;
9111 return 0;
9112}
9113_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009114if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009115 ac_cv_type_long_double=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009116else
Eitan Adler3055c942018-05-15 22:58:09 -07009117 ac_cv_type_long_double=no
9118fi
Christian Heimes39258d32021-04-17 11:36:35 +02009119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -07009120 fi
9121fi
Christian Heimes39258d32021-04-17 11:36:35 +02009122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9123$as_echo "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -07009124 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009125
Christian Heimes39258d32021-04-17 11:36:35 +02009126$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009127
Eitan Adler3055c942018-05-15 22:58:09 -07009128 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009129
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009130# The cast to long int works around a bug in the HP C Compiler
9131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9133# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9135$as_echo_n "checking size of long double... " >&6; }
9136if ${ac_cv_sizeof_long_double+:} false; then :
9137 $as_echo_n "(cached) " >&6
9138else
9139 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 +00009140
Christian Heimes39258d32021-04-17 11:36:35 +02009141else
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 if test "$ac_cv_type_long_double" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009145as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009146See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009147 else
9148 ac_cv_sizeof_long_double=0
9149 fi
9150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009151
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009152fi
Christian Heimes39258d32021-04-17 11:36:35 +02009153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9154$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009155
9156
9157
Christian Heimes39258d32021-04-17 11:36:35 +02009158cat >>confdefs.h <<_ACEOF
9159#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9160_ACEOF
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009161
9162
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164# The cast to long int works around a bug in the HP C Compiler
9165# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9166# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9167# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9169$as_echo_n "checking size of _Bool... " >&6; }
9170if ${ac_cv_sizeof__Bool+:} false; then :
9171 $as_echo_n "(cached) " >&6
9172else
9173 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 +00009174
Christian Heimes39258d32021-04-17 11:36:35 +02009175else
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 if test "$ac_cv_type__Bool" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009179as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009180See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181 else
9182 ac_cv_sizeof__Bool=0
9183 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009185
Thomas Woutersb2137042007-02-01 18:02:27 +00009186fi
Christian Heimes39258d32021-04-17 11:36:35 +02009187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9188$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189
9190
9191
Christian Heimes39258d32021-04-17 11:36:35 +02009192cat >>confdefs.h <<_ACEOF
9193#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9194_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +00009195
9196
Thomas Woutersb2137042007-02-01 18:02:27 +00009197
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009198# The cast to long int works around a bug in the HP C Compiler
9199# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9200# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9201# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9203$as_echo_n "checking size of off_t... " >&6; }
9204if ${ac_cv_sizeof_off_t+:} false; then :
9205 $as_echo_n "(cached) " >&6
9206else
Matthias Kloseb9621712010-04-24 17:59:49 +00009207 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009208#ifdef HAVE_SYS_TYPES_H
9209#include <sys/types.h>
9210#endif
9211
Christian Heimes39258d32021-04-17 11:36:35 +02009212"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009213
Christian Heimes39258d32021-04-17 11:36:35 +02009214else
Matthias Kloseb9621712010-04-24 17:59:49 +00009215 if test "$ac_cv_type_off_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009216 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9217$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009218as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009219See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009220 else
9221 ac_cv_sizeof_off_t=0
9222 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009224
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009225fi
Christian Heimes39258d32021-04-17 11:36:35 +02009226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9227$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009228
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009229
9230
Christian Heimes39258d32021-04-17 11:36:35 +02009231cat >>confdefs.h <<_ACEOF
9232#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
9233_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009234
Michael W. Hudson54241132001-12-07 15:38:26 +00009235
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009236
Christian Heimes39258d32021-04-17 11:36:35 +02009237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9238$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009239if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009240 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009241
Christian Heimes39258d32021-04-17 11:36:35 +02009242$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009243
Christian Heimes39258d32021-04-17 11:36:35 +02009244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9245$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009246else
Christian Heimes39258d32021-04-17 11:36:35 +02009247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9248$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009249fi
9250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009251# The cast to long int works around a bug in the HP C Compiler
9252# 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 Heimes39258d32021-04-17 11:36:35 +02009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9256$as_echo_n "checking size of time_t... " >&6; }
9257if ${ac_cv_sizeof_time_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 (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009261#ifdef HAVE_SYS_TYPES_H
9262#include <sys/types.h>
9263#endif
9264#ifdef HAVE_TIME_H
9265#include <time.h>
9266#endif
9267
Christian Heimes39258d32021-04-17 11:36:35 +02009268"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009269
Christian Heimes39258d32021-04-17 11:36:35 +02009270else
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 if test "$ac_cv_type_time_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009272 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9273$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009274as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009275See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009276 else
9277 ac_cv_sizeof_time_t=0
9278 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009280
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009281fi
Christian Heimes39258d32021-04-17 11:36:35 +02009282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9283$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009284
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009285
9286
Christian Heimes39258d32021-04-17 11:36:35 +02009287cat >>confdefs.h <<_ACEOF
9288#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
9289_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009290
Michael W. Hudson54241132001-12-07 15:38:26 +00009291
9292
Trent Mick635f6fb2000-08-23 21:33:05 +00009293# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009294ac_save_cc="$CC"
9295if test "$ac_cv_kpthread" = "yes"
9296then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009297elif test "$ac_cv_kthread" = "yes"
9298then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009299elif test "$ac_cv_pthread" = "yes"
9300then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009301fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009302
Christian Heimes39258d32021-04-17 11:36:35 +02009303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9304$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009305have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009307/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009308
9309 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009310int
Christian Heimes39258d32021-04-17 11:36:35 +02009311main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009312{
Guido van Rossum12580492000-09-24 16:47:19 +00009313pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 ;
9315 return 0;
9316}
Matthias Kloseb159a552010-04-25 21:00:44 +00009317
Martin v. Löwis11437992002-04-12 09:54:03 +00009318_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009319if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009320 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009321fi
Christian Heimes39258d32021-04-17 11:36:35 +02009322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9324$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009325if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9329# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9331$as_echo_n "checking size of pthread_t... " >&6; }
9332if ${ac_cv_sizeof_pthread_t+:} false; then :
9333 $as_echo_n "(cached) " >&6
9334else
Matthias Kloseb9621712010-04-24 17:59:49 +00009335 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009336#ifdef HAVE_PTHREAD_H
9337#include <pthread.h>
9338#endif
9339
Christian Heimes39258d32021-04-17 11:36:35 +02009340"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009341
Christian Heimes39258d32021-04-17 11:36:35 +02009342else
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 if test "$ac_cv_type_pthread_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009346as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009347See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009348 else
9349 ac_cv_sizeof_pthread_t=0
9350 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009352
Trent Mick635f6fb2000-08-23 21:33:05 +00009353fi
Christian Heimes39258d32021-04-17 11:36:35 +02009354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9355$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009357
9358
Christian Heimes39258d32021-04-17 11:36:35 +02009359cat >>confdefs.h <<_ACEOF
9360#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
9361_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009362
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009363
Trent Mick635f6fb2000-08-23 21:33:05 +00009364fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009365
9366# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9367# This checking will be unnecessary after removing deprecated TLS API.
9368# The cast to long int works around a bug in the HP C Compiler
9369# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9370# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9371# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9373$as_echo_n "checking size of pthread_key_t... " >&6; }
9374if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9375 $as_echo_n "(cached) " >&6
9376else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009377 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
Christian Heimes39258d32021-04-17 11:36:35 +02009378"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009379
Christian Heimes39258d32021-04-17 11:36:35 +02009380else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009381 if test "$ac_cv_type_pthread_key_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009384as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9385See \`config.log' for more details" "$LINENO" 5; }
9386 else
9387 ac_cv_sizeof_pthread_key_t=0
9388 fi
9389fi
9390
9391fi
Christian Heimes39258d32021-04-17 11:36:35 +02009392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9393$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009394
9395
9396
Christian Heimes39258d32021-04-17 11:36:35 +02009397cat >>confdefs.h <<_ACEOF
9398#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9399_ACEOF
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009400
9401
Christian Heimes39258d32021-04-17 11:36:35 +02009402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9403$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009404if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9406/* end confdefs.h. */
9407#include <pthread.h>
9408int
Christian Heimes39258d32021-04-17 11:36:35 +02009409main ()
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009410{
9411pthread_key_t k; k * 1;
9412 ;
9413 return 0;
9414}
9415_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009416if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009417 ac_pthread_key_t_is_arithmetic_type=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009418else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009419 ac_pthread_key_t_is_arithmetic_type=no
9420
9421fi
Christian Heimes39258d32021-04-17 11:36:35 +02009422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9424$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009425 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9426
Christian Heimes39258d32021-04-17 11:36:35 +02009427$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009428
9429 fi
9430else
Christian Heimes39258d32021-04-17 11:36:35 +02009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9432$as_echo "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009433fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009434CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009435
Michael W. Hudson54241132001-12-07 15:38:26 +00009436
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009437case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009438 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009439 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9440 ;;
9441 Darwin/*)
9442 OTHER_LIBTOOL_OPT=""
9443 ;;
9444esac
9445
9446
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009447
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009448case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009449 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009450 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9451 if test "${enable_universalsdk}"; then
9452 :
9453 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009454 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009455 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009456 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009457 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009458 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009459 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009460 if test ${gcc_version} '<' 4.0
9461 then
9462 LIBTOOL_CRUFT="-lcc_dynamic"
9463 else
9464 LIBTOOL_CRUFT=""
9465 fi
Christian Heimes39258d32021-04-17 11:36:35 +02009466 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009467 ac_osx_32bit=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009468else
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009470/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009471
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009472 #include <unistd.h>
9473 int main(int argc, char*argv[])
9474 {
9475 if (sizeof(long) == 4) {
9476 return 0;
9477 } else {
9478 return 1;
9479 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009480 }
9481
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009482_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009483if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009484 ac_osx_32bit=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009485else
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009490fi
9491
9492
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009493 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009494 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009495 i386)
9496 MACOSX_DEFAULT_ARCH="i386"
9497 ;;
9498 ppc)
9499 MACOSX_DEFAULT_ARCH="ppc"
9500 ;;
9501 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009502 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009503 ;;
9504 esac
9505 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009506 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009507 i386)
9508 MACOSX_DEFAULT_ARCH="x86_64"
9509 ;;
9510 ppc)
9511 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009512 ;;
9513 arm64)
9514 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009515 ;;
9516 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009517 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009518 ;;
9519 esac
9520
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009521 fi
9522
9523 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009524 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009525 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009526esac
Christian Heimes39258d32021-04-17 11:36:35 +02009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9528$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009529if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009530then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009531 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009532 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009533 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009534
Christian Heimes39258d32021-04-17 11:36:35 +02009535$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009536
Christian Heimes39258d32021-04-17 11:36:35 +02009537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9538$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009539 if test $enable_shared = "yes"
9540 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009541 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 +00009542 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009543else
Christian Heimes39258d32021-04-17 11:36:35 +02009544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009546fi
9547
Christian Heimes39258d32021-04-17 11:36:35 +02009548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9549$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009550case $ac_sys_system/$ac_sys_release in
9551 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009552
Christian Heimes39258d32021-04-17 11:36:35 +02009553$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009554
Christian Heimes39258d32021-04-17 11:36:35 +02009555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9556$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009557 ;;
9558 *)
Christian Heimes39258d32021-04-17 11:36:35 +02009559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009561 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009562esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009563
Guido van Rossum0a516c91994-09-12 10:58:40 +00009564# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009565
Michael W. Hudson54241132001-12-07 15:38:26 +00009566
9567
9568
9569
Benjamin Peterson99f03762010-04-11 22:15:28 +00009570
Thomas Wouters477c8d52006-05-27 19:21:47 +00009571
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009572# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9573# -- usually .so, .sl on HP-UX, .dll on Cygwin
Christian Heimes39258d32021-04-17 11:36:35 +02009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9575$as_echo_n "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009576if test -z "$SHLIB_SUFFIX"; then
9577 case $ac_sys_system in
9578 hp*|HP*)
9579 case `uname -m` in
9580 ia64) SHLIB_SUFFIX=.so;;
9581 *) SHLIB_SUFFIX=.sl;;
9582 esac
9583 ;;
9584 CYGWIN*) SHLIB_SUFFIX=.dll;;
9585 *) SHLIB_SUFFIX=.so;;
9586 esac
9587fi
Christian Heimes39258d32021-04-17 11:36:35 +02009588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9589$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009590
Guido van Rossum0a516c91994-09-12 10:58:40 +00009591# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009592# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009593# (Shared libraries in this instance are shared modules to be loaded into
9594# Python, as opposed to building Python itself as a shared library.)
Christian Heimes39258d32021-04-17 11:36:35 +02009595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9596$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009597if test -z "$LDSHARED"
9598then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009599 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009600 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009601 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009602 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009603 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009605 if test "$GCC" = "yes" ; then
9606 LDSHARED='$(CC) -shared'
9607 LDCXXSHARED='$(CXX) -shared'
9608 else
9609 LDSHARED='$(CC) -G'
9610 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009611 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009612 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009613 if test "$GCC" = "yes" ; then
9614 LDSHARED='$(CC) -shared'
9615 LDCXXSHARED='$(CXX) -shared'
9616 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009617 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009618 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009619 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009620 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009621 LDSHARED='$(CC) -bundle'
9622 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009623 if test "$enable_framework" ; then
9624 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009625 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9626 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009627 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009628 else
9629 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009630 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009631 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009632 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009633 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009634 LDSHARED='$(CC) -bundle'
9635 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009636 if test "$enable_framework" ; then
9637 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009638 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9639 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009640 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009641 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009642 # No framework, use the Python app as bundle-loader
9643 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009644 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009645 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009646 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009647 Darwin/*)
9648 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9649 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009650
Ned Deily36820b62014-06-25 13:44:22 -07009651 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9652 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9653 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9654 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9655 if test ${dep_target_major} -eq 10 && \
9656 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009657 then
Ned Deily36820b62014-06-25 13:44:22 -07009658 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009659 LDSHARED='$(CC) -bundle'
9660 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009661 if test "$enable_framework" ; then
9662 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009663 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9664 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009665 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009666 else
9667 # No framework, use the Python app as bundle-loader
9668 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9669 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009670 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009671 fi
Ned Deily36820b62014-06-25 13:44:22 -07009672 else
9673 # building for OS X 10.3 and later
9674 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9675 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9676 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009677 fi
9678 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009679 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009680 LDSHARED='$(CC) -shared'
9681 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009682 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009683 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009684 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009685 LDSHARED='$(CC) -shared'
9686 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009687 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009688 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009689 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009690 OpenBSD*)
9691 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9692 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009693 LDSHARED='$(CC) -shared $(CCSHARED)'
9694 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009695 else
9696 case `uname -r` in
9697 [01].* | 2.[0-7] | 2.[0-7].*)
9698 LDSHARED="ld -Bshareable ${LDFLAGS}"
9699 ;;
9700 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009701 LDSHARED='$(CC) -shared $(CCSHARED)'
9702 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009703 ;;
9704 esac
9705 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009706 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009707 LDSHARED='$(CC) -shared'
9708 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009709 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009710 if test "$GCC" = "yes" ; then
9711 LDSHARED='$(CC) -shared'
9712 LDCXXSHARED='$(CXX) -shared'
9713 else
9714 LDSHARED='$(CC) -G'
9715 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009716 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009717 SCO_SV*)
9718 LDSHARED='$(CC) -Wl,-G,-Bexport'
9719 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9720 CYGWIN*)
9721 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9722 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009723 *) LDSHARED="ld";;
9724 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009725fi
Christian Heimes39258d32021-04-17 11:36:35 +02009726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9727$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009728LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009729BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009730# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009731# library (module) -- this is only needed for a few systems
Christian Heimes39258d32021-04-17 11:36:35 +02009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9733$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009734if test -z "$CCSHARED"
9735then
Guido van Rossum07397971997-04-29 21:49:50 +00009736 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009737 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009738 then CCSHARED="-fPIC";
9739 elif test `uname -p` = sparc;
9740 then CCSHARED="-xcode=pic32";
9741 else CCSHARED="-Kpic";
9742 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009743 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009744 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009745 else CCSHARED="+z";
9746 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009747 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009748 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009749 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009750 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009751 if test "$GCC" = "yes"
9752 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009753 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009754 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009755 SCO_SV*)
9756 if test "$GCC" = "yes"
9757 then CCSHARED="-fPIC"
9758 else CCSHARED="-Kpic -belf"
9759 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009760 VxWorks*)
9761 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009762 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009763fi
Christian Heimes39258d32021-04-17 11:36:35 +02009764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9765$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009766# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009767# the python executable -- this is only needed for a few systems
Christian Heimes39258d32021-04-17 11:36:35 +02009768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9769$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009770if test -z "$LINKFORSHARED"
9771then
Guido van Rossum07397971997-04-29 21:49:50 +00009772 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009773 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009774 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009775 LINKFORSHARED="-Wl,-E -Wl,+s";;
9776# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009777 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009778 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009779 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009781 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009782
9783 # Issue #18075: the default maximum stack size (8MBytes) is too
9784 # small for the default recursion limit. Increase the stack size
9785 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009786 # Note: This matches the value of THREAD_STACK_SIZE in
9787 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009788 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9789
Jack Jansene578a632001-08-15 01:27:14 +00009790 if test "$enable_framework"
9791 then
Jack Jansenda49e192005-01-07 13:08:22 +00009792 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009793 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009794 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009795 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009796 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009797 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009798 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009799 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9800 then
9801 LINKFORSHARED="-Wl,--export-dynamic"
9802 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009803 SunOS/5*) case $CC in
9804 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009805 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009806 then
9807 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009808 fi;;
9809 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009810 CYGWIN*)
9811 if test $enable_shared = "no"
9812 then
9813 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9814 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009815 QNX*)
9816 # -Wl,-E causes the symbols to be added to the dynamic
9817 # symbol table so that they can be found when a module
9818 # is loaded. -N 2048K causes the stack size to be set
9819 # to 2048 kilobytes so that the stack doesn't overflow
9820 # when running test_compile.py.
9821 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009822 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009823 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009824 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009825fi
Christian Heimes39258d32021-04-17 11:36:35 +02009826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9827$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009828
Michael W. Hudson54241132001-12-07 15:38:26 +00009829
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009830
Christian Heimes39258d32021-04-17 11:36:35 +02009831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9832$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009833if test ! "$LIBRARY" = "$LDLIBRARY"
9834then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009835 case $ac_sys_system in
9836 CYGWIN*)
9837 # Cygwin needs CCSHARED when building extension DLLs
9838 # but not when building the interpreter DLL.
9839 CFLAGSFORSHARED='';;
9840 *)
9841 CFLAGSFORSHARED='$(CCSHARED)'
9842 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009843fi
Christian Heimes39258d32021-04-17 11:36:35 +02009844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9845$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009846
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009847# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9848# library (with --enable-shared).
9849# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009850# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9851# if it is not required, since it creates a dependency of the shared library
9852# to LIBS. This, in turn, means that applications linking the shared libpython
9853# don't need to link LIBS explicitly. The default should be only changed
9854# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009855
Christian Heimes39258d32021-04-17 11:36:35 +02009856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9857$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009858case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009859 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009860 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009861esac
Christian Heimes39258d32021-04-17 11:36:35 +02009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9863$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009864
9865
Guido van Rossum627b2d71993-12-24 10:39:16 +00009866# checks for libraries
Christian Heimes39258d32021-04-17 11:36:35 +02009867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9868$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
9869if ${ac_cv_lib_sendfile_sendfile+:} false; then :
9870 $as_echo_n "(cached) " >&6
9871else
Georg Brandl941f9562011-02-25 15:21:47 +00009872 ac_check_lib_save_LIBS=$LIBS
9873LIBS="-lsendfile $LIBS"
9874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9875/* end confdefs.h. */
9876
9877/* Override any GCC internal prototype to avoid an error.
9878 Use char because int might match the return type of a GCC
9879 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009880#ifdef __cplusplus
9881extern "C"
9882#endif
Georg Brandl941f9562011-02-25 15:21:47 +00009883char sendfile ();
9884int
Christian Heimes39258d32021-04-17 11:36:35 +02009885main ()
Georg Brandl941f9562011-02-25 15:21:47 +00009886{
9887return sendfile ();
9888 ;
9889 return 0;
9890}
9891_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009892if ac_fn_c_try_link "$LINENO"; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009893 ac_cv_lib_sendfile_sendfile=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009894else
Georg Brandl941f9562011-02-25 15:21:47 +00009895 ac_cv_lib_sendfile_sendfile=no
9896fi
Christian Heimes39258d32021-04-17 11:36:35 +02009897rm -f core conftest.err conftest.$ac_objext \
Georg Brandl941f9562011-02-25 15:21:47 +00009898 conftest$ac_exeext conftest.$ac_ext
9899LIBS=$ac_check_lib_save_LIBS
9900fi
Christian Heimes39258d32021-04-17 11:36:35 +02009901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9902$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
9903if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
9904 cat >>confdefs.h <<_ACEOF
9905#define HAVE_LIBSENDFILE 1
9906_ACEOF
Georg Brandl941f9562011-02-25 15:21:47 +00009907
9908 LIBS="-lsendfile $LIBS"
9909
9910fi
9911
Christian Heimes39258d32021-04-17 11:36:35 +02009912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9913$as_echo_n "checking for dlopen in -ldl... " >&6; }
9914if ${ac_cv_lib_dl_dlopen+:} false; then :
9915 $as_echo_n "(cached) " >&6
9916else
Martin v. Löwis11437992002-04-12 09:54:03 +00009917 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009918LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922/* Override any GCC internal prototype to avoid an error.
9923 Use char because int might match the return type of a GCC
9924 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009925#ifdef __cplusplus
9926extern "C"
9927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009928char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009929int
Christian Heimes39258d32021-04-17 11:36:35 +02009930main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009932return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 ;
9934 return 0;
9935}
9936_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009937if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009938 ac_cv_lib_dl_dlopen=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009939else
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009941fi
Christian Heimes39258d32021-04-17 11:36:35 +02009942rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009944LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009945fi
Christian Heimes39258d32021-04-17 11:36:35 +02009946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9947$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9948if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
9949 cat >>confdefs.h <<_ACEOF
9950#define HAVE_LIBDL 1
9951_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009952
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009953 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009955fi
9956 # Dynamic linking for SunOS/Solaris and SYSV
Christian Heimes39258d32021-04-17 11:36:35 +02009957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9958$as_echo_n "checking for shl_load in -ldld... " >&6; }
9959if ${ac_cv_lib_dld_shl_load+:} false; then :
9960 $as_echo_n "(cached) " >&6
9961else
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009963LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967/* Override any GCC internal prototype to avoid an error.
9968 Use char because int might match the return type of a GCC
9969 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009970#ifdef __cplusplus
9971extern "C"
9972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009973char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009974int
Christian Heimes39258d32021-04-17 11:36:35 +02009975main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009976{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 ;
9979 return 0;
9980}
9981_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009982if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 ac_cv_lib_dld_shl_load=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009984else
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009986fi
Christian Heimes39258d32021-04-17 11:36:35 +02009987rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009989LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009990fi
Christian Heimes39258d32021-04-17 11:36:35 +02009991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9992$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9993if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
9994 cat >>confdefs.h <<_ACEOF
9995#define HAVE_LIBDLD 1
9996_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009997
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009998 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009999
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010000fi
10001 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010002
Michael Felt0d3ccb42017-12-30 22:39:20 +010010003# checks for uuid.h location
Christian Heimes39258d32021-04-17 11:36:35 +020010004for ac_header in uuid/uuid.h uuid.h
10005do :
10006 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10007ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10008if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10009 cat >>confdefs.h <<_ACEOF
10010#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10011_ACEOF
Michael Felt0d3ccb42017-12-30 22:39:20 +010010012
10013fi
10014
Christian Heimes39258d32021-04-17 11:36:35 +020010015done
Michael Felt0d3ccb42017-12-30 22:39:20 +010010016
Christian Heimes39258d32021-04-17 11:36:35 +020010017
10018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
10019$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10021/* end confdefs.h. */
10022#include <uuid/uuid.h>
10023int
Christian Heimes39258d32021-04-17 11:36:35 +020010024main ()
Berker Peksag9a10ff42017-11-08 23:09:16 +030010025{
10026
10027#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +030010028void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +030010029#endif
10030
10031 ;
10032 return 0;
10033}
10034_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010035if ac_fn_c_try_compile "$LINENO"; then :
Berker Peksag9a10ff42017-11-08 23:09:16 +030010036
Christian Heimes39258d32021-04-17 11:36:35 +020010037$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +030010038
Christian Heimes39258d32021-04-17 11:36:35 +020010039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10040$as_echo "yes" >&6; }
10041else
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010044
10045fi
Christian Heimes39258d32021-04-17 11:36:35 +020010046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +030010047
Michael Felt0d3ccb42017-12-30 22:39:20 +010010048# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +000010049# FreeBSD and OpenBSD provides support as well
Christian Heimes39258d32021-04-17 11:36:35 +020010050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
10051$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10053/* end confdefs.h. */
10054#include <uuid.h>
10055int
Christian Heimes39258d32021-04-17 11:36:35 +020010056main ()
Michael Felt0d3ccb42017-12-30 22:39:20 +010010057{
10058
10059#ifndef uuid_create
10060void *x = uuid_create
10061#endif
10062
10063 ;
10064 return 0;
10065}
10066_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010067if ac_fn_c_try_compile "$LINENO"; then :
Michael Felt0d3ccb42017-12-30 22:39:20 +010010068
Christian Heimes39258d32021-04-17 11:36:35 +020010069$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010010070
Christian Heimes39258d32021-04-17 11:36:35 +020010071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10072$as_echo "yes" >&6; }
10073else
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010076
10077fi
Christian Heimes39258d32021-04-17 11:36:35 +020010078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010010079
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010080# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
10081# stream in big-endian byte-order
Christian Heimes39258d32021-04-17 11:36:35 +020010082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
10083$as_echo_n "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10085/* end confdefs.h. */
10086#include <uuid.h>
10087int
Christian Heimes39258d32021-04-17 11:36:35 +020010088main ()
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010089{
10090
10091#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040010092void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010093#endif
10094
10095 ;
10096 return 0;
10097}
10098_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010099if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010100
Christian Heimes39258d32021-04-17 11:36:35 +020010101$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010102
Christian Heimes39258d32021-04-17 11:36:35 +020010103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10104$as_echo "yes" >&6; }
10105else
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010108
10109fi
Christian Heimes39258d32021-04-17 11:36:35 +020010110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010111
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010112# 'Real Time' functions on Solaris
10113# posix4 on Solaris 2.6
10114# pthread (first!) on Linux
Christian Heimes39258d32021-04-17 11:36:35 +020010115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
10116$as_echo_n "checking for library containing sem_init... " >&6; }
10117if ${ac_cv_search_sem_init+:} false; then :
10118 $as_echo_n "(cached) " >&6
10119else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010120 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124/* Override any GCC internal prototype to avoid an error.
10125 Use char because int might match the return type of a GCC
10126 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010127#ifdef __cplusplus
10128extern "C"
10129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010130char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010131int
Christian Heimes39258d32021-04-17 11:36:35 +020010132main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ;
10136 return 0;
10137}
10138_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010139for ac_lib in '' pthread rt posix4; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140 if test -z "$ac_lib"; then
10141 ac_res="none required"
10142 else
10143 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010144 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145 fi
Christian Heimes39258d32021-04-17 11:36:35 +020010146 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010148fi
Christian Heimes39258d32021-04-17 11:36:35 +020010149rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020010151 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154done
Christian Heimes39258d32021-04-17 11:36:35 +020010155if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010156
Christian Heimes39258d32021-04-17 11:36:35 +020010157else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158 ac_cv_search_sem_init=no
10159fi
10160rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010161LIBS=$ac_func_search_save_LIBS
10162fi
Christian Heimes39258d32021-04-17 11:36:35 +020010163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10164$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165ac_res=$ac_cv_search_sem_init
Christian Heimes39258d32021-04-17 11:36:35 +020010166if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010168
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010169fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010170
Martin v. Löwis519adae2003-09-20 10:47:47 +000010171
Martin v. Löwis19d17342003-06-14 21:03:05 +000010172# check if we need libintl for locale functions
Christian Heimes39258d32021-04-17 11:36:35 +020010173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10174$as_echo_n "checking for textdomain in -lintl... " >&6; }
10175if ${ac_cv_lib_intl_textdomain+:} false; then :
10176 $as_echo_n "(cached) " >&6
10177else
Martin v. Löwis19d17342003-06-14 21:03:05 +000010178 ac_check_lib_save_LIBS=$LIBS
10179LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010181/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183/* Override any GCC internal prototype to avoid an error.
10184 Use char because int might match the return type of a GCC
10185 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010186#ifdef __cplusplus
10187extern "C"
10188#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010189char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010190int
Christian Heimes39258d32021-04-17 11:36:35 +020010191main ()
Martin v. Löwis19d17342003-06-14 21:03:05 +000010192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010194 ;
10195 return 0;
10196}
10197_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010198if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010199 ac_cv_lib_intl_textdomain=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010200else
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010202fi
Christian Heimes39258d32021-04-17 11:36:35 +020010203rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010205LIBS=$ac_check_lib_save_LIBS
10206fi
Christian Heimes39258d32021-04-17 11:36:35 +020010207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10208$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
10209if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010210
Christian Heimes39258d32021-04-17 11:36:35 +020010211$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010212
Brett Cannonc6d936e2009-06-07 20:09:53 +000010213 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010214fi
10215
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010216
10217# checks for system dependent C++ extensions support
10218case "$ac_sys_system" in
Christian Heimes39258d32021-04-17 11:36:35 +020010219 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10220$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010222/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010223
Georg Brandl59e87bd2011-02-15 19:48:59 +000010224 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010225int
Christian Heimes39258d32021-04-17 11:36:35 +020010226main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010227{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010228loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 ;
10230 return 0;
10231}
Matthias Kloseb159a552010-04-25 21:00:44 +000010232
Martin v. Löwis11437992002-04-12 09:54:03 +000010233_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010234if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010235
Matthias Kloseb159a552010-04-25 21:00:44 +000010236
Christian Heimes39258d32021-04-17 11:36:35 +020010237$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
Christian Heimes39258d32021-04-17 11:36:35 +020010239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10240$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010241
Christian Heimes39258d32021-04-17 11:36:35 +020010242else
Matthias Kloseb159a552010-04-25 21:00:44 +000010243
Christian Heimes39258d32021-04-17 11:36:35 +020010244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10245$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010246
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010247fi
Christian Heimes39258d32021-04-17 11:36:35 +020010248rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010249 conftest$ac_exeext conftest.$ac_ext
10250# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10251# of the AIX system used to build/package Python executable. This tag serves
10252# as a baseline for bdist module packages
Christian Heimes39258d32021-04-17 11:36:35 +020010253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10254$as_echo_n "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010255 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10256
Christian Heimes39258d32021-04-17 11:36:35 +020010257cat >>confdefs.h <<_ACEOF
10258#define AIX_BUILDDATE $AIX_BUILDDATE
10259_ACEOF
Michael Felt39afa2d2019-12-15 15:17:53 +010010260
Christian Heimes39258d32021-04-17 11:36:35 +020010261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10262$as_echo "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010263 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010264 *) ;;
10265esac
10266
Christian Heimes985ecdc2013-11-20 11:46:18 +010010267# check for systems that require aligned memory access
Christian Heimes39258d32021-04-17 11:36:35 +020010268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10269$as_echo_n "checking aligned memory access is required... " >&6; }
10270if ${ac_cv_aligned_required+:} false; then :
10271 $as_echo_n "(cached) " >&6
10272else
10273 if test "$cross_compiling" = yes; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010274 ac_cv_aligned_required=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010275else
Christian Heimes985ecdc2013-11-20 11:46:18 +010010276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10277/* end confdefs.h. */
10278
10279int main()
10280{
10281 char s[16];
10282 int i, *p1, *p2;
10283 for (i=0; i < 16; i++)
10284 s[i] = i;
10285 p1 = (int*)(s+1);
10286 p2 = (int*)(s+2);
10287 if (*p1 == *p2)
10288 return 1;
10289 return 0;
10290}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010291_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010292if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010293 ac_cv_aligned_required=no
Christian Heimes39258d32021-04-17 11:36:35 +020010294else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010295 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010296fi
10297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10298 conftest.$ac_objext conftest.beam conftest.$ac_ext
10299fi
10300
10301
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010302fi
10303
Christian Heimes39258d32021-04-17 11:36:35 +020010304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10305$as_echo "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010306if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010307
Christian Heimes39258d32021-04-17 11:36:35 +020010308$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010309
10310fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010311
10312# str, bytes and memoryview hash algorithm
10313
10314
Christian Heimes39258d32021-04-17 11:36:35 +020010315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10316$as_echo_n "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010317
10318# Check whether --with-hash_algorithm was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010319if test "${with_hash_algorithm+set}" = set; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010010320 withval=$with_hash_algorithm;
Christian Heimes39258d32021-04-17 11:36:35 +020010321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10322$as_echo "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010323case "$withval" in
10324 siphash24)
Christian Heimes39258d32021-04-17 11:36:35 +020010325 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010326
10327 ;;
10328 fnv)
Christian Heimes39258d32021-04-17 11:36:35 +020010329 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010330
10331 ;;
10332 *)
10333 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10334 ;;
10335esac
10336
Christian Heimes39258d32021-04-17 11:36:35 +020010337else
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10339$as_echo "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010340fi
10341
10342
Paul Ganssle62972d92020-05-16 04:20:06 -040010343validate_tzpath() {
10344 # Checks that each element of hte path is an absolute path
10345 if test -z "$1"; then
10346 # Empty string is allowed: it indicates no system TZPATH
10347 return 0
10348 fi
10349
10350 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050010351 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040010352 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10353 return 1;
10354 fi
10355}
10356
10357TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Christian Heimes39258d32021-04-17 11:36:35 +020010358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10359$as_echo_n "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010360
10361# Check whether --with-tzpath was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010362if test "${with_tzpath+set}" = set; then :
Paul Ganssle62972d92020-05-16 04:20:06 -040010363 withval=$with_tzpath;
10364case "$withval" in
10365 yes)
10366 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10367 ;;
10368 *)
10369 validate_tzpath "$withval"
10370 TZPATH="$withval"
Christian Heimes39258d32021-04-17 11:36:35 +020010371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10372$as_echo "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010373 ;;
10374esac
10375
Christian Heimes39258d32021-04-17 11:36:35 +020010376else
Paul Ganssle62972d92020-05-16 04:20:06 -040010377 validate_tzpath "$TZPATH"
Christian Heimes39258d32021-04-17 11:36:35 +020010378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10379$as_echo "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010380fi
10381
10382
10383
Christian Heimes39258d32021-04-17 11:36:35 +020010384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10385$as_echo_n "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010386
10387# Check whether --with-address_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010388if test "${with_address_sanitizer+set}" = set; then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010010389 withval=$with_address_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10391$as_echo "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010392BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10393LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010394# ASan works by controlling memory allocation, our own malloc interferes.
10395with_pymalloc="no"
10396
Christian Heimes39258d32021-04-17 11:36:35 +020010397else
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010400fi
10401
10402
Christian Heimes39258d32021-04-17 11:36:35 +020010403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10404$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010405
10406# Check whether --with-memory_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010407if test "${with_memory_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010408 withval=$with_memory_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10410$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010411BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10412LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10413# MSan works by controlling memory allocation, our own malloc interferes.
10414with_pymalloc="no"
10415
Christian Heimes39258d32021-04-17 11:36:35 +020010416else
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010419fi
10420
10421
Christian Heimes39258d32021-04-17 11:36:35 +020010422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10423$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010424
10425# Check whether --with-undefined_behavior_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010426if test "${with_undefined_behavior_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010427 withval=$with_undefined_behavior_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10429$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010430BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10431LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010432
Christian Heimes39258d32021-04-17 11:36:35 +020010433else
10434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010436fi
10437
10438
Guido van Rossum70c7f481998-03-26 18:44:10 +000010439# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Christian Heimes39258d32021-04-17 11:36:35 +020010440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10441$as_echo_n "checking for t_open in -lnsl... " >&6; }
10442if ${ac_cv_lib_nsl_t_open+:} false; then :
10443 $as_echo_n "(cached) " >&6
10444else
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010446LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450/* Override any GCC internal prototype to avoid an error.
10451 Use char because int might match the return type of a GCC
10452 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010453#ifdef __cplusplus
10454extern "C"
10455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010456char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010457int
Christian Heimes39258d32021-04-17 11:36:35 +020010458main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010460return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ;
10462 return 0;
10463}
10464_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010465if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010466 ac_cv_lib_nsl_t_open=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010467else
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010469fi
Christian Heimes39258d32021-04-17 11:36:35 +020010470rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010472LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010473fi
Christian Heimes39258d32021-04-17 11:36:35 +020010474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10475$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
10476if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010477 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010478fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010479 # SVR4
Christian Heimes39258d32021-04-17 11:36:35 +020010480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10481$as_echo_n "checking for socket in -lsocket... " >&6; }
10482if ${ac_cv_lib_socket_socket+:} false; then :
10483 $as_echo_n "(cached) " >&6
10484else
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010486LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490/* Override any GCC internal prototype to avoid an error.
10491 Use char because int might match the return type of a GCC
10492 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010493#ifdef __cplusplus
10494extern "C"
10495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010496char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010497int
Christian Heimes39258d32021-04-17 11:36:35 +020010498main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 ;
10502 return 0;
10503}
10504_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010505if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 ac_cv_lib_socket_socket=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010507else
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010509fi
Christian Heimes39258d32021-04-17 11:36:35 +020010510rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010512LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010513fi
Christian Heimes39258d32021-04-17 11:36:35 +020010514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10515$as_echo "$ac_cv_lib_socket_socket" >&6; }
10516if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010517 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010518fi
10519 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010520
Christian Heimes39258d32021-04-17 11:36:35 +020010521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10522$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524# Check whether --with-libs was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010525if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526 withval=$with_libs;
Christian Heimes39258d32021-04-17 11:36:35 +020010527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10528$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010529LIBS="$withval $LIBS"
10530
Christian Heimes39258d32021-04-17 11:36:35 +020010531else
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10533$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534fi
10535
Guido van Rossum7f43da71994-08-01 12:15:30 +000010536
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010537
10538
10539
10540
10541
10542
Victor Stinnerb477d192020-01-22 22:48:16 +010010543
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010544if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10545 if test -n "$ac_tool_prefix"; then
10546 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10547set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020010548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10549$as_echo_n "checking for $ac_word... " >&6; }
10550if ${ac_cv_path_PKG_CONFIG+:} false; then :
10551 $as_echo_n "(cached) " >&6
10552else
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010553 case $PKG_CONFIG in
10554 [\\/]* | ?:[\\/]*)
10555 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10556 ;;
10557 *)
10558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10559for as_dir in $PATH
10560do
10561 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020010562 test -z "$as_dir" && as_dir=.
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010563 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020010564 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10565 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10566 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010567 break 2
10568 fi
10569done
10570 done
10571IFS=$as_save_IFS
10572
10573 ;;
10574esac
10575fi
10576PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10577if test -n "$PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020010578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10579$as_echo "$PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010580else
Christian Heimes39258d32021-04-17 11:36:35 +020010581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10582$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010583fi
10584
10585
10586fi
10587if test -z "$ac_cv_path_PKG_CONFIG"; then
10588 ac_pt_PKG_CONFIG=$PKG_CONFIG
10589 # Extract the first word of "pkg-config", so it can be a program name with args.
10590set dummy pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020010591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10592$as_echo_n "checking for $ac_word... " >&6; }
10593if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10594 $as_echo_n "(cached) " >&6
10595else
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010596 case $ac_pt_PKG_CONFIG in
10597 [\\/]* | ?:[\\/]*)
10598 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10599 ;;
10600 *)
10601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10602for as_dir in $PATH
10603do
10604 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020010605 test -z "$as_dir" && as_dir=.
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010606 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020010607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10608 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10609 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010610 break 2
10611 fi
10612done
10613 done
10614IFS=$as_save_IFS
10615
10616 ;;
10617esac
10618fi
10619ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10620if test -n "$ac_pt_PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10622$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010623else
Christian Heimes39258d32021-04-17 11:36:35 +020010624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010626fi
10627
10628 if test "x$ac_pt_PKG_CONFIG" = x; then
10629 PKG_CONFIG=""
10630 else
10631 case $cross_compiling:$ac_tool_warned in
10632yes:)
Christian Heimes39258d32021-04-17 11:36:35 +020010633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010635ac_tool_warned=yes ;;
10636esac
10637 PKG_CONFIG=$ac_pt_PKG_CONFIG
10638 fi
10639else
10640 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10641fi
10642
10643fi
10644if test -n "$PKG_CONFIG"; then
10645 _pkg_min_version=0.9.0
Christian Heimes39258d32021-04-17 11:36:35 +020010646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10647$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010648 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Christian Heimes39258d32021-04-17 11:36:35 +020010649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10650$as_echo "yes" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010651 else
Christian Heimes39258d32021-04-17 11:36:35 +020010652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10653$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010654 PKG_CONFIG=""
10655 fi
10656fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010657
10658# Check for use of the system expat library
Christian Heimes39258d32021-04-17 11:36:35 +020010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10660$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010661
10662# Check whether --with-system_expat was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010663if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010664 withval=$with_system_expat;
Christian Heimes39258d32021-04-17 11:36:35 +020010665else
Benjamin Peterson79263252010-10-31 16:50:44 +000010666 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010667fi
10668
10669
Christian Heimes39258d32021-04-17 11:36:35 +020010670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10671$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010672
10673# Check for use of the system libffi library
Christian Heimes39258d32021-04-17 11:36:35 +020010674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10675$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010676
10677# Check whether --with-system_ffi was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010678if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010679 withval=$with_system_ffi;
10680fi
10681
10682
Zachary Waref40d4dd2016-09-17 01:25:24 -050010683if test "$ac_sys_system" = "Darwin"
10684then
10685 case "$with_system_ffi" in
10686 "")
10687 with_system_ffi="no"
10688 ;;
10689 yes|no)
10690 ;;
10691 *)
10692 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10693 ;;
10694 esac
Christian Heimes39258d32021-04-17 11:36:35 +020010695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10696$as_echo "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010697else
Christian Heimes39258d32021-04-17 11:36:35 +020010698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10699$as_echo "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010700 if test "$with_system_ffi" != ""
10701 then
Christian Heimes39258d32021-04-17 11:36:35 +020010702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10703$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050010704 fi
10705 with_system_ffi="yes"
10706fi
Zachary Ware935043d2016-09-09 17:01:21 -070010707
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010708if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010709 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10710else
10711 LIBFFI_INCLUDEDIR=""
10712fi
10713
10714
Stefan Krah60187b52012-03-23 19:06:27 +010010715# Check for use of the system libmpdec library
Christian Heimes39258d32021-04-17 11:36:35 +020010716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10717$as_echo_n "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010718
10719# Check whether --with-system_libmpdec was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010720if test "${with_system_libmpdec+set}" = set; then :
Stefan Krah60187b52012-03-23 19:06:27 +010010721 withval=$with_system_libmpdec;
Christian Heimes39258d32021-04-17 11:36:35 +020010722else
Stefan Krah60187b52012-03-23 19:06:27 +010010723 with_system_libmpdec="no"
10724fi
10725
10726
Christian Heimes39258d32021-04-17 11:36:35 +020010727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10728$as_echo "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010729
Stefan Krah815280e2020-02-29 19:43:42 +010010730# Check whether _decimal should use a coroutine-local or thread-local context
Christian Heimes39258d32021-04-17 11:36:35 +020010731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10732$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010733
10734# Check whether --with-decimal_contextvar was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010735if test "${with_decimal_contextvar+set}" = set; then :
Stefan Krah815280e2020-02-29 19:43:42 +010010736 withval=$with_decimal_contextvar;
Christian Heimes39258d32021-04-17 11:36:35 +020010737else
Stefan Krah815280e2020-02-29 19:43:42 +010010738 with_decimal_contextvar="yes"
10739fi
10740
10741
10742if test "$with_decimal_contextvar" != "no"
10743then
10744
Christian Heimes39258d32021-04-17 11:36:35 +020010745$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010010746
10747fi
10748
Christian Heimes39258d32021-04-17 11:36:35 +020010749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10750$as_echo "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010751
Benjamin Peterson076ed002010-10-31 17:11:02 +000010752# Check for support for loadable sqlite extensions
Christian Heimes39258d32021-04-17 11:36:35 +020010753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10754$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010755# Check whether --enable-loadable-sqlite-extensions was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010756if test "${enable_loadable_sqlite_extensions+set}" = set; then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000010757 enableval=$enable_loadable_sqlite_extensions;
Christian Heimes39258d32021-04-17 11:36:35 +020010758else
Benjamin Peterson076ed002010-10-31 17:11:02 +000010759 enable_loadable_sqlite_extensions="no"
10760fi
10761
10762
Christian Heimes39258d32021-04-17 11:36:35 +020010763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10764$as_echo "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010765
Ned Deilyd819b932013-09-06 01:07:05 -070010766# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10767
10768
Christian Heimes39258d32021-04-17 11:36:35 +020010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10770$as_echo_n "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010771
10772# Check whether --with-tcltk-includes was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010773if test "${with_tcltk_includes+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010774 withval=$with_tcltk_includes;
Christian Heimes39258d32021-04-17 11:36:35 +020010775else
Ned Deilyd819b932013-09-06 01:07:05 -070010776 with_tcltk_includes="default"
10777fi
10778
Christian Heimes39258d32021-04-17 11:36:35 +020010779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10780$as_echo "$with_tcltk_includes" >&6; }
10781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10782$as_echo_n "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010783
10784# Check whether --with-tcltk-libs was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010785if test "${with_tcltk_libs+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010786 withval=$with_tcltk_libs;
Christian Heimes39258d32021-04-17 11:36:35 +020010787else
Ned Deilyd819b932013-09-06 01:07:05 -070010788 with_tcltk_libs="default"
10789fi
10790
Christian Heimes39258d32021-04-17 11:36:35 +020010791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10792$as_echo "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010793if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10794then
10795 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10796 then
10797 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10798 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010010799 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
10800 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
10801 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
10802 else
10803 TCLTK_INCLUDES=""
10804 TCLTK_LIBS=""
10805 fi
Ned Deilyd819b932013-09-06 01:07:05 -070010806else
10807 TCLTK_INCLUDES="$with_tcltk_includes"
10808 TCLTK_LIBS="$with_tcltk_libs"
10809fi
10810
Matthias Klose55708cc2009-04-30 08:06:49 +000010811# Check for --with-dbmliborder
Christian Heimes39258d32021-04-17 11:36:35 +020010812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10813$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010814
10815# Check whether --with-dbmliborder was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010816if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010817 withval=$with_dbmliborder;
10818if test x$with_dbmliborder = xyes
10819then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010820as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010821else
10822 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10823 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10824 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010825 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010826 fi
10827 done
10828fi
10829fi
10830
Christian Heimes39258d32021-04-17 11:36:35 +020010831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10832$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010833
Martin v. Löwis11437992002-04-12 09:54:03 +000010834# Templates for things AC_DEFINEd more than once.
10835# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010836
10837
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010838if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010839then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010840 # Defining _REENTRANT on system with POSIX threads should not hurt.
Christian Heimes39258d32021-04-17 11:36:35 +020010841 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010842
10843 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010844 if test "$ac_sys_system" = "SunOS"; then
10845 CFLAGS="$CFLAGS -D_REENTRANT"
10846 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010847elif test "$ac_cv_kpthread" = "yes"
10848then
10849 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010850 if test "$ac_cv_cxx_thread" = "yes"; then
10851 CXX="$CXX -Kpthread"
10852 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010853 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010854elif test "$ac_cv_kthread" = "yes"
10855then
10856 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010857 if test "$ac_cv_cxx_thread" = "yes"; then
10858 CXX="$CXX -Kthread"
10859 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010860 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010861elif test "$ac_cv_pthread" = "yes"
10862then
10863 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010864 if test "$ac_cv_cxx_thread" = "yes"; then
10865 CXX="$CXX -pthread"
10866 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010867 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010868else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010869 if test ! -z "$withval" -a -d "$withval"
10870 then LDFLAGS="$LDFLAGS -L$withval"
10871 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010872
10873 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010874 # define _POSIX_THREADS in unistd.h. Some apparently don't
10875 # (e.g. gnu pth with pthread emulation)
Christian Heimes39258d32021-04-17 11:36:35 +020010876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10877$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010879/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010880
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010881#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010882#ifdef _POSIX_THREADS
10883yes
10884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010885
10886_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020010888 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010889 unistd_defines_pthreads=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010890else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010891 unistd_defines_pthreads=no
10892fi
Christian Heimes39258d32021-04-17 11:36:35 +020010893rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010894
Christian Heimes39258d32021-04-17 11:36:35 +020010895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10896$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010897
Christian Heimes39258d32021-04-17 11:36:35 +020010898 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010899
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010900 # Just looking for pthread_create in libpthread is not enough:
10901 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10902 # So we really have to include pthread.h, and then link.
10903 _libs=$LIBS
10904 LIBS="$LIBS -lpthread"
Christian Heimes39258d32021-04-17 11:36:35 +020010905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10906$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010908/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010909
10910#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010911#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010912
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010913void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010914int
Christian Heimes39258d32021-04-17 11:36:35 +020010915main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010916{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010917
10918pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 ;
10920 return 0;
10921}
10922_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010924
Christian Heimes39258d32021-04-17 11:36:35 +020010925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10926$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010927 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010928
Christian Heimes39258d32021-04-17 11:36:35 +020010929else
Martin v. Löwis11437992002-04-12 09:54:03 +000010930
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010931 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Christian Heimes39258d32021-04-17 11:36:35 +020010933if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010934
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010935 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010936
Christian Heimes39258d32021-04-17 11:36:35 +020010937else
Guido van Rossumad678af1998-10-02 14:42:15 +000010938
Christian Heimes39258d32021-04-17 11:36:35 +020010939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10940$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
10941if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
10942 $as_echo_n "(cached) " >&6
10943else
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010945LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949/* Override any GCC internal prototype to avoid an error.
10950 Use char because int might match the return type of a GCC
10951 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010952#ifdef __cplusplus
10953extern "C"
10954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010955char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010956int
Christian Heimes39258d32021-04-17 11:36:35 +020010957main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ;
10961 return 0;
10962}
10963_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 ac_cv_lib_pthreads_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010966else
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010968fi
Christian Heimes39258d32021-04-17 11:36:35 +020010969rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010971LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010972fi
Christian Heimes39258d32021-04-17 11:36:35 +020010973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10974$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
10975if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010976
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010977 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010978 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010979
Christian Heimes39258d32021-04-17 11:36:35 +020010980else
Greg Steinadf63d62000-07-05 10:38:09 +000010981
Christian Heimes39258d32021-04-17 11:36:35 +020010982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10983$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
10984if ${ac_cv_lib_c_r_pthread_create+:} false; then :
10985 $as_echo_n "(cached) " >&6
10986else
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010988LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992/* Override any GCC internal prototype to avoid an error.
10993 Use char because int might match the return type of a GCC
10994 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010995#ifdef __cplusplus
10996extern "C"
10997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010998char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010999int
Christian Heimes39258d32021-04-17 11:36:35 +020011000main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 ;
11004 return 0;
11005}
11006_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011007if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011008 ac_cv_lib_c_r_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011009else
Matthias Kloseb9621712010-04-24 17:59:49 +000011010 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011011fi
Christian Heimes39258d32021-04-17 11:36:35 +020011012rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011014LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011015fi
Christian Heimes39258d32021-04-17 11:36:35 +020011016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
11017$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
11018if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000011019
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011020 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011021 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011022
Christian Heimes39258d32021-04-17 11:36:35 +020011023else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011024
Christian Heimes39258d32021-04-17 11:36:35 +020011025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
11026$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
11027if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
11028 $as_echo_n "(cached) " >&6
11029else
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011031LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035/* Override any GCC internal prototype to avoid an error.
11036 Use char because int might match the return type of a GCC
11037 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011038#ifdef __cplusplus
11039extern "C"
11040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011041char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011042int
Christian Heimes39258d32021-04-17 11:36:35 +020011043main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 ;
11047 return 0;
11048}
11049_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 ac_cv_lib_pthread___pthread_create_system=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011052else
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011054fi
Christian Heimes39258d32021-04-17 11:36:35 +020011055rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011057LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011058fi
Christian Heimes39258d32021-04-17 11:36:35 +020011059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11060$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
11061if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011062
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011063 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011064 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011065
Christian Heimes39258d32021-04-17 11:36:35 +020011066else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011067
Christian Heimes39258d32021-04-17 11:36:35 +020011068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
11069$as_echo_n "checking for pthread_create in -lcma... " >&6; }
11070if ${ac_cv_lib_cma_pthread_create+:} false; then :
11071 $as_echo_n "(cached) " >&6
11072else
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011074LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078/* Override any GCC internal prototype to avoid an error.
11079 Use char because int might match the return type of a GCC
11080 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011081#ifdef __cplusplus
11082extern "C"
11083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011084char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011085int
Christian Heimes39258d32021-04-17 11:36:35 +020011086main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 ;
11090 return 0;
11091}
11092_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011093if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 ac_cv_lib_cma_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011095else
Matthias Kloseb9621712010-04-24 17:59:49 +000011096 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011097fi
Christian Heimes39258d32021-04-17 11:36:35 +020011098rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011100LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011101fi
Christian Heimes39258d32021-04-17 11:36:35 +020011102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11103$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
11104if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011105
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011106 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011107 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011108
Christian Heimes39258d32021-04-17 11:36:35 +020011109else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011110
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011111 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11112
Guido van Rossum2d38f911996-06-26 19:47:01 +000011113fi
11114
Guido van Rossum627b2d71993-12-24 10:39:16 +000011115
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011116fi
11117
Guido van Rossum0be3e491997-05-22 20:33:33 +000011118fi
11119
Guido van Rossum49545951997-12-02 19:28:29 +000011120fi
11121
Guido van Rossumb93a8621998-05-07 13:27:32 +000011122fi
11123
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011124fi
Christian Heimes39258d32021-04-17 11:36:35 +020011125rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011126 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011127
Christian Heimes39258d32021-04-17 11:36:35 +020011128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11129$as_echo_n "checking for usconfig in -lmpc... " >&6; }
11130if ${ac_cv_lib_mpc_usconfig+:} false; then :
11131 $as_echo_n "(cached) " >&6
11132else
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011134LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138/* Override any GCC internal prototype to avoid an error.
11139 Use char because int might match the return type of a GCC
11140 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011141#ifdef __cplusplus
11142extern "C"
11143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011144char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011145int
Christian Heimes39258d32021-04-17 11:36:35 +020011146main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011149 ;
11150 return 0;
11151}
11152_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011153if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 ac_cv_lib_mpc_usconfig=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011155else
Matthias Kloseb9621712010-04-24 17:59:49 +000011156 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011157fi
Christian Heimes39258d32021-04-17 11:36:35 +020011158rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011160LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161fi
Christian Heimes39258d32021-04-17 11:36:35 +020011162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11163$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
11164if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011165
Martin v. Löwis130fb172001-07-19 11:00:41 +000011166 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011167
Guido van Rossum627b2d71993-12-24 10:39:16 +000011168fi
11169
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011170
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011171fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011172
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011173if test "$posix_threads" = "yes"; then
11174 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011175
Christian Heimes39258d32021-04-17 11:36:35 +020011176$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011177
11178 fi
11179
11180 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11181 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011182 SunOS/5.6)
Christian Heimes39258d32021-04-17 11:36:35 +020011183$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011184
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011185 ;;
11186 SunOS/5.8)
Christian Heimes39258d32021-04-17 11:36:35 +020011187$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011188
11189 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011190 AIX/*)
Christian Heimes39258d32021-04-17 11:36:35 +020011191$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011192
11193 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011194 esac
11195
Christian Heimes39258d32021-04-17 11:36:35 +020011196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11197$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
11198 if ${ac_cv_pthread_system_supported+:} false; then :
11199 $as_echo_n "(cached) " >&6
11200else
11201 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011202 ac_cv_pthread_system_supported=no
Christian Heimes39258d32021-04-17 11:36:35 +020011203else
Matthias Kloseb9621712010-04-24 17:59:49 +000011204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011206
11207 #include <stdio.h>
11208 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011209 void *foo(void *parm) {
11210 return NULL;
11211 }
11212 main() {
11213 pthread_attr_t attr;
11214 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011215 if (pthread_attr_init(&attr)) return (-1);
11216 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11217 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11218 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011219 }
11220_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011221if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011222 ac_cv_pthread_system_supported=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011223else
Matthias Kloseb9621712010-04-24 17:59:49 +000011224 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11227 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011228fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230
Guido van Rossum627b2d71993-12-24 10:39:16 +000011231fi
11232
Christian Heimes39258d32021-04-17 11:36:35 +020011233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11234$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011235 if test "$ac_cv_pthread_system_supported" = "yes"; then
11236
Christian Heimes39258d32021-04-17 11:36:35 +020011237$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011238
11239 fi
Christian Heimes39258d32021-04-17 11:36:35 +020011240 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000011241do :
11242 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Christian Heimes39258d32021-04-17 11:36:35 +020011243if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
11244 cat >>confdefs.h <<_ACEOF
11245#define HAVE_PTHREAD_SIGMASK 1
11246_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011247 case $ac_sys_system in
11248 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011249
Christian Heimes39258d32021-04-17 11:36:35 +020011250$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011251
11252 ;;
11253 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011254fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011255done
Christian Heimes39258d32021-04-17 11:36:35 +020011256
11257 for ac_func in pthread_getcpuclockid
11258do :
11259 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11260if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11261 cat >>confdefs.h <<_ACEOF
11262#define HAVE_PTHREAD_GETCPUCLOCKID 1
11263_ACEOF
pdoxe14679c2017-10-05 00:01:56 -070011264
11265fi
Christian Heimes39258d32021-04-17 11:36:35 +020011266done
pdoxe14679c2017-10-05 00:01:56 -070011267
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011268fi
11269
11270
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011271# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Christian Heimes39258d32021-04-17 11:36:35 +020011273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11274$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275# Check whether --enable-ipv6 was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011276if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011277 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011278 no)
Christian Heimes39258d32021-04-17 11:36:35 +020011279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11280$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011281 ipv6=no
11282 ;;
Christian Heimes39258d32021-04-17 11:36:35 +020011283 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11284$as_echo "yes" >&6; }
11285 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011286
11287 ipv6=yes
11288 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 esac
Christian Heimes39258d32021-04-17 11:36:35 +020011290else
Martin v. Löwis11437992002-04-12 09:54:03 +000011291
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011294 /* AF_INET6 available check */
11295#include <sys/types.h>
11296#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011297int
Christian Heimes39258d32021-04-17 11:36:35 +020011298main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011299{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011300int domain = AF_INET6;
11301 ;
11302 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011303}
Martin v. Löwis11437992002-04-12 09:54:03 +000011304_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011305if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011306
Christian Heimes39258d32021-04-17 11:36:35 +020011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11308$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011309 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011310
Christian Heimes39258d32021-04-17 11:36:35 +020011311else
Matthias Kloseb159a552010-04-25 21:00:44 +000011312
Christian Heimes39258d32021-04-17 11:36:35 +020011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11314$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011315 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011316
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011317fi
Christian Heimes39258d32021-04-17 11:36:35 +020011318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011320if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11322$as_echo_n "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011325
11326 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011327#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
Christian Heimes39258d32021-04-17 11:36:35 +020011329main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011330{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011331struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011332 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ;
11334 return 0;
11335}
Matthias Kloseb159a552010-04-25 21:00:44 +000011336
Martin v. Löwis11437992002-04-12 09:54:03 +000011337_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011338if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011339
Christian Heimes39258d32021-04-17 11:36:35 +020011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11341$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011342 ipv6=yes
11343
Christian Heimes39258d32021-04-17 11:36:35 +020011344else
Matthias Kloseb159a552010-04-25 21:00:44 +000011345
Christian Heimes39258d32021-04-17 11:36:35 +020011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011348 ipv6=no
11349
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011350fi
Christian Heimes39258d32021-04-17 11:36:35 +020011351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011352fi
11353
11354if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011355 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011356
11357fi
11358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359fi
11360
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011361
11362ipv6type=unknown
11363ipv6lib=none
11364ipv6trylibc=no
11365
11366if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11368$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011369 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11370 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011371 case $i in
11372 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011374/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011375
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011376#include <netinet/in.h>
11377#ifdef IPV6_INRIA_VERSION
11378yes
11379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011380_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011382 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011383 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011384fi
Christian Heimes39258d32021-04-17 11:36:35 +020011385rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011386
11387 ;;
11388 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011391
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011392#include <netinet/in.h>
11393#ifdef __KAME__
11394yes
11395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011396_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011398 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011399 ipv6type=$i;
11400 ipv6lib=inet6
11401 ipv6libdir=/usr/local/v6/lib
11402 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011403fi
Christian Heimes39258d32021-04-17 11:36:35 +020011404rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011405
11406 ;;
11407 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011409/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011410
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011411#include <features.h>
11412#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11413yes
11414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011415_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011416if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011417 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011418 ipv6type=$i;
11419 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011420fi
Christian Heimes39258d32021-04-17 11:36:35 +020011421rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011422
11423 ;;
11424 linux-inet6)
11425 if test -d /usr/inet6; then
11426 ipv6type=$i
11427 ipv6lib=inet6
11428 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011429 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011430 fi
11431 ;;
11432 solaris)
11433 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011434 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011435 ipv6type=$i
11436 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011437 fi
11438 fi
11439 ;;
11440 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011442/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011443
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011444#include <sys/param.h>
11445#ifdef _TOSHIBA_INET6
11446yes
11447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011448_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011450 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011451 ipv6type=$i;
11452 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011453 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011454fi
Christian Heimes39258d32021-04-17 11:36:35 +020011455rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011456
11457 ;;
11458 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011460/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011461
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011462#include </usr/local/v6/include/sys/v6config.h>
11463#ifdef __V6D__
11464yes
11465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011466_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011468 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011469 ipv6type=$i;
11470 ipv6lib=v6;
11471 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011472 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011473fi
Christian Heimes39258d32021-04-17 11:36:35 +020011474rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011475
11476 ;;
11477 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011479/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011480
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011481#include <sys/param.h>
11482#ifdef _ZETA_MINAMI_INET6
11483yes
11484#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011485_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011487 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011488 ipv6type=$i;
11489 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011490 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011491fi
Christian Heimes39258d32021-04-17 11:36:35 +020011492rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011493
11494 ;;
11495 esac
11496 if test "$ipv6type" != "unknown"; then
11497 break
11498 fi
11499 done
Christian Heimes39258d32021-04-17 11:36:35 +020011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11501$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011502fi
11503
11504if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11505 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11506 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11507 echo "using lib$ipv6lib"
11508 else
11509 if test $ipv6trylibc = "yes"; then
11510 echo "using libc"
11511 else
11512 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11513 echo "You need to fetch lib$ipv6lib.a from appropriate"
11514 echo 'ipv6 kit and compile beforehand.'
11515 exit 1
11516 fi
11517 fi
11518fi
11519
Christian Heimes39258d32021-04-17 11:36:35 +020011520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11521$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11523/* end confdefs.h. */
11524 /* CAN_RAW_FD_FRAMES available check */
11525#include <linux/can/raw.h>
11526int
Christian Heimes39258d32021-04-17 11:36:35 +020011527main ()
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011528{
11529int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11530 ;
11531 return 0;
11532}
11533_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011534if ac_fn_c_try_compile "$LINENO"; then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011535
11536
Christian Heimes39258d32021-04-17 11:36:35 +020011537$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011538
Christian Heimes39258d32021-04-17 11:36:35 +020011539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11540$as_echo "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011541
Christian Heimes39258d32021-04-17 11:36:35 +020011542else
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011543
Christian Heimes39258d32021-04-17 11:36:35 +020011544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545$as_echo "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011546
11547fi
Christian Heimes39258d32021-04-17 11:36:35 +020011548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011549
Christian Heimes39258d32021-04-17 11:36:35 +020011550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11551$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11553/* end confdefs.h. */
11554
11555#include <linux/can/raw.h>
11556int
Christian Heimes39258d32021-04-17 11:36:35 +020011557main ()
Zackery Spytz97e0de02020-04-09 06:03:49 -060011558{
11559int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11560 ;
11561 return 0;
11562}
11563_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011564if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060011565
11566
Christian Heimes39258d32021-04-17 11:36:35 +020011567$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060011568
Christian Heimes39258d32021-04-17 11:36:35 +020011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11570$as_echo "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011571
Christian Heimes39258d32021-04-17 11:36:35 +020011572else
Zackery Spytz97e0de02020-04-09 06:03:49 -060011573
Christian Heimes39258d32021-04-17 11:36:35 +020011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011576
11577fi
Christian Heimes39258d32021-04-17 11:36:35 +020011578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060011579
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011580# Check for --with-doc-strings
Christian Heimes39258d32021-04-17 11:36:35 +020011581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11582$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584# Check whether --with-doc-strings was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011585if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586 withval=$with_doc_strings;
11587fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011588
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011589
11590if test -z "$with_doc_strings"
11591then with_doc_strings="yes"
11592fi
11593if test "$with_doc_strings" != "no"
11594then
11595
Christian Heimes39258d32021-04-17 11:36:35 +020011596$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011597
11598fi
Christian Heimes39258d32021-04-17 11:36:35 +020011599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11600$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011601
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011602# Check for Python-specific malloc support
Christian Heimes39258d32021-04-17 11:36:35 +020011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11604$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606# Check whether --with-pymalloc was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011607if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011608 withval=$with_pymalloc;
11609fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011610
Neil Schemenauera35c6882001-02-27 04:45:05 +000011611
Neil Schemenauer16c22972002-03-22 15:34:49 +000011612if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011613then
11614 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011615fi
11616if test "$with_pymalloc" != "no"
11617then
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
Christian Heimes39258d32021-04-17 11:36:35 +020011619$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011620
11621fi
Christian Heimes39258d32021-04-17 11:36:35 +020011622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11623$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011624
Nick Coghlan6ea41862017-06-11 13:16:15 +100011625# Check for --with-c-locale-coercion
Christian Heimes39258d32021-04-17 11:36:35 +020011626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11627$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011628
11629# Check whether --with-c-locale-coercion was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011630if test "${with_c_locale_coercion+set}" = set; then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100011631 withval=$with_c_locale_coercion;
11632fi
11633
11634
11635if test -z "$with_c_locale_coercion"
11636then
11637 with_c_locale_coercion="yes"
11638fi
11639if test "$with_c_locale_coercion" != "no"
11640then
11641
Christian Heimes39258d32021-04-17 11:36:35 +020011642$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100011643
11644fi
Christian Heimes39258d32021-04-17 11:36:35 +020011645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11646$as_echo "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011647
Benjamin Peterson05159c42009-12-03 03:01:27 +000011648# Check for Valgrind support
Christian Heimes39258d32021-04-17 11:36:35 +020011649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11650$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011651
11652# Check whether --with-valgrind was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011653if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011654 withval=$with_valgrind;
Christian Heimes39258d32021-04-17 11:36:35 +020011655else
Benjamin Peterson05159c42009-12-03 03:01:27 +000011656 with_valgrind=no
11657fi
11658
Christian Heimes39258d32021-04-17 11:36:35 +020011659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11660$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011661if test "$with_valgrind" != no; then
Christian Heimes39258d32021-04-17 11:36:35 +020011662 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
11663if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011664
Christian Heimes39258d32021-04-17 11:36:35 +020011665$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011666
Christian Heimes39258d32021-04-17 11:36:35 +020011667else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011668 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011669
11670fi
11671
Christian Heimes39258d32021-04-17 11:36:35 +020011672
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011673 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011674fi
11675
Łukasz Langaa785c872016-09-09 17:37:37 -070011676# Check for DTrace support
Christian Heimes39258d32021-04-17 11:36:35 +020011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11678$as_echo_n "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011679
11680# Check whether --with-dtrace was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011681if test "${with_dtrace+set}" = set; then :
Łukasz Langaa785c872016-09-09 17:37:37 -070011682 withval=$with_dtrace;
Christian Heimes39258d32021-04-17 11:36:35 +020011683else
Łukasz Langaa785c872016-09-09 17:37:37 -070011684 with_dtrace=no
11685fi
11686
Christian Heimes39258d32021-04-17 11:36:35 +020011687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11688$as_echo "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011689
11690
11691
11692
11693
11694DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011695DTRACE_HEADERS=
11696DTRACE_OBJS=
11697
11698if test "$with_dtrace" = "yes"
11699then
11700 # Extract the first word of "dtrace", so it can be a program name with args.
11701set dummy dtrace; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020011702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11703$as_echo_n "checking for $ac_word... " >&6; }
11704if ${ac_cv_path_DTRACE+:} false; then :
11705 $as_echo_n "(cached) " >&6
11706else
Łukasz Langaa785c872016-09-09 17:37:37 -070011707 case $DTRACE in
11708 [\\/]* | ?:[\\/]*)
11709 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11710 ;;
11711 *)
11712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11713for as_dir in $PATH
11714do
11715 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020011716 test -z "$as_dir" && as_dir=.
Łukasz Langaa785c872016-09-09 17:37:37 -070011717 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020011718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11719 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070011721 break 2
11722 fi
11723done
11724 done
11725IFS=$as_save_IFS
11726
11727 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11728 ;;
11729esac
11730fi
11731DTRACE=$ac_cv_path_DTRACE
11732if test -n "$DTRACE"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11734$as_echo "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011735else
Christian Heimes39258d32021-04-17 11:36:35 +020011736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11737$as_echo "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011738fi
11739
11740
11741 if test "$DTRACE" = "not found"; then
11742 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11743 fi
11744
Christian Heimes39258d32021-04-17 11:36:35 +020011745$as_echo "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070011746
11747 DTRACE_HEADERS="Include/pydtrace_probes.h"
11748
11749 # On OS X, DTrace providers do not need to be explicitly compiled and
11750 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11751 # generation flag '-G'. We check for presence of this flag, rather than
11752 # hardcoding support by OS, in the interest of robustness.
Christian Heimes39258d32021-04-17 11:36:35 +020011753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11754$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11755if ${ac_cv_dtrace_link+:} false; then :
11756 $as_echo_n "(cached) " >&6
11757else
Łukasz Langaa785c872016-09-09 17:37:37 -070011758 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011759 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011760 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011761 ac_cv_dtrace_link=yes
11762
11763fi
Christian Heimes39258d32021-04-17 11:36:35 +020011764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11765$as_echo "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011766 if test "$ac_cv_dtrace_link" = "yes"; then
11767 DTRACE_OBJS="Python/pydtrace.o"
11768 fi
11769fi
11770
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011771# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011772
Guido van Rossum98935bf2001-09-05 19:13:16 +000011773DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011774
Guido van Rossume97ee181999-12-20 21:27:22 +000011775# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011776# platforms have dlopen(), but don't want to use it.
Christian Heimes39258d32021-04-17 11:36:35 +020011777for ac_func in dlopen
11778do :
11779 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11780if test "x$ac_cv_func_dlopen" = xyes; then :
11781 cat >>confdefs.h <<_ACEOF
11782#define HAVE_DLOPEN 1
11783_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011784
Guido van Rossume97ee181999-12-20 21:27:22 +000011785fi
Christian Heimes39258d32021-04-17 11:36:35 +020011786done
Guido van Rossume97ee181999-12-20 21:27:22 +000011787
Michael W. Hudson54241132001-12-07 15:38:26 +000011788
Guido van Rossume97ee181999-12-20 21:27:22 +000011789# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11790# loading of modules.
11791
Christian Heimes39258d32021-04-17 11:36:35 +020011792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11793$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011794if test -z "$DYNLOADFILE"
11795then
11796 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011797 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011798 *)
11799 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11800 # out any dynamic loading
11801 if test "$ac_cv_func_dlopen" = yes
11802 then DYNLOADFILE="dynload_shlib.o"
11803 else DYNLOADFILE="dynload_stub.o"
11804 fi
11805 ;;
11806 esac
11807fi
Christian Heimes39258d32021-04-17 11:36:35 +020011808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11809$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011810if test "$DYNLOADFILE" != "dynload_stub.o"
11811then
Martin v. Löwis11437992002-04-12 09:54:03 +000011812
Christian Heimes39258d32021-04-17 11:36:35 +020011813$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011814
11815fi
11816
Neil Schemenauer4e425612001-06-19 15:44:15 +000011817# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11818
Michael W. Hudson54241132001-12-07 15:38:26 +000011819
Christian Heimes39258d32021-04-17 11:36:35 +020011820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11821$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011822if test -z "$MACHDEP_OBJS"
11823then
Jack Jansene578a632001-08-15 01:27:14 +000011824 MACHDEP_OBJS=$extra_machdep_objs
11825else
11826 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011827fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011828if test -z "$MACHDEP_OBJS"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11830$as_echo "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011831else
Christian Heimes39258d32021-04-17 11:36:35 +020011832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11833$as_echo "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011834fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011835
Guido van Rossum627b2d71993-12-24 10:39:16 +000011836# checks for library functions
Christian Heimes39258d32021-04-17 11:36:35 +020011837for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
11838 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11839 explicit_memset faccessat fchmod fchmodat fchown fchownat \
11840 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
11841 futimens futimes gai_strerror getentropy \
11842 getgrgid_r getgrnam_r \
11843 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
11844 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
11845 if_nameindex \
11846 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
11847 memrchr mbrtowc mkdirat mkfifo \
11848 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
11849 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
11850 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
11851 readlink readlinkat readv realpath renameat \
11852 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
11853 setgid sethostname \
11854 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
11855 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11856 sched_rr_get_interval \
11857 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
11858 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
11859 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
11860 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
11861 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
11862do :
11863 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11864ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11865if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11866 cat >>confdefs.h <<_ACEOF
11867#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11868_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011869
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011870fi
Christian Heimes39258d32021-04-17 11:36:35 +020011871done
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011872
Michael W. Hudson54241132001-12-07 15:38:26 +000011873
Benjamin Peterson40caa052018-09-12 15:52:40 -070011874# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11875# links. Some libc implementations have a stub lchmod implementation that always
11876# returns an error.
11877if test "$MACHDEP" != linux; then
Christian Heimes39258d32021-04-17 11:36:35 +020011878 for ac_func in lchmod
11879do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011880 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Christian Heimes39258d32021-04-17 11:36:35 +020011881if test "x$ac_cv_func_lchmod" = xyes; then :
11882 cat >>confdefs.h <<_ACEOF
11883#define HAVE_LCHMOD 1
Benjamin Petersoned709d52018-09-12 17:22:11 -070011884_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011885
11886fi
Christian Heimes39258d32021-04-17 11:36:35 +020011887done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011888
Christian Heimes39258d32021-04-17 11:36:35 +020011889fi
11890
11891ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011892 #include <dirent.h>
Christian Heimes39258d32021-04-17 11:36:35 +020011893"
11894if test "x$ac_cv_have_decl_dirfd" = xyes; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011895
Christian Heimes39258d32021-04-17 11:36:35 +020011896$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011897
11898fi
11899
Christian Heimes39258d32021-04-17 11:36:35 +020011900
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011901# For some functions, having a definition is not sufficient, since
11902# we want to take their address.
Christian Heimes39258d32021-04-17 11:36:35 +020011903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11904$as_echo_n "checking for chroot... " >&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öwisc8ad7cc2002-11-11 13:23:45 +000011907#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011908int
Christian Heimes39258d32021-04-17 11:36:35 +020011909main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011910{
11911void *x=chroot
11912 ;
11913 return 0;
11914}
11915_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011917
Christian Heimes39258d32021-04-17 11:36:35 +020011918$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011919
Christian Heimes39258d32021-04-17 11:36:35 +020011920 { $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öwisc8ad7cc2002-11-11 13:23:45 +000011925
11926fi
Christian Heimes39258d32021-04-17 11:36:35 +020011927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11929$as_echo_n "checking for link... " >&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öwisc8ad7cc2002-11-11 13:23:45 +000011932#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011933int
Christian Heimes39258d32021-04-17 11:36:35 +020011934main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011935{
11936void *x=link
11937 ;
11938 return 0;
11939}
11940_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011941if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011942
Christian Heimes39258d32021-04-17 11:36:35 +020011943$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011944
Christian Heimes39258d32021-04-17 11:36:35 +020011945 { $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öwisc8ad7cc2002-11-11 13:23:45 +000011950
11951fi
Christian Heimes39258d32021-04-17 11:36:35 +020011952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11954$as_echo_n "checking for symlink... " >&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öwisc8ad7cc2002-11-11 13:23:45 +000011957#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011958int
Christian Heimes39258d32021-04-17 11:36:35 +020011959main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011960{
11961void *x=symlink
11962 ;
11963 return 0;
11964}
11965_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011967
Christian Heimes39258d32021-04-17 11:36:35 +020011968$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011969
Christian Heimes39258d32021-04-17 11:36:35 +020011970 { $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öwisc8ad7cc2002-11-11 13:23:45 +000011975
11976fi
Christian Heimes39258d32021-04-17 11:36:35 +020011977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11979$as_echo_n "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011981/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011982#include <unistd.h>
11983int
Christian Heimes39258d32021-04-17 11:36:35 +020011984main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011985{
11986void *x=fchdir
11987 ;
11988 return 0;
11989}
11990_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011992
Christian Heimes39258d32021-04-17 11:36:35 +020011993$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011994
Christian Heimes39258d32021-04-17 11:36:35 +020011995 { $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; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012000
12001fi
Christian Heimes39258d32021-04-17 11:36:35 +020012002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
12004$as_echo_n "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012006/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012007#include <unistd.h>
12008int
Christian Heimes39258d32021-04-17 11:36:35 +020012009main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012010{
12011void *x=fsync
12012 ;
12013 return 0;
12014}
12015_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012016if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012017
Christian Heimes39258d32021-04-17 11:36:35 +020012018$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012019
Christian Heimes39258d32021-04-17 11:36:35 +020012020 { $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; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012025
12026fi
Christian Heimes39258d32021-04-17 11:36:35 +020012027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
12029$as_echo_n "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012032#include <unistd.h>
12033int
Christian Heimes39258d32021-04-17 11:36:35 +020012034main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012035{
12036void *x=fdatasync
12037 ;
12038 return 0;
12039}
12040_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012042
Christian Heimes39258d32021-04-17 11:36:35 +020012043$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012044
Christian Heimes39258d32021-04-17 11:36:35 +020012045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12046$as_echo "yes" >&6; }
12047else
12048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12049$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012050
12051fi
Christian Heimes39258d32021-04-17 11:36:35 +020012052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
12054$as_echo_n "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012056/* end confdefs.h. */
12057#include <sys/epoll.h>
12058int
Christian Heimes39258d32021-04-17 11:36:35 +020012059main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012060{
12061void *x=epoll_create
12062 ;
12063 return 0;
12064}
12065_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012067
Christian Heimes39258d32021-04-17 11:36:35 +020012068$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012069
Christian Heimes39258d32021-04-17 11:36:35 +020012070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12071$as_echo "yes" >&6; }
12072else
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12074$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012075
12076fi
Christian Heimes39258d32021-04-17 11:36:35 +020012077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
12079$as_echo_n "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060012080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12081/* end confdefs.h. */
12082#include <sys/epoll.h>
12083int
Christian Heimes39258d32021-04-17 11:36:35 +020012084main ()
Benjamin Peterson95c16622011-12-27 15:36:32 -060012085{
12086void *x=epoll_create1
12087 ;
12088 return 0;
12089}
12090_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012091if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060012092
Christian Heimes39258d32021-04-17 11:36:35 +020012093$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060012094
Christian Heimes39258d32021-04-17 11:36:35 +020012095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12096$as_echo "yes" >&6; }
12097else
12098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099$as_echo "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060012100
12101fi
Christian Heimes39258d32021-04-17 11:36:35 +020012102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12104$as_echo_n "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012106/* end confdefs.h. */
12107
12108#include <sys/types.h>
12109#include <sys/event.h>
12110
12111int
Christian Heimes39258d32021-04-17 11:36:35 +020012112main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012113{
12114int x=kqueue()
12115 ;
12116 return 0;
12117}
12118_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012119if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012120
Christian Heimes39258d32021-04-17 11:36:35 +020012121$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012122
Christian Heimes39258d32021-04-17 11:36:35 +020012123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12124$as_echo "yes" >&6; }
12125else
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12127$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012128
12129fi
Christian Heimes39258d32021-04-17 11:36:35 +020012130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12132$as_echo_n "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12134/* end confdefs.h. */
12135
12136#include <sys/time.h>
12137#include <sys/resource.h>
12138
12139int
Christian Heimes39258d32021-04-17 11:36:35 +020012140main ()
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012141{
12142void *x=prlimit
12143 ;
12144 return 0;
12145}
12146_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012147if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012148
Christian Heimes39258d32021-04-17 11:36:35 +020012149$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012150
Christian Heimes39258d32021-04-17 11:36:35 +020012151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12152$as_echo "yes" >&6; }
12153else
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12155$as_echo "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012156
12157fi
Christian Heimes39258d32021-04-17 11:36:35 +020012158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12160$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12162/* end confdefs.h. */
12163#include <mach-o/dyld.h>
12164int
Christian Heimes39258d32021-04-17 11:36:35 +020012165main ()
Ronald Oussoren41761932020-11-08 10:05:27 +010012166{
12167void *x=_dyld_shared_cache_contains_path
12168 ;
12169 return 0;
12170}
12171_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012172if ac_fn_c_try_compile "$LINENO"; then :
Ronald Oussoren41761932020-11-08 10:05:27 +010012173
Christian Heimes39258d32021-04-17 11:36:35 +020012174$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010012175
Christian Heimes39258d32021-04-17 11:36:35 +020012176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12177$as_echo "yes" >&6; }
12178else
12179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12180$as_echo "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012181
12182fi
Christian Heimes39258d32021-04-17 11:36:35 +020012183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012184
Christian Heimes39258d32021-04-17 11:36:35 +020012185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12186$as_echo_n "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12188/* end confdefs.h. */
12189
12190#ifdef HAVE_SYS_MMAN_H
12191#include <sys/mman.h>
12192#endif
12193#ifdef HAVE_SYS_MEMFD_H
12194#include <sys/memfd.h>
12195#endif
12196
12197int
Christian Heimes39258d32021-04-17 11:36:35 +020012198main ()
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012199{
12200void *x=memfd_create
12201 ;
12202 return 0;
12203}
12204_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012205if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012206
Christian Heimes39258d32021-04-17 11:36:35 +020012207$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012208
Christian Heimes39258d32021-04-17 11:36:35 +020012209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12210$as_echo "yes" >&6; }
12211else
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12213$as_echo "no" >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012214
12215fi
Christian Heimes39258d32021-04-17 11:36:35 +020012216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012217
Christian Heimes39258d32021-04-17 11:36:35 +020012218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12219$as_echo_n "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12221/* end confdefs.h. */
12222
12223#ifdef HAVE_SYS_EVENTFD_H
12224#include <sys/eventfd.h>
12225#endif
12226
12227int
Christian Heimes39258d32021-04-17 11:36:35 +020012228main ()
Christian Heimescd9fed62020-11-13 19:48:52 +010012229{
12230int x = eventfd(0, EFD_CLOEXEC)
12231 ;
12232 return 0;
12233}
12234_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012235if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimescd9fed62020-11-13 19:48:52 +010012236
Christian Heimes39258d32021-04-17 11:36:35 +020012237$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010012238
Christian Heimes39258d32021-04-17 11:36:35 +020012239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12240$as_echo "yes" >&6; }
12241else
12242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12243$as_echo "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012244
12245fi
Christian Heimes39258d32021-04-17 11:36:35 +020012246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010012247
Martin v. Löwisd5843682002-11-21 20:41:28 +000012248# On some systems (eg. FreeBSD 5), we would find a definition of the
12249# functions ctermid_r, setgroups in the library, but no prototype
12250# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12251# address to avoid compiler warnings and potential miscompilations
12252# because of the missing prototypes.
12253
Christian Heimes39258d32021-04-17 11:36:35 +020012254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12255$as_echo_n "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012257/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012258
Martin v. Löwisd5843682002-11-21 20:41:28 +000012259#include <stdio.h>
12260
Martin v. Löwisd5843682002-11-21 20:41:28 +000012261int
Christian Heimes39258d32021-04-17 11:36:35 +020012262main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012263{
12264void* p = ctermid_r
12265 ;
12266 return 0;
12267}
12268_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012270
Christian Heimes39258d32021-04-17 11:36:35 +020012271$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012272
Christian Heimes39258d32021-04-17 11:36:35 +020012273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12274$as_echo "yes" >&6; }
12275else
12276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12277$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012278
12279fi
Christian Heimes39258d32021-04-17 11:36:35 +020012280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281
Christian Heimes39258d32021-04-17 11:36:35 +020012282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12283$as_echo_n "checking for flock declaration... " >&6; }
12284if ${ac_cv_flock_decl+:} false; then :
12285 $as_echo_n "(cached) " >&6
12286else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012288/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012289#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012290int
Christian Heimes39258d32021-04-17 11:36:35 +020012291main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012292{
12293void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012294
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012295 ;
12296 return 0;
12297}
12298_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012299if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012300 ac_cv_flock_decl=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012301else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012302 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012303
12304fi
Christian Heimes39258d32021-04-17 11:36:35 +020012305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012306
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012307fi
Christian Heimes39258d32021-04-17 11:36:35 +020012308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12309$as_echo "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012310if test "x${ac_cv_flock_decl}" = xyes; then
12311 for ac_func in flock
12312do :
12313 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Christian Heimes39258d32021-04-17 11:36:35 +020012314if test "x$ac_cv_func_flock" = xyes; then :
12315 cat >>confdefs.h <<_ACEOF
12316#define HAVE_FLOCK 1
12317_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012318
Christian Heimes39258d32021-04-17 11:36:35 +020012319else
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
12321$as_echo_n "checking for flock in -lbsd... " >&6; }
12322if ${ac_cv_lib_bsd_flock+:} false; then :
12323 $as_echo_n "(cached) " >&6
12324else
Antoine Pitroua3000072010-09-07 14:52:42 +000012325 ac_check_lib_save_LIBS=$LIBS
12326LIBS="-lbsd $LIBS"
12327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12328/* end confdefs.h. */
12329
12330/* Override any GCC internal prototype to avoid an error.
12331 Use char because int might match the return type of a GCC
12332 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012333#ifdef __cplusplus
12334extern "C"
12335#endif
Antoine Pitroua3000072010-09-07 14:52:42 +000012336char flock ();
12337int
Christian Heimes39258d32021-04-17 11:36:35 +020012338main ()
Antoine Pitroua3000072010-09-07 14:52:42 +000012339{
12340return flock ();
12341 ;
12342 return 0;
12343}
12344_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012345if ac_fn_c_try_link "$LINENO"; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012346 ac_cv_lib_bsd_flock=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012347else
Antoine Pitroua3000072010-09-07 14:52:42 +000012348 ac_cv_lib_bsd_flock=no
12349fi
Christian Heimes39258d32021-04-17 11:36:35 +020012350rm -f core conftest.err conftest.$ac_objext \
Antoine Pitroua3000072010-09-07 14:52:42 +000012351 conftest$ac_exeext conftest.$ac_ext
12352LIBS=$ac_check_lib_save_LIBS
12353fi
Christian Heimes39258d32021-04-17 11:36:35 +020012354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12355$as_echo "$ac_cv_lib_bsd_flock" >&6; }
12356if test "x$ac_cv_lib_bsd_flock" = xyes; then :
12357 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012358
12359
Christian Heimes39258d32021-04-17 11:36:35 +020012360$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012361
12362
12363fi
12364
12365
12366fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012367done
Christian Heimes39258d32021-04-17 11:36:35 +020012368
Antoine Pitroua3000072010-09-07 14:52:42 +000012369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370
Christian Heimes39258d32021-04-17 11:36:35 +020012371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12372$as_echo_n "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012374/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012375
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012376#include <unistd.h>
12377
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012378int
Christian Heimes39258d32021-04-17 11:36:35 +020012379main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012380{
12381void* p = getpagesize
12382 ;
12383 return 0;
12384}
12385_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012387
Christian Heimes39258d32021-04-17 11:36:35 +020012388$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012389
Christian Heimes39258d32021-04-17 11:36:35 +020012390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12391$as_echo "yes" >&6; }
12392else
12393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12394$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012395
12396fi
Christian Heimes39258d32021-04-17 11:36:35 +020012397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012398
Christian Heimes39258d32021-04-17 11:36:35 +020012399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12400$as_echo_n "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12402/* end confdefs.h. */
12403
12404#include <stdlib.h>
12405
12406int
Christian Heimes39258d32021-04-17 11:36:35 +020012407main ()
Victor Stinner984890f2011-11-24 13:53:38 +010012408{
12409int res = unsetenv("DUMMY")
12410 ;
12411 return 0;
12412}
12413_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012414if ac_fn_c_try_compile "$LINENO"; then :
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12416$as_echo "no" >&6; }
12417else
Victor Stinner984890f2011-11-24 13:53:38 +010012418
Christian Heimes39258d32021-04-17 11:36:35 +020012419$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010012420
Christian Heimes39258d32021-04-17 11:36:35 +020012421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12422$as_echo "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012423
12424fi
Christian Heimes39258d32021-04-17 11:36:35 +020012425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010012426
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012427for ac_prog in true
12428do
12429 # Extract the first word of "$ac_prog", so it can be a program name with args.
12430set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020012431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12432$as_echo_n "checking for $ac_word... " >&6; }
12433if ${ac_cv_prog_TRUE+:} false; then :
12434 $as_echo_n "(cached) " >&6
12435else
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012436 if test -n "$TRUE"; then
12437 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12438else
12439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12440for as_dir in $PATH
12441do
12442 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020012443 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020012445 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012446 ac_cv_prog_TRUE="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +020012447 $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 +000012448 break 2
12449 fi
12450done
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012453
12454fi
12455fi
12456TRUE=$ac_cv_prog_TRUE
12457if test -n "$TRUE"; then
Christian Heimes39258d32021-04-17 11:36:35 +020012458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12459$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012460else
Christian Heimes39258d32021-04-17 11:36:35 +020012461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12462$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012463fi
12464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012466 test -n "$TRUE" && break
12467done
12468test -n "$TRUE" || TRUE="/bin/true"
12469
12470
Christian Heimes39258d32021-04-17 11:36:35 +020012471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12472$as_echo_n "checking for inet_aton in -lc... " >&6; }
12473if ${ac_cv_lib_c_inet_aton+:} false; then :
12474 $as_echo_n "(cached) " >&6
12475else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012476 ac_check_lib_save_LIBS=$LIBS
12477LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012479/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481/* Override any GCC internal prototype to avoid an error.
12482 Use char because int might match the return type of a GCC
12483 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012484#ifdef __cplusplus
12485extern "C"
12486#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012487char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012488int
Christian Heimes39258d32021-04-17 11:36:35 +020012489main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012491return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012492 ;
12493 return 0;
12494}
12495_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012497 ac_cv_lib_c_inet_aton=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012500fi
Christian Heimes39258d32021-04-17 11:36:35 +020012501rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012503LIBS=$ac_check_lib_save_LIBS
12504fi
Christian Heimes39258d32021-04-17 11:36:35 +020012505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12506$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
12507if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012508 $ac_cv_prog_TRUE
Christian Heimes39258d32021-04-17 11:36:35 +020012509else
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12511$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
12512if ${ac_cv_lib_resolv_inet_aton+:} false; then :
12513 $as_echo_n "(cached) " >&6
12514else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012515 ac_check_lib_save_LIBS=$LIBS
12516LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012518/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520/* Override any GCC internal prototype to avoid an error.
12521 Use char because int might match the return type of a GCC
12522 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012523#ifdef __cplusplus
12524extern "C"
12525#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012526char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012527int
Christian Heimes39258d32021-04-17 11:36:35 +020012528main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012531 ;
12532 return 0;
12533}
12534_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012536 ac_cv_lib_resolv_inet_aton=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012537else
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012539fi
Christian Heimes39258d32021-04-17 11:36:35 +020012540rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012542LIBS=$ac_check_lib_save_LIBS
12543fi
Christian Heimes39258d32021-04-17 11:36:35 +020012544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12545$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
12546if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
12547 cat >>confdefs.h <<_ACEOF
12548#define HAVE_LIBRESOLV 1
12549_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012550
12551 LIBS="-lresolv $LIBS"
12552
12553fi
12554
12555
12556fi
12557
12558
Christian Heimesd0764e22007-12-04 15:00:33 +000012559# On Tru64, chflags seems to be present, but calling it will
12560# exit Python
Christian Heimes39258d32021-04-17 11:36:35 +020012561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12562$as_echo_n "checking for chflags... " >&6; }
12563if ${ac_cv_have_chflags+:} false; then :
12564 $as_echo_n "(cached) " >&6
12565else
12566 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012567 ac_cv_have_chflags=cross
Christian Heimes39258d32021-04-17 11:36:35 +020012568else
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012570/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012571
Christian Heimesd0764e22007-12-04 15:00:33 +000012572#include <sys/stat.h>
12573#include <unistd.h>
12574int main(int argc, char*argv[])
12575{
12576 if(chflags(argv[0], 0) != 0)
12577 return 1;
12578 return 0;
12579}
Ned Deily3eb67d52011-06-28 00:00:28 -070012580
Christian Heimesd0764e22007-12-04 15:00:33 +000012581_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012582if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012583 ac_cv_have_chflags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012584else
Matthias Kloseb9621712010-04-24 17:59:49 +000012585 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012589fi
12590
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012591
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012592fi
Christian Heimes39258d32021-04-17 11:36:35 +020012593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12594$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012595if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Christian Heimes39258d32021-04-17 11:36:35 +020012597if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012598 ac_cv_have_chflags="yes"
Christian Heimes39258d32021-04-17 11:36:35 +020012599else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012600 ac_cv_have_chflags="no"
12601fi
12602
12603fi
12604if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012605
Christian Heimes39258d32021-04-17 11:36:35 +020012606$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012607
12608fi
12609
Christian Heimes39258d32021-04-17 11:36:35 +020012610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12611$as_echo_n "checking for lchflags... " >&6; }
12612if ${ac_cv_have_lchflags+:} false; then :
12613 $as_echo_n "(cached) " >&6
12614else
12615 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012616 ac_cv_have_lchflags=cross
Christian Heimes39258d32021-04-17 11:36:35 +020012617else
Matthias Kloseb9621712010-04-24 17:59:49 +000012618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012619/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012620
Christian Heimesd0764e22007-12-04 15:00:33 +000012621#include <sys/stat.h>
12622#include <unistd.h>
12623int main(int argc, char*argv[])
12624{
12625 if(lchflags(argv[0], 0) != 0)
12626 return 1;
12627 return 0;
12628}
Ned Deily3eb67d52011-06-28 00:00:28 -070012629
Christian Heimesd0764e22007-12-04 15:00:33 +000012630_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012631if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012632 ac_cv_have_lchflags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012633else
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012638fi
12639
12640
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012641fi
Christian Heimes39258d32021-04-17 11:36:35 +020012642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12643$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012644if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Christian Heimes39258d32021-04-17 11:36:35 +020012646if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012647 ac_cv_have_lchflags="yes"
Christian Heimes39258d32021-04-17 11:36:35 +020012648else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012649 ac_cv_have_lchflags="no"
12650fi
12651
12652fi
12653if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012654
Christian Heimes39258d32021-04-17 11:36:35 +020012655$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012656
12657fi
12658
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012659case $ac_sys_system/$ac_sys_release in
12660Darwin/*)
12661 _CUR_CFLAGS="${CFLAGS}"
12662 _CUR_LDFLAGS="${LDFLAGS}"
12663 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12664 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12665 ;;
12666esac
12667
Christian Heimes39258d32021-04-17 11:36:35 +020012668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12669$as_echo_n "checking for inflateCopy in -lz... " >&6; }
12670if ${ac_cv_lib_z_inflateCopy+:} false; then :
12671 $as_echo_n "(cached) " >&6
12672else
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012673 ac_check_lib_save_LIBS=$LIBS
12674LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012676/* end confdefs.h. */
12677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678/* Override any GCC internal prototype to avoid an error.
12679 Use char because int might match the return type of a GCC
12680 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012681#ifdef __cplusplus
12682extern "C"
12683#endif
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012684char inflateCopy ();
12685int
Christian Heimes39258d32021-04-17 11:36:35 +020012686main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012689 ;
12690 return 0;
12691}
12692_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012693if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012694 ac_cv_lib_z_inflateCopy=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012695else
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012697fi
Christian Heimes39258d32021-04-17 11:36:35 +020012698rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012700LIBS=$ac_check_lib_save_LIBS
12701fi
Christian Heimes39258d32021-04-17 11:36:35 +020012702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12703$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
12704if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012705
Christian Heimes39258d32021-04-17 11:36:35 +020012706$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012707
12708fi
12709
12710
12711case $ac_sys_system/$ac_sys_release in
12712Darwin/*)
12713 CFLAGS="${_CUR_CFLAGS}"
12714 LDFLAGS="${_CUR_LDFLAGS}"
12715 ;;
12716esac
12717
Christian Heimes39258d32021-04-17 11:36:35 +020012718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12719$as_echo_n "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012722
Martin v. Löwise9416172003-05-03 10:12:45 +000012723#include <netdb.h>
12724
Martin v. Löwise9416172003-05-03 10:12:45 +000012725int
Christian Heimes39258d32021-04-17 11:36:35 +020012726main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012727{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012728void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012729 ;
12730 return 0;
12731}
12732_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012734
Christian Heimes39258d32021-04-17 11:36:35 +020012735$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012736
Christian Heimes39258d32021-04-17 11:36:35 +020012737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12738$as_echo "yes" >&6; }
12739else
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012742
12743fi
Christian Heimes39258d32021-04-17 11:36:35 +020012744rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012746
Christian Heimes39258d32021-04-17 11:36:35 +020012747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12748$as_echo_n "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012750/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012751
Martin v. Löwis86d66262006-02-17 08:40:11 +000012752#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012753#include <sys/socket.h>
12754#include <netinet/in.h>
12755#include <arpa/inet.h>
12756
Martin v. Löwise9416172003-05-03 10:12:45 +000012757int
Christian Heimes39258d32021-04-17 11:36:35 +020012758main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012759{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012760void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012761 ;
12762 return 0;
12763}
12764_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012766
Christian Heimes39258d32021-04-17 11:36:35 +020012767$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012768
Christian Heimes39258d32021-04-17 11:36:35 +020012769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12770$as_echo "yes" >&6; }
12771else
12772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12773$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012774
12775fi
Christian Heimes39258d32021-04-17 11:36:35 +020012776rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778
Christian Heimes39258d32021-04-17 11:36:35 +020012779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12780$as_echo_n "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012782/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012783
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012784#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012785#include <sys/socket.h>
12786#include <netinet/in.h>
12787#include <arpa/inet.h>
12788
Martin v. Löwise9416172003-05-03 10:12:45 +000012789int
Christian Heimes39258d32021-04-17 11:36:35 +020012790main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012791{
12792void* p = inet_pton
12793 ;
12794 return 0;
12795}
12796_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012797if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012798
Christian Heimes39258d32021-04-17 11:36:35 +020012799$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012800
Christian Heimes39258d32021-04-17 11:36:35 +020012801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12802$as_echo "yes" >&6; }
12803else
12804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12805$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012806
12807fi
Christian Heimes39258d32021-04-17 11:36:35 +020012808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012809
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012810# On some systems, setgroups is in unistd.h, on others, in grp.h
Christian Heimes39258d32021-04-17 11:36:35 +020012811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12812$as_echo_n "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012814/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012815
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012816#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012817#ifdef HAVE_GRP_H
12818#include <grp.h>
12819#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012820
Martin v. Löwisd5843682002-11-21 20:41:28 +000012821int
Christian Heimes39258d32021-04-17 11:36:35 +020012822main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012823{
12824void* p = setgroups
12825 ;
12826 return 0;
12827}
12828_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012830
Christian Heimes39258d32021-04-17 11:36:35 +020012831$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012832
Christian Heimes39258d32021-04-17 11:36:35 +020012833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12834$as_echo "yes" >&6; }
12835else
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12837$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012838
12839fi
Christian Heimes39258d32021-04-17 11:36:35 +020012840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012841
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012842# check for openpty and forkpty
12843
Christian Heimes39258d32021-04-17 11:36:35 +020012844for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012845do :
12846 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Christian Heimes39258d32021-04-17 11:36:35 +020012847if test "x$ac_cv_func_openpty" = xyes; then :
12848 cat >>confdefs.h <<_ACEOF
12849#define HAVE_OPENPTY 1
12850_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012851
Christian Heimes39258d32021-04-17 11:36:35 +020012852else
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12854$as_echo_n "checking for openpty in -lutil... " >&6; }
12855if ${ac_cv_lib_util_openpty+:} false; then :
12856 $as_echo_n "(cached) " >&6
12857else
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012859LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863/* Override any GCC internal prototype to avoid an error.
12864 Use char because int might match the return type of a GCC
12865 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012866#ifdef __cplusplus
12867extern "C"
12868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012869char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012870int
Christian Heimes39258d32021-04-17 11:36:35 +020012871main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 ;
12875 return 0;
12876}
12877_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ac_cv_lib_util_openpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012880else
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012882fi
Christian Heimes39258d32021-04-17 11:36:35 +020012883rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012885LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012886fi
Christian Heimes39258d32021-04-17 11:36:35 +020012887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12888$as_echo "$ac_cv_lib_util_openpty" >&6; }
12889if test "x$ac_cv_lib_util_openpty" = xyes; then :
12890 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012891 LIBS="$LIBS -lutil"
Christian Heimes39258d32021-04-17 11:36:35 +020012892else
12893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12894$as_echo_n "checking for openpty in -lbsd... " >&6; }
12895if ${ac_cv_lib_bsd_openpty+:} false; then :
12896 $as_echo_n "(cached) " >&6
12897else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012898 ac_check_lib_save_LIBS=$LIBS
12899LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012901/* end confdefs.h. */
12902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012903/* Override any GCC internal prototype to avoid an error.
12904 Use char because int might match the return type of a GCC
12905 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012906#ifdef __cplusplus
12907extern "C"
12908#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012909char openpty ();
12910int
Christian Heimes39258d32021-04-17 11:36:35 +020012911main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012914 ;
12915 return 0;
12916}
12917_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012918if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012919 ac_cv_lib_bsd_openpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012920else
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012922fi
Christian Heimes39258d32021-04-17 11:36:35 +020012923rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012925LIBS=$ac_check_lib_save_LIBS
12926fi
Christian Heimes39258d32021-04-17 11:36:35 +020012927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12928$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
12929if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
12930 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012931 LIBS="$LIBS -lbsd"
12932fi
12933
12934
12935fi
12936
Fred Drake8cef4cf2000-06-28 16:40:38 +000012937
12938fi
12939done
12940
Christian Heimes39258d32021-04-17 11:36:35 +020012941for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012942do :
12943 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Christian Heimes39258d32021-04-17 11:36:35 +020012944if test "x$ac_cv_func_forkpty" = xyes; then :
12945 cat >>confdefs.h <<_ACEOF
12946#define HAVE_FORKPTY 1
12947_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012948
Christian Heimes39258d32021-04-17 11:36:35 +020012949else
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12951$as_echo_n "checking for forkpty in -lutil... " >&6; }
12952if ${ac_cv_lib_util_forkpty+:} false; then :
12953 $as_echo_n "(cached) " >&6
12954else
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012956LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960/* Override any GCC internal prototype to avoid an error.
12961 Use char because int might match the return type of a GCC
12962 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012963#ifdef __cplusplus
12964extern "C"
12965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012966char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012967int
Christian Heimes39258d32021-04-17 11:36:35 +020012968main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 ;
12972 return 0;
12973}
12974_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012975if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 ac_cv_lib_util_forkpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012977else
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012979fi
Christian Heimes39258d32021-04-17 11:36:35 +020012980rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012982LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012983fi
Christian Heimes39258d32021-04-17 11:36:35 +020012984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12985$as_echo "$ac_cv_lib_util_forkpty" >&6; }
12986if test "x$ac_cv_lib_util_forkpty" = xyes; then :
12987 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012988 LIBS="$LIBS -lutil"
Christian Heimes39258d32021-04-17 11:36:35 +020012989else
12990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12991$as_echo_n "checking for forkpty in -lbsd... " >&6; }
12992if ${ac_cv_lib_bsd_forkpty+:} false; then :
12993 $as_echo_n "(cached) " >&6
12994else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012995 ac_check_lib_save_LIBS=$LIBS
12996LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012998/* end confdefs.h. */
12999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000/* Override any GCC internal prototype to avoid an error.
13001 Use char because int might match the return type of a GCC
13002 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013003#ifdef __cplusplus
13004extern "C"
13005#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013006char forkpty ();
13007int
Christian Heimes39258d32021-04-17 11:36:35 +020013008main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013011 ;
13012 return 0;
13013}
13014_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013015if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013016 ac_cv_lib_bsd_forkpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013017else
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013019fi
Christian Heimes39258d32021-04-17 11:36:35 +020013020rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013022LIBS=$ac_check_lib_save_LIBS
13023fi
Christian Heimes39258d32021-04-17 11:36:35 +020013024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
13025$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
13026if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
13027 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013028 LIBS="$LIBS -lbsd"
13029fi
13030
13031
13032fi
13033
Fred Drake8cef4cf2000-06-28 16:40:38 +000013034
13035fi
Pablo Galindo53e55292021-04-05 17:38:40 +010013036done
Christian Heimes32eba612021-03-19 10:29:25 +010013037
Christian Heimes39258d32021-04-17 11:36:35 +020013038
Michael W. Hudson54241132001-12-07 15:38:26 +000013039# check for long file support functions
Christian Heimes39258d32021-04-17 11:36:35 +020013040for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13041do :
13042 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13043ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13044if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13045 cat >>confdefs.h <<_ACEOF
13046#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13047_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013048
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013049fi
Christian Heimes39258d32021-04-17 11:36:35 +020013050done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013051
Michael W. Hudson54241132001-12-07 15:38:26 +000013052
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013053ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Christian Heimes39258d32021-04-17 11:36:35 +020013054if test "x$ac_cv_func_dup2" = xyes; then :
13055 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000013056
Christian Heimes39258d32021-04-17 11:36:35 +020013057else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013059 *" dup2.$ac_objext "* ) ;;
13060 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013062esac
13063
Martin v. Löwis1142de32002-03-29 16:28:31 +000013064fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013065
Martin v. Löwis1142de32002-03-29 16:28:31 +000013066
Christian Heimes39258d32021-04-17 11:36:35 +020013067for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013068do :
13069 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Christian Heimes39258d32021-04-17 11:36:35 +020013070if test "x$ac_cv_func_getpgrp" = xyes; then :
13071 cat >>confdefs.h <<_ACEOF
13072#define HAVE_GETPGRP 1
13073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013075/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013077int
Christian Heimes39258d32021-04-17 11:36:35 +020013078main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013079{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 ;
13082 return 0;
13083}
13084_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Christian Heimes39258d32021-04-17 11:36:35 +020013087$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013088
Guido van Rossum627b2d71993-12-24 10:39:16 +000013089fi
Christian Heimes39258d32021-04-17 11:36:35 +020013090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013091
Guido van Rossum627b2d71993-12-24 10:39:16 +000013092fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013093done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013094
Christian Heimes39258d32021-04-17 11:36:35 +020013095for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013096do :
13097 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Christian Heimes39258d32021-04-17 11:36:35 +020013098if test "x$ac_cv_func_setpgrp" = xyes; then :
13099 cat >>confdefs.h <<_ACEOF
13100#define HAVE_SETPGRP 1
13101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013103/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013104#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013105int
Christian Heimes39258d32021-04-17 11:36:35 +020013106main ()
Jack Jansen150753c2003-03-29 22:07:47 +000013107{
13108setpgrp(0,0);
13109 ;
13110 return 0;
13111}
13112_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013114
Christian Heimes39258d32021-04-17 11:36:35 +020013115$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013116
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013117fi
Christian Heimes39258d32021-04-17 11:36:35 +020013118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013119
13120fi
13121done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013122
Christian Heimes39258d32021-04-17 11:36:35 +020013123
Gregory P. Smith387512c2018-12-30 15:42:32 -080013124# We search for both crypt and crypt_r as one or the other may be defined
13125# This gets us our -lcrypt in LIBS when required on the target platform.
Christian Heimes39258d32021-04-17 11:36:35 +020013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13127$as_echo_n "checking for library containing crypt... " >&6; }
13128if ${ac_cv_search_crypt+:} false; then :
13129 $as_echo_n "(cached) " >&6
13130else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013131 ac_func_search_save_LIBS=$LIBS
13132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13133/* end confdefs.h. */
13134
13135/* Override any GCC internal prototype to avoid an error.
13136 Use char because int might match the return type of a GCC
13137 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013138#ifdef __cplusplus
13139extern "C"
13140#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013141char crypt ();
13142int
Christian Heimes39258d32021-04-17 11:36:35 +020013143main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013144{
13145return crypt ();
13146 ;
13147 return 0;
13148}
13149_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013150for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013151 if test -z "$ac_lib"; then
13152 ac_res="none required"
13153 else
13154 ac_res=-l$ac_lib
13155 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13156 fi
Christian Heimes39258d32021-04-17 11:36:35 +020013157 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013158 ac_cv_search_crypt=$ac_res
13159fi
Christian Heimes39258d32021-04-17 11:36:35 +020013160rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013161 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020013162 if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013163 break
13164fi
13165done
Christian Heimes39258d32021-04-17 11:36:35 +020013166if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013167
Christian Heimes39258d32021-04-17 11:36:35 +020013168else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013169 ac_cv_search_crypt=no
13170fi
13171rm conftest.$ac_ext
13172LIBS=$ac_func_search_save_LIBS
13173fi
Christian Heimes39258d32021-04-17 11:36:35 +020013174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13175$as_echo "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013176ac_res=$ac_cv_search_crypt
Christian Heimes39258d32021-04-17 11:36:35 +020013177if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013178 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13179
13180fi
13181
Christian Heimes39258d32021-04-17 11:36:35 +020013182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13183$as_echo_n "checking for library containing crypt_r... " >&6; }
13184if ${ac_cv_search_crypt_r+:} false; then :
13185 $as_echo_n "(cached) " >&6
13186else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013187 ac_func_search_save_LIBS=$LIBS
13188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13189/* end confdefs.h. */
13190
13191/* Override any GCC internal prototype to avoid an error.
13192 Use char because int might match the return type of a GCC
13193 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013194#ifdef __cplusplus
13195extern "C"
13196#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013197char crypt_r ();
13198int
Christian Heimes39258d32021-04-17 11:36:35 +020013199main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013200{
13201return crypt_r ();
13202 ;
13203 return 0;
13204}
13205_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013206for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013207 if test -z "$ac_lib"; then
13208 ac_res="none required"
13209 else
13210 ac_res=-l$ac_lib
13211 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13212 fi
Christian Heimes39258d32021-04-17 11:36:35 +020013213 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013214 ac_cv_search_crypt_r=$ac_res
13215fi
Christian Heimes39258d32021-04-17 11:36:35 +020013216rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013217 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020013218 if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013219 break
13220fi
13221done
Christian Heimes39258d32021-04-17 11:36:35 +020013222if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013223
Christian Heimes39258d32021-04-17 11:36:35 +020013224else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013225 ac_cv_search_crypt_r=no
13226fi
13227rm conftest.$ac_ext
13228LIBS=$ac_func_search_save_LIBS
13229fi
Christian Heimes39258d32021-04-17 11:36:35 +020013230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13231$as_echo "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013232ac_res=$ac_cv_search_crypt_r
Christian Heimes39258d32021-04-17 11:36:35 +020013233if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013234 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13235
13236fi
13237
13238
13239ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Christian Heimes39258d32021-04-17 11:36:35 +020013240if test "x$ac_cv_func_crypt_r" = xyes; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13242/* end confdefs.h. */
13243
13244#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13245#include <crypt.h>
13246
13247int
Christian Heimes39258d32021-04-17 11:36:35 +020013248main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013249{
13250
13251struct crypt_data d;
13252char *r = crypt_r("", "", &d);
13253
13254 ;
13255 return 0;
13256}
13257_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013258if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013259
Christian Heimes39258d32021-04-17 11:36:35 +020013260$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080013261
13262fi
Christian Heimes39258d32021-04-17 11:36:35 +020013263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080013264
13265fi
13266
13267
Christian Heimes39258d32021-04-17 11:36:35 +020013268for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020013269do :
13270 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Christian Heimes39258d32021-04-17 11:36:35 +020013271if test "x$ac_cv_func_clock_gettime" = xyes; then :
13272 cat >>confdefs.h <<_ACEOF
13273#define HAVE_CLOCK_GETTIME 1
13274_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013275
Christian Heimes39258d32021-04-17 11:36:35 +020013276else
Victor Stinnere0be4232011-10-25 13:06:09 +020013277
Christian Heimes39258d32021-04-17 11:36:35 +020013278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13279$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13280if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13281 $as_echo_n "(cached) " >&6
13282else
Victor Stinnere0be4232011-10-25 13:06:09 +020013283 ac_check_lib_save_LIBS=$LIBS
13284LIBS="-lrt $LIBS"
13285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13286/* end confdefs.h. */
13287
13288/* Override any GCC internal prototype to avoid an error.
13289 Use char because int might match the return type of a GCC
13290 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013291#ifdef __cplusplus
13292extern "C"
13293#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013294char clock_gettime ();
13295int
Christian Heimes39258d32021-04-17 11:36:35 +020013296main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013297{
13298return clock_gettime ();
13299 ;
13300 return 0;
13301}
13302_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013303if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013304 ac_cv_lib_rt_clock_gettime=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013305else
Victor Stinnere0be4232011-10-25 13:06:09 +020013306 ac_cv_lib_rt_clock_gettime=no
13307fi
Christian Heimes39258d32021-04-17 11:36:35 +020013308rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013309 conftest$ac_exeext conftest.$ac_ext
13310LIBS=$ac_check_lib_save_LIBS
13311fi
Christian Heimes39258d32021-04-17 11:36:35 +020013312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13313$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13314if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013315
Victor Stinner7efb8332014-08-29 15:41:08 +020013316 LIBS="$LIBS -lrt"
Christian Heimes39258d32021-04-17 11:36:35 +020013317 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013318
13319
Christian Heimes39258d32021-04-17 11:36:35 +020013320$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013321
13322
13323fi
13324
13325
13326fi
13327done
13328
13329
Christian Heimes39258d32021-04-17 11:36:35 +020013330for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020013331do :
13332 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Christian Heimes39258d32021-04-17 11:36:35 +020013333if test "x$ac_cv_func_clock_getres" = xyes; then :
13334 cat >>confdefs.h <<_ACEOF
13335#define HAVE_CLOCK_GETRES 1
13336_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013337
Christian Heimes39258d32021-04-17 11:36:35 +020013338else
Victor Stinnere0be4232011-10-25 13:06:09 +020013339
Christian Heimes39258d32021-04-17 11:36:35 +020013340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13341$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13342if ${ac_cv_lib_rt_clock_getres+:} false; then :
13343 $as_echo_n "(cached) " >&6
13344else
Victor Stinnere0be4232011-10-25 13:06:09 +020013345 ac_check_lib_save_LIBS=$LIBS
13346LIBS="-lrt $LIBS"
13347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13348/* end confdefs.h. */
13349
13350/* Override any GCC internal prototype to avoid an error.
13351 Use char because int might match the return type of a GCC
13352 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013353#ifdef __cplusplus
13354extern "C"
13355#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013356char clock_getres ();
13357int
Christian Heimes39258d32021-04-17 11:36:35 +020013358main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013359{
13360return clock_getres ();
13361 ;
13362 return 0;
13363}
13364_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013365if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013366 ac_cv_lib_rt_clock_getres=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013367else
Victor Stinnere0be4232011-10-25 13:06:09 +020013368 ac_cv_lib_rt_clock_getres=no
13369fi
Christian Heimes39258d32021-04-17 11:36:35 +020013370rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013371 conftest$ac_exeext conftest.$ac_ext
13372LIBS=$ac_check_lib_save_LIBS
13373fi
Christian Heimes39258d32021-04-17 11:36:35 +020013374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13375$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13376if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013377
Christian Heimes39258d32021-04-17 11:36:35 +020013378 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013379
13380
13381fi
13382
13383
13384fi
13385done
13386
13387
Christian Heimes39258d32021-04-17 11:36:35 +020013388for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013389do :
13390 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Christian Heimes39258d32021-04-17 11:36:35 +020013391if test "x$ac_cv_func_clock_settime" = xyes; then :
13392 cat >>confdefs.h <<_ACEOF
13393#define HAVE_CLOCK_SETTIME 1
13394_ACEOF
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013395
Christian Heimes39258d32021-04-17 11:36:35 +020013396else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013397
Christian Heimes39258d32021-04-17 11:36:35 +020013398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13399$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13400if ${ac_cv_lib_rt_clock_settime+:} false; then :
13401 $as_echo_n "(cached) " >&6
13402else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013403 ac_check_lib_save_LIBS=$LIBS
13404LIBS="-lrt $LIBS"
13405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406/* end confdefs.h. */
13407
13408/* Override any GCC internal prototype to avoid an error.
13409 Use char because int might match the return type of a GCC
13410 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013411#ifdef __cplusplus
13412extern "C"
13413#endif
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013414char clock_settime ();
13415int
Christian Heimes39258d32021-04-17 11:36:35 +020013416main ()
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013417{
13418return clock_settime ();
13419 ;
13420 return 0;
13421}
13422_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013423if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013424 ac_cv_lib_rt_clock_settime=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013425else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013426 ac_cv_lib_rt_clock_settime=no
13427fi
Christian Heimes39258d32021-04-17 11:36:35 +020013428rm -f core conftest.err conftest.$ac_objext \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013429 conftest$ac_exeext conftest.$ac_ext
13430LIBS=$ac_check_lib_save_LIBS
13431fi
Christian Heimes39258d32021-04-17 11:36:35 +020013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13433$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13434if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013435
Christian Heimes39258d32021-04-17 11:36:35 +020013436 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013437
13438
13439fi
13440
13441
13442fi
13443done
13444
Christian Heimes39258d32021-04-17 11:36:35 +020013445
13446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13447$as_echo_n "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013449/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013450
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013451#if defined(MAJOR_IN_MKDEV)
13452#include <sys/mkdev.h>
13453#elif defined(MAJOR_IN_SYSMACROS)
13454#include <sys/sysmacros.h>
13455#else
13456#include <sys/types.h>
13457#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013458
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013459int
Christian Heimes39258d32021-04-17 11:36:35 +020013460main ()
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013461{
13462
13463 makedev(major(0),minor(0));
13464
13465 ;
13466 return 0;
13467}
13468_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013470
13471
Christian Heimes39258d32021-04-17 11:36:35 +020013472$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013473
Christian Heimes39258d32021-04-17 11:36:35 +020013474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13475$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013476
Christian Heimes39258d32021-04-17 11:36:35 +020013477else
Skip Montanaro6dead952003-09-25 14:50:04 +000013478
Christian Heimes39258d32021-04-17 11:36:35 +020013479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13480$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013481
13482fi
Christian Heimes39258d32021-04-17 11:36:35 +020013483rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013485
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013486# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013487# for [no]getaddrinfo in netdb.h.
Christian Heimes39258d32021-04-17 11:36:35 +020013488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13489$as_echo_n "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013491/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013492
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013493#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013494#include <sys/socket.h>
13495#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013496#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013497
Martin v. Löwis11437992002-04-12 09:54:03 +000013498int
Christian Heimes39258d32021-04-17 11:36:35 +020013499main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013500{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013501getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 ;
13503 return 0;
13504}
13505_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013506if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013507 have_getaddrinfo=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013508else
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013510fi
Christian Heimes39258d32021-04-17 11:36:35 +020013511rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020013513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13514$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013515if test $have_getaddrinfo = yes
13516then
Christian Heimes39258d32021-04-17 11:36:35 +020013517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13518$as_echo_n "checking getaddrinfo bug... " >&6; }
13519 if ${ac_cv_buggy_getaddrinfo+:} false; then :
13520 $as_echo_n "(cached) " >&6
13521else
13522 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013523
13524if test "${enable_ipv6+set}" = set; then
13525 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13526else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013527 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013528fi
Christian Heimes39258d32021-04-17 11:36:35 +020013529else
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013531/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013532
Stefan Krah19c21392012-11-22 23:47:32 +010013533#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013534#include <sys/types.h>
13535#include <netdb.h>
13536#include <string.h>
13537#include <sys/socket.h>
13538#include <netinet/in.h>
13539
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013540int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013541{
13542 int passive, gaierr, inet4 = 0, inet6 = 0;
13543 struct addrinfo hints, *ai, *aitop;
13544 char straddr[INET6_ADDRSTRLEN], strport[16];
13545
13546 for (passive = 0; passive <= 1; passive++) {
13547 memset(&hints, 0, sizeof(hints));
13548 hints.ai_family = AF_UNSPEC;
13549 hints.ai_flags = passive ? AI_PASSIVE : 0;
13550 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013551 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013552 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13553 (void)gai_strerror(gaierr);
13554 goto bad;
13555 }
13556 for (ai = aitop; ai; ai = ai->ai_next) {
13557 if (ai->ai_addr == NULL ||
13558 ai->ai_addrlen == 0 ||
13559 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13560 straddr, sizeof(straddr), strport, sizeof(strport),
13561 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13562 goto bad;
13563 }
13564 switch (ai->ai_family) {
13565 case AF_INET:
13566 if (strcmp(strport, "54321") != 0) {
13567 goto bad;
13568 }
13569 if (passive) {
13570 if (strcmp(straddr, "0.0.0.0") != 0) {
13571 goto bad;
13572 }
13573 } else {
13574 if (strcmp(straddr, "127.0.0.1") != 0) {
13575 goto bad;
13576 }
13577 }
13578 inet4++;
13579 break;
13580 case AF_INET6:
13581 if (strcmp(strport, "54321") != 0) {
13582 goto bad;
13583 }
13584 if (passive) {
13585 if (strcmp(straddr, "::") != 0) {
13586 goto bad;
13587 }
13588 } else {
13589 if (strcmp(straddr, "::1") != 0) {
13590 goto bad;
13591 }
13592 }
13593 inet6++;
13594 break;
13595 case AF_UNSPEC:
13596 goto bad;
13597 break;
13598 default:
13599 /* another family support? */
13600 break;
13601 }
13602 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013603 freeaddrinfo(aitop);
13604 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013605 }
13606
13607 if (!(inet4 == 0 || inet4 == 2))
13608 goto bad;
13609 if (!(inet6 == 0 || inet6 == 2))
13610 goto bad;
13611
13612 if (aitop)
13613 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013614 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013615
13616 bad:
13617 if (aitop)
13618 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013619 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013620}
13621
Martin v. Löwis11437992002-04-12 09:54:03 +000013622_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013623if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013624 ac_cv_buggy_getaddrinfo=no
Christian Heimes39258d32021-04-17 11:36:35 +020013625else
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13629 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013632fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013633
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013635
Christian Heimes39258d32021-04-17 11:36:35 +020013636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13637$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013638
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013639if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013640then
13641 if test $ipv6 = yes
13642 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013643 echo 'Fatal: You must get working getaddrinfo() function.'
13644 echo ' or you can specify "--disable-ipv6"'.
13645 exit 1
13646 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013647else
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
Christian Heimes39258d32021-04-17 11:36:35 +020013649$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013650
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013651fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013652
Christian Heimes39258d32021-04-17 11:36:35 +020013653for ac_func in getnameinfo
13654do :
13655 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
13656if test "x$ac_cv_func_getnameinfo" = xyes; then :
13657 cat >>confdefs.h <<_ACEOF
13658#define HAVE_GETNAMEINFO 1
13659_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013660
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013661fi
Christian Heimes39258d32021-04-17 11:36:35 +020013662done
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013663
Michael W. Hudson54241132001-12-07 15:38:26 +000013664
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013665# checks for structures
Christian Heimes39258d32021-04-17 11:36:35 +020013666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13667$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
13668if ${ac_cv_header_time+:} false; then :
13669 $as_echo_n "(cached) " >&6
13670else
13671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672/* end confdefs.h. */
13673#include <sys/types.h>
13674#include <sys/time.h>
13675#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013676
Christian Heimes39258d32021-04-17 11:36:35 +020013677int
13678main ()
13679{
13680if ((struct tm *) 0)
13681return 0;
13682 ;
13683 return 0;
13684}
13685_ACEOF
13686if ac_fn_c_try_compile "$LINENO"; then :
13687 ac_cv_header_time=yes
13688else
13689 ac_cv_header_time=no
13690fi
13691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13692fi
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13694$as_echo "$ac_cv_header_time" >&6; }
13695if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Christian Heimes39258d32021-04-17 11:36:35 +020013697$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013698
13699fi
13700
Christian Heimes39258d32021-04-17 11:36:35 +020013701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13702$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13703if ${ac_cv_struct_tm+:} false; then :
13704 $as_echo_n "(cached) " >&6
13705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013707/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013708#include <sys/types.h>
13709#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
Martin v. Löwis11437992002-04-12 09:54:03 +000013711int
Christian Heimes39258d32021-04-17 11:36:35 +020013712main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714struct tm tm;
13715 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013717 ;
13718 return 0;
13719}
13720_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013721if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722 ac_cv_struct_tm=time.h
Christian Heimes39258d32021-04-17 11:36:35 +020013723else
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013725fi
Christian Heimes39258d32021-04-17 11:36:35 +020013726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727fi
Christian Heimes39258d32021-04-17 11:36:35 +020013728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13729$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013730if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
Christian Heimes39258d32021-04-17 11:36:35 +020013732$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733
13734fi
13735
Matthias Kloseb9621712010-04-24 17:59:49 +000013736ac_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 +000013737#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739"
Christian Heimes39258d32021-04-17 11:36:35 +020013740if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
Christian Heimes39258d32021-04-17 11:36:35 +020013742cat >>confdefs.h <<_ACEOF
13743#define HAVE_STRUCT_TM_TM_ZONE 1
13744_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013745
13746
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013747fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013748
Martin v. Löwis11437992002-04-12 09:54:03 +000013749if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13750
Christian Heimes39258d32021-04-17 11:36:35 +020013751$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752
13753else
Christian Heimes39258d32021-04-17 11:36:35 +020013754 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13755"
13756if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020013758else
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760fi
13761
Christian Heimes39258d32021-04-17 11:36:35 +020013762cat >>confdefs.h <<_ACEOF
13763#define HAVE_DECL_TZNAME $ac_have_decl
13764_ACEOF
13765
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13767$as_echo_n "checking for tzname... " >&6; }
13768if ${ac_cv_var_tzname+:} false; then :
13769 $as_echo_n "(cached) " >&6
13770else
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013772/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013773#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774#if !HAVE_DECL_TZNAME
13775extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778int
Christian Heimes39258d32021-04-17 11:36:35 +020013779main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013781return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 ;
13783 return 0;
13784}
13785_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013786if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787 ac_cv_var_tzname=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013788else
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013790fi
Christian Heimes39258d32021-04-17 11:36:35 +020013791rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013793fi
Christian Heimes39258d32021-04-17 11:36:35 +020013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13795$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013796 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013797
Christian Heimes39258d32021-04-17 11:36:35 +020013798$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013800 fi
13801fi
13802
Matthias Kloseb9621712010-04-24 17:59:49 +000013803ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020013804if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013805
Christian Heimes39258d32021-04-17 11:36:35 +020013806cat >>confdefs.h <<_ACEOF
13807#define HAVE_STRUCT_STAT_ST_RDEV 1
13808_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
13810
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013811fi
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020013814if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013815
Christian Heimes39258d32021-04-17 11:36:35 +020013816cat >>confdefs.h <<_ACEOF
13817#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13818_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
13820
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013821fi
13822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020013824if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013825
Christian Heimes39258d32021-04-17 11:36:35 +020013826cat >>confdefs.h <<_ACEOF
13827#define HAVE_STRUCT_STAT_ST_FLAGS 1
13828_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013829
13830
13831fi
13832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020013834if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013835
Christian Heimes39258d32021-04-17 11:36:35 +020013836cat >>confdefs.h <<_ACEOF
13837#define HAVE_STRUCT_STAT_ST_GEN 1
13838_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013839
13840
13841fi
13842
Matthias Kloseb9621712010-04-24 17:59:49 +000013843ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020013844if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013845
Christian Heimes39258d32021-04-17 11:36:35 +020013846cat >>confdefs.h <<_ACEOF
13847#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13848_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013849
13850
13851fi
13852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020013854if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013855
Christian Heimes39258d32021-04-17 11:36:35 +020013856cat >>confdefs.h <<_ACEOF
13857#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13858_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013859
13860
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013861fi
13862
Stefan Krah267b6392016-04-26 01:09:18 +020013863ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13864 #include <sys/types.h>
13865 #include <pwd.h>
13866
13867"
Christian Heimes39258d32021-04-17 11:36:35 +020013868if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013869
Christian Heimes39258d32021-04-17 11:36:35 +020013870cat >>confdefs.h <<_ACEOF
13871#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13872_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013873
13874
13875fi
13876ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13877 #include <sys/types.h>
13878 #include <pwd.h>
13879
13880"
Christian Heimes39258d32021-04-17 11:36:35 +020013881if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013882
Christian Heimes39258d32021-04-17 11:36:35 +020013883cat >>confdefs.h <<_ACEOF
13884#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13885_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013886
13887
13888fi
13889
Zachary Ware6a6967e2016-10-01 00:47:27 -050013890# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13891ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13892"
Christian Heimes39258d32021-04-17 11:36:35 +020013893if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050013894
Christian Heimes39258d32021-04-17 11:36:35 +020013895cat >>confdefs.h <<_ACEOF
13896#define HAVE_SIGINFO_T_SI_BAND 1
13897_ACEOF
Zachary Ware6a6967e2016-10-01 00:47:27 -050013898
13899
13900fi
13901
Michael W. Hudson54241132001-12-07 15:38:26 +000013902
Christian Heimes39258d32021-04-17 11:36:35 +020013903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13904$as_echo_n "checking for time.h that defines altzone... " >&6; }
13905if ${ac_cv_header_time_altzone+:} false; then :
13906 $as_echo_n "(cached) " >&6
13907else
Matthias Kloseb159a552010-04-25 21:00:44 +000013908
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013910/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013911#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013912int
Christian Heimes39258d32021-04-17 11:36:35 +020013913main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013914{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013915return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 ;
13917 return 0;
13918}
13919_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013920if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013921 ac_cv_header_time_altzone=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013922else
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013924fi
Christian Heimes39258d32021-04-17 11:36:35 +020013925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927fi
13928
Christian Heimes39258d32021-04-17 11:36:35 +020013929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13930$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013931if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013932
Christian Heimes39258d32021-04-17 11:36:35 +020013933$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013934
13935fi
13936
Guido van Rossumda88dad1995-01-26 00:46:29 +000013937was_it_defined=no
Christian Heimes39258d32021-04-17 11:36:35 +020013938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13939$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013941/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013942
13943#include <sys/types.h>
13944#include <sys/select.h>
13945#include <sys/time.h>
13946
Martin v. Löwis11437992002-04-12 09:54:03 +000013947int
Christian Heimes39258d32021-04-17 11:36:35 +020013948main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013949{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013950;
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 ;
13952 return 0;
13953}
13954_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
13957
Christian Heimes39258d32021-04-17 11:36:35 +020013958$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013959
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013960 was_it_defined=yes
13961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962fi
Christian Heimes39258d32021-04-17 11:36:35 +020013963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13965$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013966
Christian Heimes39258d32021-04-17 11:36:35 +020013967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13968$as_echo_n "checking for addrinfo... " >&6; }
13969if ${ac_cv_struct_addrinfo+:} false; then :
13970 $as_echo_n "(cached) " >&6
13971else
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013973/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013974#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013975int
Christian Heimes39258d32021-04-17 11:36:35 +020013976main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013977{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013978struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013984 ac_cv_struct_addrinfo=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013987fi
Christian Heimes39258d32021-04-17 11:36:35 +020013988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989fi
13990
Christian Heimes39258d32021-04-17 11:36:35 +020013991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13992$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013993if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013994
Christian Heimes39258d32021-04-17 11:36:35 +020013995$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013996
13997fi
13998
Christian Heimes39258d32021-04-17 11:36:35 +020013999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
14000$as_echo_n "checking for sockaddr_storage... " >&6; }
14001if ${ac_cv_struct_sockaddr_storage+:} false; then :
14002 $as_echo_n "(cached) " >&6
14003else
Matthias Kloseb9621712010-04-24 17:59:49 +000014004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014005/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014006
14007# include <sys/types.h>
14008# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014009int
Christian Heimes39258d32021-04-17 11:36:35 +020014010main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014011{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014012struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 ;
14014 return 0;
14015}
14016_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014018 ac_cv_struct_sockaddr_storage=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014019else
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014021fi
Christian Heimes39258d32021-04-17 11:36:35 +020014022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023fi
14024
Christian Heimes39258d32021-04-17 11:36:35 +020014025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
14026$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014027if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
Christian Heimes39258d32021-04-17 11:36:35 +020014029$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014030
14031fi
14032
Christian Heimes39258d32021-04-17 11:36:35 +020014033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
14034$as_echo_n "checking for sockaddr_alg... " >&6; }
14035if ${ac_cv_struct_sockaddr_alg+:} false; then :
14036 $as_echo_n "(cached) " >&6
14037else
Christian Heimesdffa3942016-09-05 23:54:41 +020014038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14039/* end confdefs.h. */
14040
14041# include <sys/types.h>
14042# include <sys/socket.h>
14043# include <linux/if_alg.h>
14044int
Christian Heimes39258d32021-04-17 11:36:35 +020014045main ()
Christian Heimesdffa3942016-09-05 23:54:41 +020014046{
14047struct sockaddr_alg s
14048 ;
14049 return 0;
14050}
14051_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014052if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesdffa3942016-09-05 23:54:41 +020014053 ac_cv_struct_sockaddr_alg=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014054else
Christian Heimesdffa3942016-09-05 23:54:41 +020014055 ac_cv_struct_sockaddr_alg=no
14056fi
Christian Heimes39258d32021-04-17 11:36:35 +020014057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020014058fi
14059
Christian Heimes39258d32021-04-17 11:36:35 +020014060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
14061$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020014062if test $ac_cv_struct_sockaddr_alg = yes; then
14063
Christian Heimes39258d32021-04-17 11:36:35 +020014064$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020014065
14066fi
14067
Guido van Rossum627b2d71993-12-24 10:39:16 +000014068# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014069
Christian Heimes39258d32021-04-17 11:36:35 +020014070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
14071$as_echo_n "checking whether char is unsigned... " >&6; }
14072if ${ac_cv_c_char_unsigned+:} false; then :
14073 $as_echo_n "(cached) " >&6
14074else
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014077$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014078int
Christian Heimes39258d32021-04-17 11:36:35 +020014079main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014080{
14081static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014082test_array [0] = 0;
14083return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000014084
14085 ;
14086 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014087}
Martin v. Löwis11437992002-04-12 09:54:03 +000014088_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014089if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014090 ac_cv_c_char_unsigned=no
Christian Heimes39258d32021-04-17 11:36:35 +020014091else
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014093fi
Christian Heimes39258d32021-04-17 11:36:35 +020014094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014095fi
Christian Heimes39258d32021-04-17 11:36:35 +020014096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14097$as_echo "$ac_cv_c_char_unsigned" >&6; }
14098if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
14099 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014100
14101fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014102
Christian Heimes39258d32021-04-17 11:36:35 +020014103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14104$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
14105if ${ac_cv_c_const+:} false; then :
14106 $as_echo_n "(cached) " >&6
14107else
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014109/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110
Martin v. Löwis11437992002-04-12 09:54:03 +000014111int
Christian Heimes39258d32021-04-17 11:36:35 +020014112main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014113{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014114
Martin v. Löwis11437992002-04-12 09:54:03 +000014115#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014116 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014118 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014119 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120 char const *const *pcpcc;
14121 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 /* NEC SVR4.0.2 mips cc rejects this. */
14123 struct point {int x, y;};
14124 static struct point const zero = {0,0};
Christian Heimes39258d32021-04-17 11:36:35 +020014125 /* AIX XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 It does not let you subtract one const X* pointer from another in
14127 an arm of an if-expression whose if-part is not a constant
14128 expression */
14129 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132 ++pcpcc;
14133 ppc = (char**) pcpcc;
14134 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014135 { /* SCO 3.2v4 cc rejects this sort of thing. */
14136 char tx;
14137 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014138 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014139
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 }
14143 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14144 int x[] = {25, 17};
14145 const int *foo = &x[0];
14146 ++foo;
14147 }
14148 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14149 typedef const int *iptr;
14150 iptr p = 0;
14151 ++p;
14152 }
Christian Heimes39258d32021-04-17 11:36:35 +020014153 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014155 struct s { int j; const int *ap[3]; } bx;
14156 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 }
14158 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14159 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014163#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014164
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 ;
14166 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014167}
Martin v. Löwis11437992002-04-12 09:54:03 +000014168_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014169if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014170 ac_cv_c_const=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014171else
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014173fi
Christian Heimes39258d32021-04-17 11:36:35 +020014174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014175fi
Christian Heimes39258d32021-04-17 11:36:35 +020014176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14177$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014178if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
Christian Heimes39258d32021-04-17 11:36:35 +020014180$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014181
14182fi
14183
Michael W. Hudson54241132001-12-07 15:38:26 +000014184
Guido van Rossumda88dad1995-01-26 00:46:29 +000014185works=no
Christian Heimes39258d32021-04-17 11:36:35 +020014186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14187$as_echo_n "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014189/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014190
Martin v. Löwis11437992002-04-12 09:54:03 +000014191int
Christian Heimes39258d32021-04-17 11:36:35 +020014192main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014193{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014194signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 ;
14196 return 0;
14197}
14198_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014199if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014200 works=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014201else
Skip Montanaro6dead952003-09-25 14:50:04 +000014202
Christian Heimes39258d32021-04-17 11:36:35 +020014203$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014205
Guido van Rossum7f43da71994-08-01 12:15:30 +000014206fi
Christian Heimes39258d32021-04-17 11:36:35 +020014207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14209$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014210
Guido van Rossumda88dad1995-01-26 00:46:29 +000014211have_prototypes=no
Christian Heimes39258d32021-04-17 11:36:35 +020014212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14213$as_echo_n "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014215/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014216int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014217int
Christian Heimes39258d32021-04-17 11:36:35 +020014218main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014219{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014220return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 ;
14222 return 0;
14223}
14224_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014226
Christian Heimes39258d32021-04-17 11:36:35 +020014227$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Matthias Kloseb159a552010-04-25 21:00:44 +000014229 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014230fi
Christian Heimes39258d32021-04-17 11:36:35 +020014231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14233$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014234
Guido van Rossumda88dad1995-01-26 00:46:29 +000014235works=no
Christian Heimes39258d32021-04-17 11:36:35 +020014236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14237$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014239/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014240
14241#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014242int foo(int x, ...) {
14243 va_list va;
14244 va_start(va, x);
14245 va_arg(va, int);
14246 va_arg(va, char *);
14247 va_arg(va, double);
14248 return 0;
14249}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014250
Martin v. Löwis11437992002-04-12 09:54:03 +000014251int
Christian Heimes39258d32021-04-17 11:36:35 +020014252main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014253{
Guido van Rossum90eea071996-08-30 20:58:57 +000014254return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 ;
14256 return 0;
14257}
14258_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014259if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014260
14261
Christian Heimes39258d32021-04-17 11:36:35 +020014262$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014263
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014264 works=yes
14265
Guido van Rossum627b2d71993-12-24 10:39:16 +000014266fi
Christian Heimes39258d32021-04-17 11:36:35 +020014267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14269$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014270
Martin v. Löwisd6320502004-08-12 13:45:08 +000014271# check for socketpair
Christian Heimes39258d32021-04-17 11:36:35 +020014272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14273$as_echo_n "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014275/* end confdefs.h. */
14276
14277#include <sys/types.h>
14278#include <sys/socket.h>
14279
14280int
Christian Heimes39258d32021-04-17 11:36:35 +020014281main ()
Martin v. Löwisd6320502004-08-12 13:45:08 +000014282{
14283void *x=socketpair
14284 ;
14285 return 0;
14286}
14287_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014289
Christian Heimes39258d32021-04-17 11:36:35 +020014290$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014291
Christian Heimes39258d32021-04-17 11:36:35 +020014292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14293$as_echo "yes" >&6; }
14294else
14295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14296$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014297
14298fi
Christian Heimes39258d32021-04-17 11:36:35 +020014299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014300
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014301# check if sockaddr has sa_len member
Christian Heimes39258d32021-04-17 11:36:35 +020014302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14303$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014305/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014306#include <sys/types.h>
14307#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014308int
Christian Heimes39258d32021-04-17 11:36:35 +020014309main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014310{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014311struct sockaddr x;
14312x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014313 ;
14314 return 0;
14315}
14316_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014317if ac_fn_c_try_compile "$LINENO"; then :
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14319$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
Christian Heimes39258d32021-04-17 11:36:35 +020014321$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014322
Christian Heimes39258d32021-04-17 11:36:35 +020014323else
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14325$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014326
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014327fi
Christian Heimes39258d32021-04-17 11:36:35 +020014328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014329
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014330# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
14332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Christian Heimes39258d32021-04-17 11:36:35 +020014334if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014335
Christian Heimes39258d32021-04-17 11:36:35 +020014336 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014337
Christian Heimes39258d32021-04-17 11:36:35 +020014338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14339$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014340 OLD_CFLAGS=$CFLAGS
14341 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014343/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014344
14345# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
Martin v. Löwis11437992002-04-12 09:54:03 +000014347int
Christian Heimes39258d32021-04-17 11:36:35 +020014348main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014349{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014350
14351 char *name;
14352 struct hostent *he, *res;
14353 char buffer[2048];
14354 int buflen = 2048;
14355 int h_errnop;
14356
14357 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
14359 ;
14360 return 0;
14361}
14362_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014364
Christian Heimes39258d32021-04-17 11:36:35 +020014365 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014366
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
Christian Heimes39258d32021-04-17 11:36:35 +020014368$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014369
Christian Heimes39258d32021-04-17 11:36:35 +020014370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14371$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
Christian Heimes39258d32021-04-17 11:36:35 +020014373else
Skip Montanaro6dead952003-09-25 14:50:04 +000014374
Christian Heimes39258d32021-04-17 11:36:35 +020014375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14376$as_echo "no" >&6; }
14377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14378$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014380/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014381
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014382# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384int
Christian Heimes39258d32021-04-17 11:36:35 +020014385main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014386{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014387
14388 char *name;
14389 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014390 char buffer[2048];
14391 int buflen = 2048;
14392 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014393
Matthias Kloseb159a552010-04-25 21:00:44 +000014394 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014395
14396 ;
14397 return 0;
14398}
14399_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014401
Christian Heimes39258d32021-04-17 11:36:35 +020014402 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014403
Martin v. Löwis11437992002-04-12 09:54:03 +000014404
Christian Heimes39258d32021-04-17 11:36:35 +020014405$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014406
Christian Heimes39258d32021-04-17 11:36:35 +020014407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14408$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
Christian Heimes39258d32021-04-17 11:36:35 +020014410else
Skip Montanaro6dead952003-09-25 14:50:04 +000014411
Christian Heimes39258d32021-04-17 11:36:35 +020014412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14413$as_echo "no" >&6; }
14414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14415$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14417/* end confdefs.h. */
14418
14419# include <netdb.h>
14420
14421int
Christian Heimes39258d32021-04-17 11:36:35 +020014422main ()
Matthias Kloseb159a552010-04-25 21:00:44 +000014423{
14424
14425 char *name;
14426 struct hostent *he;
14427 struct hostent_data data;
14428
14429 (void) gethostbyname_r(name, he, &data);
14430
14431 ;
14432 return 0;
14433}
14434_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014435if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000014436
Christian Heimes39258d32021-04-17 11:36:35 +020014437 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014438
14439
Christian Heimes39258d32021-04-17 11:36:35 +020014440$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014441
Christian Heimes39258d32021-04-17 11:36:35 +020014442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14443$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014444
Christian Heimes39258d32021-04-17 11:36:35 +020014445else
Matthias Kloseb159a552010-04-25 21:00:44 +000014446
Christian Heimes39258d32021-04-17 11:36:35 +020014447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14448$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014450fi
Christian Heimes39258d32021-04-17 11:36:35 +020014451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014453fi
Christian Heimes39258d32021-04-17 11:36:35 +020014454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014456fi
Christian Heimes39258d32021-04-17 11:36:35 +020014457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014458 CFLAGS=$OLD_CFLAGS
14459
Christian Heimes39258d32021-04-17 11:36:35 +020014460else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014461
Christian Heimes39258d32021-04-17 11:36:35 +020014462 for ac_func in gethostbyname
14463do :
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Christian Heimes39258d32021-04-17 11:36:35 +020014465if test "x$ac_cv_func_gethostbyname" = xyes; then :
14466 cat >>confdefs.h <<_ACEOF
14467#define HAVE_GETHOSTBYNAME 1
14468_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014470fi
Christian Heimes39258d32021-04-17 11:36:35 +020014471done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014472
Michael W. Hudson54241132001-12-07 15:38:26 +000014473
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014474fi
14475
Michael W. Hudson54241132001-12-07 15:38:26 +000014476
14477
14478
14479
14480
14481
Guido van Rossum627b2d71993-12-24 10:39:16 +000014482# checks for system services
14483# (none yet)
14484
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014485# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014486ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Christian Heimes39258d32021-04-17 11:36:35 +020014487if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014488
Christian Heimes39258d32021-04-17 11:36:35 +020014489else
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14491$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
14492if ${ac_cv_lib_ieee___fpu_control+:} false; then :
14493 $as_echo_n "(cached) " >&6
14494else
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014496LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500/* Override any GCC internal prototype to avoid an error.
14501 Use char because int might match the return type of a GCC
14502 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020014503#ifdef __cplusplus
14504extern "C"
14505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014506char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014507int
Christian Heimes39258d32021-04-17 11:36:35 +020014508main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014509{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ;
14512 return 0;
14513}
14514_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 ac_cv_lib_ieee___fpu_control=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014519fi
Christian Heimes39258d32021-04-17 11:36:35 +020014520rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014522LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014523fi
Christian Heimes39258d32021-04-17 11:36:35 +020014524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14525$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
14526if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
14527 cat >>confdefs.h <<_ACEOF
14528#define HAVE_LIBIEEE 1
14529_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014530
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014531 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014532
Guido van Rossum627b2d71993-12-24 10:39:16 +000014533fi
14534
Michael W. Hudson54241132001-12-07 15:38:26 +000014535
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014536fi
14537
Michael W. Hudson54241132001-12-07 15:38:26 +000014538
Guido van Rossum7f43da71994-08-01 12:15:30 +000014539# check for --with-libm=...
14540
Guido van Rossum563e7081996-09-10 18:20:48 +000014541case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014542Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014543*) LIBM=-lm
14544esac
Christian Heimes39258d32021-04-17 11:36:35 +020014545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14546$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548# Check whether --with-libm was given.
Christian Heimes39258d32021-04-17 11:36:35 +020014549if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014551if test "$withval" = no
14552then LIBM=
Christian Heimes39258d32021-04-17 11:36:35 +020014553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14554$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014555elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014556then LIBM=$withval
Christian Heimes39258d32021-04-17 11:36:35 +020014557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14558$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014559else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014560fi
Christian Heimes39258d32021-04-17 11:36:35 +020014561else
14562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14563$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564fi
14565
Guido van Rossum7f43da71994-08-01 12:15:30 +000014566
14567# check for --with-libc=...
14568
Christian Heimes39258d32021-04-17 11:36:35 +020014569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14570$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572# Check whether --with-libc was given.
Christian Heimes39258d32021-04-17 11:36:35 +020014573if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014575if test "$withval" = no
14576then LIBC=
Christian Heimes39258d32021-04-17 11:36:35 +020014577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14578$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014579elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014580then LIBC=$withval
Christian Heimes39258d32021-04-17 11:36:35 +020014581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14582$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014583else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014584fi
Christian Heimes39258d32021-04-17 11:36:35 +020014585else
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14587$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588fi
14589
Guido van Rossum7f43da71994-08-01 12:15:30 +000014590
Stefan Krah1919b7e2012-03-21 18:25:23 +010014591# **************************************
14592# * Check for gcc x64 inline assembler *
14593# **************************************
14594
Christian Heimes39258d32021-04-17 11:36:35 +020014595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14596$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14598/* end confdefs.h. */
14599
14600int
Christian Heimes39258d32021-04-17 11:36:35 +020014601main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010014602{
14603
14604 __asm__ __volatile__ ("movq %rcx, %rax");
14605
14606 ;
14607 return 0;
14608}
14609_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014610if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014611 have_gcc_asm_for_x64=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014612else
Stefan Krah1919b7e2012-03-21 18:25:23 +010014613 have_gcc_asm_for_x64=no
14614fi
Christian Heimes39258d32021-04-17 11:36:35 +020014615rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014616 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14618$as_echo "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014619if test "$have_gcc_asm_for_x64" = yes
14620then
14621
Christian Heimes39258d32021-04-17 11:36:35 +020014622$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010014623
14624fi
14625
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014626# **************************************************
14627# * Check for various properties of floating point *
14628# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014629
Christian Heimes39258d32021-04-17 11:36:35 +020014630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14631$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14632if ${ax_cv_c_float_words_bigendian+:} false; then :
14633 $as_echo_n "(cached) " >&6
14634else
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014635
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014636
14637ax_cv_c_float_words_bigendian=unknown
14638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014639/* end confdefs.h. */
14640
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014641
14642double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14643
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014644
14645_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014646if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014647
14648
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014649if grep noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014650 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014651fi
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014652if grep seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014653 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14654 ax_cv_c_float_words_bigendian=no
14655 else
14656 ax_cv_c_float_words_bigendian=unknown
14657 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014658fi
14659
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014660
14661fi
Christian Heimes39258d32021-04-17 11:36:35 +020014662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014663fi
Christian Heimes39258d32021-04-17 11:36:35 +020014664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14665$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014666
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014667case $ax_cv_c_float_words_bigendian in
14668 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014669
Christian Heimes39258d32021-04-17 11:36:35 +020014670$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014671 ;;
14672 no)
14673 ;;
14674 *)
14675 as_fn_error $? "
14676
14677Unknown float word ordering. You need to manually preset
14678ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14679
14680 " "$LINENO" 5 ;;
14681esac
14682
14683
14684if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014685then
14686
Christian Heimes39258d32021-04-17 11:36:35 +020014687$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014688
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014689elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014690then
14691
Christian Heimes39258d32021-04-17 11:36:35 +020014692$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014693
14694else
14695 # Some ARM platforms use a mixed-endian representation for doubles.
14696 # While Python doesn't currently have full support for these platforms
14697 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14698 # conversions work.
14699 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14700 # or little, then it must be this?
14701
Christian Heimes39258d32021-04-17 11:36:35 +020014702$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014703
14704fi
14705
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014706# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014707# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014708# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014709# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014710# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014711# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014712
14713# This inline assembler syntax may also work for suncc and icc,
14714# so we try it on all platforms.
14715
Christian Heimes39258d32021-04-17 11:36:35 +020014716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14717$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 +000014718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014719/* end confdefs.h. */
14720
14721int
Christian Heimes39258d32021-04-17 11:36:35 +020014722main ()
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014723{
14724
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014725 unsigned short cw;
14726 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14727 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014728
14729 ;
14730 return 0;
14731}
14732_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014733if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014734 have_gcc_asm_for_x87=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014735else
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014737fi
Christian Heimes39258d32021-04-17 11:36:35 +020014738rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014739 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14741$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014742if test "$have_gcc_asm_for_x87" = yes
14743then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014744
Christian Heimes39258d32021-04-17 11:36:35 +020014745$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014746
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014748
Christian Heimes39258d32021-04-17 11:36:35 +020014749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14750$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 -040014751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752/* end confdefs.h. */
14753
14754int
Christian Heimes39258d32021-04-17 11:36:35 +020014755main ()
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014756{
14757
14758 unsigned int fpcr;
14759 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14760 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14761
14762 ;
14763 return 0;
14764}
14765_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014766if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014767 have_gcc_asm_for_mc68881=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014768else
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014769 have_gcc_asm_for_mc68881=no
14770fi
Christian Heimes39258d32021-04-17 11:36:35 +020014771rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014772 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14774$as_echo "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014775if test "$have_gcc_asm_for_mc68881" = yes
14776then
14777
Christian Heimes39258d32021-04-17 11:36:35 +020014778$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014779
14780fi
14781
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014782# Detect whether system arithmetic is subject to x87-style double
14783# rounding issues. The result of this test has little meaning on non
14784# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14785# mode is round-to-nearest and double rounding issues are present, and
14786# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Christian Heimes39258d32021-04-17 11:36:35 +020014787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14788$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014789# $BASECFLAGS may affect the result
14790ac_save_cc="$CC"
14791CC="$CC $BASECFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +020014792if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014793 ac_cv_x87_double_rounding=no
Christian Heimes39258d32021-04-17 11:36:35 +020014794else
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014796/* end confdefs.h. */
14797
14798#include <stdlib.h>
14799#include <math.h>
14800int main() {
14801 volatile double x, y, z;
14802 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14803 x = 0.99999999999999989; /* 1-2**-53 */
14804 y = 1./x;
14805 if (y != 1.)
14806 exit(0);
14807 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14808 x = 1e16;
14809 y = 2.99999;
14810 z = x + y;
14811 if (z != 1e16+4.)
14812 exit(0);
14813 /* both tests show evidence of double rounding */
14814 exit(1);
14815}
14816
14817_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014818if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014819 ac_cv_x87_double_rounding=no
Christian Heimes39258d32021-04-17 11:36:35 +020014820else
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14824 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014825fi
14826
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014827CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +020014828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14829$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014830if test "$ac_cv_x87_double_rounding" = yes
14831then
14832
Christian Heimes39258d32021-04-17 11:36:35 +020014833$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014834
14835fi
14836
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014837# ************************************
14838# * Check for mathematical functions *
14839# ************************************
14840
14841LIBS_SAVE=$LIBS
14842LIBS="$LIBS $LIBM"
14843
Christian Heimes39258d32021-04-17 11:36:35 +020014844for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14845do :
14846 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14847ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14848if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14849 cat >>confdefs.h <<_ACEOF
14850#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14851_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014852
14853fi
Christian Heimes39258d32021-04-17 11:36:35 +020014854done
14855
14856for ac_func in hypot lgamma log1p log2 round tgamma
14857do :
14858 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14859ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14860if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14861 cat >>confdefs.h <<_ACEOF
14862#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14863_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014864
14865fi
Christian Heimes39258d32021-04-17 11:36:35 +020014866done
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014867
Christian Heimes39258d32021-04-17 11:36:35 +020014868ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14869"
14870if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014871 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014872else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014873 ac_have_decl=0
14874fi
Christian Heimes39258d32021-04-17 11:36:35 +020014875
14876cat >>confdefs.h <<_ACEOF
14877#define HAVE_DECL_ISINF $ac_have_decl
14878_ACEOF
14879ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14880"
14881if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014882 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014883else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014884 ac_have_decl=0
14885fi
Christian Heimes39258d32021-04-17 11:36:35 +020014886
14887cat >>confdefs.h <<_ACEOF
14888#define HAVE_DECL_ISNAN $ac_have_decl
14889_ACEOF
14890ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14891"
14892if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014893 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014894else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014895 ac_have_decl=0
14896fi
Christian Heimes39258d32021-04-17 11:36:35 +020014897
14898cat >>confdefs.h <<_ACEOF
14899#define HAVE_DECL_ISFINITE $ac_have_decl
14900_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014901
14902
Mark Dickinsona614f042009-11-28 12:48:43 +000014903# For multiprocessing module, check that sem_open
14904# actually works. For FreeBSD versions <= 7.2,
14905# the kernel module that provides POSIX semaphores
14906# isn't loaded by default, so an attempt to call
14907# sem_open results in a 'Signal 12' error.
Christian Heimes39258d32021-04-17 11:36:35 +020014908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14909$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
14910if ${ac_cv_posix_semaphores_enabled+:} false; then :
14911 $as_echo_n "(cached) " >&6
14912else
14913 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014914 ac_cv_posix_semaphores_enabled=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014915else
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014917/* end confdefs.h. */
14918
14919#include <unistd.h>
14920#include <fcntl.h>
14921#include <stdio.h>
14922#include <semaphore.h>
14923#include <sys/stat.h>
14924
14925int main(void) {
14926 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14927 if (a == SEM_FAILED) {
14928 perror("sem_open");
14929 return 1;
14930 }
14931 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014932 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014933 return 0;
14934}
14935
14936_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014937if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014938 ac_cv_posix_semaphores_enabled=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014939else
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14943 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014944fi
14945
14946
Mark Dickinsona614f042009-11-28 12:48:43 +000014947fi
14948
Christian Heimes39258d32021-04-17 11:36:35 +020014949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14950$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014951if test $ac_cv_posix_semaphores_enabled = no
14952then
14953
Christian Heimes39258d32021-04-17 11:36:35 +020014954$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014955
14956fi
14957
Mark Dickinson10683072009-04-18 21:18:19 +000014958# Multiprocessing check for broken sem_getvalue
Christian Heimes39258d32021-04-17 11:36:35 +020014959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14960$as_echo_n "checking for broken sem_getvalue... " >&6; }
14961if ${ac_cv_broken_sem_getvalue+:} false; then :
14962 $as_echo_n "(cached) " >&6
14963else
14964 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014965 ac_cv_broken_sem_getvalue=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014966else
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014968/* end confdefs.h. */
14969
14970#include <unistd.h>
14971#include <fcntl.h>
14972#include <stdio.h>
14973#include <semaphore.h>
14974#include <sys/stat.h>
14975
14976int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014977 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014978 int count;
14979 int res;
14980 if(a==SEM_FAILED){
14981 perror("sem_open");
14982 return 1;
14983
14984 }
14985 res = sem_getvalue(a, &count);
14986 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014987 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014988 return res==-1 ? 1 : 0;
14989}
14990
Mark Dickinson10683072009-04-18 21:18:19 +000014991_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014992if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014993 ac_cv_broken_sem_getvalue=no
Christian Heimes39258d32021-04-17 11:36:35 +020014994else
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014999fi
15000
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015002fi
15003
Christian Heimes39258d32021-04-17 11:36:35 +020015004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
15005$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015006if test $ac_cv_broken_sem_getvalue = yes
15007then
15008
Christian Heimes39258d32021-04-17 11:36:35 +020015009$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015010
15011fi
15012
Christian Heimes39258d32021-04-17 11:36:35 +020015013ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
15014"
15015if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015016 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015017else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015018 ac_have_decl=0
15019fi
Christian Heimes39258d32021-04-17 11:36:35 +020015020
15021cat >>confdefs.h <<_ACEOF
15022#define HAVE_DECL_RTLD_LAZY $ac_have_decl
15023_ACEOF
15024ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15025"
15026if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015027 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015028else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015029 ac_have_decl=0
15030fi
Christian Heimes39258d32021-04-17 11:36:35 +020015031
15032cat >>confdefs.h <<_ACEOF
15033#define HAVE_DECL_RTLD_NOW $ac_have_decl
15034_ACEOF
15035ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15036"
15037if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015038 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015039else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015040 ac_have_decl=0
15041fi
Christian Heimes39258d32021-04-17 11:36:35 +020015042
15043cat >>confdefs.h <<_ACEOF
15044#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15045_ACEOF
15046ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
15047"
15048if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015049 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015050else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015051 ac_have_decl=0
15052fi
Christian Heimes39258d32021-04-17 11:36:35 +020015053
15054cat >>confdefs.h <<_ACEOF
15055#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
15056_ACEOF
15057ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
15058"
15059if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015060 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015061else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015062 ac_have_decl=0
15063fi
Christian Heimes39258d32021-04-17 11:36:35 +020015064
15065cat >>confdefs.h <<_ACEOF
15066#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
15067_ACEOF
15068ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
15069"
15070if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015071 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015072else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015073 ac_have_decl=0
15074fi
Christian Heimes39258d32021-04-17 11:36:35 +020015075
15076cat >>confdefs.h <<_ACEOF
15077#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
15078_ACEOF
15079ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
15080"
15081if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015082 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015083else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015084 ac_have_decl=0
15085fi
Christian Heimes39258d32021-04-17 11:36:35 +020015086
15087cat >>confdefs.h <<_ACEOF
15088#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
15089_ACEOF
15090ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
15091"
15092if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
Michael Feltc5ae1692017-12-19 13:58:49 +010015093 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015094else
Michael Feltc5ae1692017-12-19 13:58:49 +010015095 ac_have_decl=0
15096fi
Christian Heimes39258d32021-04-17 11:36:35 +020015097
15098cat >>confdefs.h <<_ACEOF
15099#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
15100_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015101
15102
Mark Dickinsonbd792642009-03-18 20:06:12 +000015103# determine what size digit to use for Python's longs
Christian Heimes39258d32021-04-17 11:36:35 +020015104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15105$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015106# Check whether --enable-big-digits was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015107if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015108 enableval=$enable_big_digits; case $enable_big_digits in
15109yes)
15110 enable_big_digits=30 ;;
15111no)
15112 enable_big_digits=15 ;;
1511315|30)
15114 ;;
15115*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015116 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 +000015117esac
Christian Heimes39258d32021-04-17 11:36:35 +020015118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15119$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015120
Christian Heimes39258d32021-04-17 11:36:35 +020015121cat >>confdefs.h <<_ACEOF
15122#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15123_ACEOF
Mark Dickinsonbd792642009-03-18 20:06:12 +000015124
15125
Christian Heimes39258d32021-04-17 11:36:35 +020015126else
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15128$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015129fi
15130
15131
Guido van Rossumef2255b2000-03-10 22:30:29 +000015132# check for wchar.h
Christian Heimes39258d32021-04-17 11:36:35 +020015133ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
15134if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
15136
Christian Heimes39258d32021-04-17 11:36:35 +020015137$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015139 wchar_h="yes"
15140
Christian Heimes39258d32021-04-17 11:36:35 +020015141else
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015143
15144fi
15145
Michael W. Hudson54241132001-12-07 15:38:26 +000015146
Christian Heimes39258d32021-04-17 11:36:35 +020015147
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015148# determine wchar_t size
15149if test "$wchar_h" = yes
15150then
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15154# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +020015155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15156$as_echo_n "checking size of wchar_t... " >&6; }
15157if ${ac_cv_sizeof_wchar_t+:} false; then :
15158 $as_echo_n "(cached) " >&6
15159else
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
Christian Heimes39258d32021-04-17 11:36:35 +020015161"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015162
Christian Heimes39258d32021-04-17 11:36:35 +020015163else
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 if test "$ac_cv_type_wchar_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +020015165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015167as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015168See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169 else
15170 ac_cv_sizeof_wchar_t=0
15171 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015173
Martin v. Löwis11437992002-04-12 09:54:03 +000015174fi
Christian Heimes39258d32021-04-17 11:36:35 +020015175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15176$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177
15178
15179
Christian Heimes39258d32021-04-17 11:36:35 +020015180cat >>confdefs.h <<_ACEOF
15181#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
15182_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015183
Michael W. Hudson54241132001-12-07 15:38:26 +000015184
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015185fi
15186
Christian Heimes39258d32021-04-17 11:36:35 +020015187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15188$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015189have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015191/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015192
15193#include <tcl.h>
15194#if TCL_UTF_MAX != 6
15195# error "NOT UCS4_TCL"
15196#endif
15197int
Christian Heimes39258d32021-04-17 11:36:35 +020015198main ()
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015199{
15200
15201 ;
15202 return 0;
15203}
15204_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015205if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015206
15207
Christian Heimes39258d32021-04-17 11:36:35 +020015208$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015209
15210 have_ucs4_tcl=yes
15211
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015212fi
Christian Heimes39258d32021-04-17 11:36:35 +020015213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15215$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015216
Skip Montanaro6dead952003-09-25 14:50:04 +000015217# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015218if test "$wchar_h" = yes
15219then
15220 # check whether wchar_t is signed or not
Christian Heimes39258d32021-04-17 11:36:35 +020015221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15222$as_echo_n "checking whether wchar_t is signed... " >&6; }
15223 if ${ac_cv_wchar_t_signed+:} false; then :
15224 $as_echo_n "(cached) " >&6
15225else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015226
Christian Heimes39258d32021-04-17 11:36:35 +020015227 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015228 ac_cv_wchar_t_signed=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015229else
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015231/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015232
15233 #include <wchar.h>
15234 int main()
15235 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015236 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015237 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015238 }
15239
15240_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015241if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015242 ac_cv_wchar_t_signed=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015243else
Matthias Kloseb9621712010-04-24 17:59:49 +000015244 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015248fi
15249
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015250fi
15251
Christian Heimes39258d32021-04-17 11:36:35 +020015252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15253$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254fi
15255
Christian Heimes39258d32021-04-17 11:36:35 +020015256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15257$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015258# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015259if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015260 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015261then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015262
Christian Heimes39258d32021-04-17 11:36:35 +020015263$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015264
Christian Heimes39258d32021-04-17 11:36:35 +020015265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15266$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015267else
Christian Heimes39258d32021-04-17 11:36:35 +020015268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15269$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015270fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015271
Jakub Kulík9032cf52021-04-30 15:21:42 +020015272case $ac_sys_system/$ac_sys_release in
15273SunOS/*)
15274 if test -f /etc/os-release; then
15275 OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
15276 if test "x$OS_NAME" = "xOracle Solaris"; then
15277 # bpo-43667: In Oracle Solaris, the internal form of wchar_t in
15278 # non-Unicode locales is not Unicode and hence cannot be used directly.
15279 # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html
15280
15281$as_echo "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h
15282
15283 fi
15284 fi
15285 ;;
15286esac
15287
Guido van Rossumef2255b2000-03-10 22:30:29 +000015288# check for endianness
Christian Heimes39258d32021-04-17 11:36:35 +020015289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15290$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
15291if ${ac_cv_c_bigendian+:} false; then :
15292 $as_echo_n "(cached) " >&6
15293else
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 ac_cv_c_bigendian=unknown
15295 # See if we're dealing with a universal compiler.
15296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15297/* end confdefs.h. */
15298#ifndef __APPLE_CC__
15299 not a universal capable compiler
15300 #endif
15301 typedef int dummy;
15302
Skip Montanaro6dead952003-09-25 14:50:04 +000015303_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015304if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015305
15306 # Check for potential -arch flags. It is not universal unless
15307 # there are at least two -arch flags with different values.
15308 ac_arch=
15309 ac_prev=
15310 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15311 if test -n "$ac_prev"; then
15312 case $ac_word in
15313 i?86 | x86_64 | ppc | ppc64)
15314 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15315 ac_arch=$ac_word
15316 else
15317 ac_cv_c_bigendian=universal
15318 break
15319 fi
15320 ;;
15321 esac
15322 ac_prev=
15323 elif test "x$ac_word" = "x-arch"; then
15324 ac_prev=arch
15325 fi
15326 done
15327fi
Christian Heimes39258d32021-04-17 11:36:35 +020015328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 if test $ac_cv_c_bigendian = unknown; then
15330 # See if sys/param.h defines the BYTE_ORDER macro.
15331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015332/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015333#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015335
Martin v. Löwis11437992002-04-12 09:54:03 +000015336int
Christian Heimes39258d32021-04-17 11:36:35 +020015337main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015338{
Matthias Kloseb9621712010-04-24 17:59:49 +000015339#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15340 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15341 && LITTLE_ENDIAN)
15342 bogus endian macros
15343 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
15345 ;
15346 return 0;
15347}
15348_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015349if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015350 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015352/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015353#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015355
Martin v. Löwis11437992002-04-12 09:54:03 +000015356int
Christian Heimes39258d32021-04-17 11:36:35 +020015357main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015358{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015359#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 not big endian
15361 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015362
15363 ;
15364 return 0;
15365}
15366_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015367if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015368 ac_cv_c_bigendian=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015369else
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015371fi
Christian Heimes39258d32021-04-17 11:36:35 +020015372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015373fi
Christian Heimes39258d32021-04-17 11:36:35 +020015374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 fi
15376 if test $ac_cv_c_bigendian = unknown; then
15377 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015379/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015380#include <limits.h>
15381
Martin v. Löwis11437992002-04-12 09:54:03 +000015382int
Christian Heimes39258d32021-04-17 11:36:35 +020015383main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015384{
Matthias Kloseb9621712010-04-24 17:59:49 +000015385#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15386 bogus endian macros
15387 #endif
15388
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 ;
15390 return 0;
15391}
15392_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015393if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 # It does; now see whether it defined to _BIG_ENDIAN or not.
15395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15396/* end confdefs.h. */
15397#include <limits.h>
15398
15399int
Christian Heimes39258d32021-04-17 11:36:35 +020015400main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015401{
15402#ifndef _BIG_ENDIAN
15403 not big endian
15404 #endif
15405
15406 ;
15407 return 0;
15408}
15409_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 ac_cv_c_bigendian=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015412else
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015414fi
Christian Heimes39258d32021-04-17 11:36:35 +020015415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015416fi
Christian Heimes39258d32021-04-17 11:36:35 +020015417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 fi
15419 if test $ac_cv_c_bigendian = unknown; then
15420 # Compile a test program.
Christian Heimes39258d32021-04-17 11:36:35 +020015421 if test "$cross_compiling" = yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 # Try to guess by grepping values from an object file.
15423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15424/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +020015425short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Christian Heimes39258d32021-04-17 11:36:35 +020015427 short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15429 int use_ascii (int i) {
15430 return ascii_mm[i] + ascii_ii[i];
15431 }
Christian Heimes39258d32021-04-17 11:36:35 +020015432 short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015433 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Christian Heimes39258d32021-04-17 11:36:35 +020015434 short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015435 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15436 int use_ebcdic (int i) {
15437 return ebcdic_mm[i] + ebcdic_ii[i];
15438 }
15439 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015440
Matthias Kloseb9621712010-04-24 17:59:49 +000015441int
Christian Heimes39258d32021-04-17 11:36:35 +020015442main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015443{
15444return use_ascii (foo) == use_ebcdic (foo);
15445 ;
15446 return 0;
15447}
15448_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015449if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15451 ac_cv_c_bigendian=yes
15452 fi
15453 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15454 if test "$ac_cv_c_bigendian" = unknown; then
15455 ac_cv_c_bigendian=no
15456 else
15457 # finding both strings is unlikely to happen, but who knows?
15458 ac_cv_c_bigendian=unknown
15459 fi
15460 fi
15461fi
Christian Heimes39258d32021-04-17 11:36:35 +020015462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15463else
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015465/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015467int
Christian Heimes39258d32021-04-17 11:36:35 +020015468main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470
Matthias Kloseb9621712010-04-24 17:59:49 +000015471 /* Are we little or big endian? From Harbison&Steele. */
15472 union
15473 {
15474 long int l;
15475 char c[sizeof (long int)];
15476 } u;
15477 u.l = 1;
15478 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015479
15480 ;
15481 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015482}
Martin v. Löwis11437992002-04-12 09:54:03 +000015483_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015484if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015485 ac_cv_c_bigendian=no
Christian Heimes39258d32021-04-17 11:36:35 +020015486else
Matthias Kloseb9621712010-04-24 17:59:49 +000015487 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015494fi
Christian Heimes39258d32021-04-17 11:36:35 +020015495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15496$as_echo "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015497 case $ac_cv_c_bigendian in #(
15498 yes)
Christian Heimes39258d32021-04-17 11:36:35 +020015499 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015500;; #(
15501 no)
15502 ;; #(
15503 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015504
Christian Heimes39258d32021-04-17 11:36:35 +020015505$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015506
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 ;; #(
15508 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015509 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015510 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015511 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015512
Michael W. Hudson54241132001-12-07 15:38:26 +000015513
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015514# ABI version string for Python extension modules. This appears between the
15515# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15516# from the following attributes which affect the ABI of this Python build (in
15517# this order):
15518#
15519# * The Python implementation (always 'cpython-' for us)
15520# * The major and minor version numbers
15521# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015522#
15523# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015524# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15525# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015526#
15527# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15528# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015529
Christian Heimes39258d32021-04-17 11:36:35 +020015530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15531$as_echo_n "checking ABIFLAGS... " >&6; }
15532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15533$as_echo "$ABIFLAGS" >&6; }
15534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15535$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015536SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Christian Heimes39258d32021-04-17 11:36:35 +020015537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15538$as_echo "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015539
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015540# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15541if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015542 # Similar to SOABI but remove "d" flag from ABIFLAGS
15543
15544 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15545
Christian Heimes39258d32021-04-17 11:36:35 +020015546cat >>confdefs.h <<_ACEOF
15547#define ALT_SOABI "${ALT_SOABI}"
15548_ACEOF
Victor Stinner5422e3c2019-04-26 01:40:00 +020015549
15550fi
15551
Victor Stinner52a327c2020-12-23 03:41:08 +010015552
Matti Picusa44ce6c2020-12-20 04:56:57 +020015553EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015554
Christian Heimes39258d32021-04-17 11:36:35 +020015555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15556$as_echo_n "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015557LDVERSION='$(VERSION)$(ABIFLAGS)'
Christian Heimes39258d32021-04-17 11:36:35 +020015558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15559$as_echo "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015560
E. M. Brayc994c8f2019-05-24 17:33:47 +020015561# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015562
E. M. Brayb1fc4172019-05-24 18:39:39 +020015563if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015564 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015565else
15566 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015567fi
15568
doko@python.org87421192013-01-26 11:39:31 +010015569
Victor Stinner51ae31e2020-06-09 15:32:43 +020015570
15571BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15572
15573
15574# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015575# /usr/$LIDIRNAME/python$VERSION
15576
15577PLATLIBDIR="lib"
Christian Heimes39258d32021-04-17 11:36:35 +020015578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15579$as_echo_n "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015580
15581# Check whether --with-platlibdir was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015582if test "${with_platlibdir+set}" = set; then :
Victor Stinner8510f432020-03-10 09:53:09 +010015583 withval=$with_platlibdir;
15584# ignore 3 options:
15585# --with-platlibdir
15586# --with-platlibdir=
15587# --without-platlibdir
15588if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15589then
Christian Heimes39258d32021-04-17 11:36:35 +020015590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15591$as_echo "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015592 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015593 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015594else
Christian Heimes39258d32021-04-17 11:36:35 +020015595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15596$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015597fi
Christian Heimes39258d32021-04-17 11:36:35 +020015598else
15599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15600$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015601fi
15602
15603
15604
15605
15606if test x$PLATFORM_TRIPLET = x; then
15607 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15608else
15609 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015610fi
doko@python.org87421192013-01-26 11:39:31 +010015611
15612
Victor Stinner75e59a92021-01-20 17:07:21 +010015613# Check for --with-wheel-pkg-dir=PATH
15614
15615WHEEL_PKG_DIR=""
Christian Heimes39258d32021-04-17 11:36:35 +020015616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15617$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015618
15619# Check whether --with-wheel-pkg-dir was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015620if test "${with_wheel_pkg_dir+set}" = set; then :
Victor Stinner75e59a92021-01-20 17:07:21 +010015621 withval=$with_wheel_pkg_dir;
15622if test -n "$withval"; then
Christian Heimes39258d32021-04-17 11:36:35 +020015623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15624$as_echo "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015625 WHEEL_PKG_DIR="$withval"
15626else
Christian Heimes39258d32021-04-17 11:36:35 +020015627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15628$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015629fi
Christian Heimes39258d32021-04-17 11:36:35 +020015630else
15631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15632$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015633fi
15634
15635
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015636# Check whether right shifting a negative integer extends the sign bit
15637# or fills with zeros (like the Cray J90, according to Tim Peters).
Christian Heimes39258d32021-04-17 11:36:35 +020015638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15639$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
15640if ${ac_cv_rshift_extends_sign+:} false; then :
15641 $as_echo_n "(cached) " >&6
15642else
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
Christian Heimes39258d32021-04-17 11:36:35 +020015644if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015645 ac_cv_rshift_extends_sign=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015646else
Matthias Kloseb9621712010-04-24 17:59:49 +000015647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015648/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015649
15650int main()
15651{
Joshua Root674fa0a2020-12-14 07:56:34 +110015652 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015653}
15654
Martin v. Löwis11437992002-04-12 09:54:03 +000015655_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015656if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015657 ac_cv_rshift_extends_sign=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015658else
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015663fi
15664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015665fi
15666
Christian Heimes39258d32021-04-17 11:36:35 +020015667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15668$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015669if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015670then
Martin v. Löwis11437992002-04-12 09:54:03 +000015671
Christian Heimes39258d32021-04-17 11:36:35 +020015672$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015673
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015674fi
15675
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015676# check for getc_unlocked and related locking functions
Christian Heimes39258d32021-04-17 11:36:35 +020015677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15678$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
15679if ${ac_cv_have_getc_unlocked+:} false; then :
15680 $as_echo_n "(cached) " >&6
15681else
Martin v. Löwis11437992002-04-12 09:54:03 +000015682
Matthias Kloseb9621712010-04-24 17:59:49 +000015683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015684/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015685#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015686int
Christian Heimes39258d32021-04-17 11:36:35 +020015687main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015688{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015689
15690 FILE *f = fopen("/dev/null", "r");
15691 flockfile(f);
15692 getc_unlocked(f);
15693 funlockfile(f);
15694
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 ;
15696 return 0;
15697}
15698_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015699if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015700 ac_cv_have_getc_unlocked=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015701else
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 ac_cv_have_getc_unlocked=no
15703fi
Christian Heimes39258d32021-04-17 11:36:35 +020015704rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707
Christian Heimes39258d32021-04-17 11:36:35 +020015708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15709$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015710if test "$ac_cv_have_getc_unlocked" = yes
15711then
Martin v. Löwis11437992002-04-12 09:54:03 +000015712
Christian Heimes39258d32021-04-17 11:36:35 +020015713$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015714
15715fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015716
Roland Hiebere1f77692021-02-09 02:05:25 +010015717
15718# Check whether --with-readline was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015719if test "${with_readline+set}" = set; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015720 withval=$with_readline;
Christian Heimes39258d32021-04-17 11:36:35 +020015721else
Roland Hiebere1f77692021-02-09 02:05:25 +010015722 with_readline=yes
15723fi
15724
15725
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015726# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010015727py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000015728# save the value of LIBS so we don't actually link Python with readline
15729LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015730
Roland Hiebere1f77692021-02-09 02:05:25 +010015731if test "$with_readline" != no; then
15732 case "$with_readline" in
15733 editline|edit)
15734 LIBREADLINE=edit
15735
Christian Heimes39258d32021-04-17 11:36:35 +020015736$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010015737
15738 ;;
15739 yes|readline)
15740 LIBREADLINE=readline
15741 ;;
15742 *)
15743 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
15744 ;;
15745 esac
15746
15747 # On some systems we need to link readline to a termcap compatible
15748 # library. NOTE: Keep the precedence of listed libraries synchronised
15749 # with setup.py.
Christian Heimes39258d32021-04-17 11:36:35 +020015750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15751$as_echo_n "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015752 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
15753 if test -z "$py_libtermcap"; then
15754 READLINE_LIBS="-l$LIBREADLINE"
15755 else
15756 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
15757 fi
15758 LIBS="$READLINE_LIBS $LIBS_no_readline"
15759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015760/* end confdefs.h. */
15761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762/* Override any GCC internal prototype to avoid an error.
15763 Use char because int might match the return type of a GCC
15764 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015765#ifdef __cplusplus
15766extern "C"
15767#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015768char readline ();
15769int
Christian Heimes39258d32021-04-17 11:36:35 +020015770main ()
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015772return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015773 ;
15774 return 0;
15775}
15776_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015777if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015778 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015779fi
Christian Heimes39258d32021-04-17 11:36:35 +020015780rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015781 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010015782 if test $py_cv_lib_readline = yes; then
15783 break
15784 fi
15785 done
15786
15787 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
15788 #AC_SUBST([READLINE_LIBS])
15789 if test $py_cv_lib_readline = no; then
Christian Heimes39258d32021-04-17 11:36:35 +020015790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15791$as_echo "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015792 else
Christian Heimes39258d32021-04-17 11:36:35 +020015793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15794$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015795
Christian Heimes39258d32021-04-17 11:36:35 +020015796$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015797
Roland Hiebere1f77692021-02-09 02:05:25 +010015798 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015799fi
15800
Roland Hiebere1f77692021-02-09 02:05:25 +010015801if test "$py_cv_lib_readline" = yes; then
15802 # check for readline 2.2
Christian Heimes39258d32021-04-17 11:36:35 +020015803 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 +010015804#include <stdio.h> /* Must be first for Gnu Readline */
15805#ifdef WITH_EDITLINE
15806# include <editline/readline.h>
15807#else
15808# include <readline/readline.h>
15809#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015810
Christian Heimes39258d32021-04-17 11:36:35 +020015811"
15812if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015813
Christian Heimes39258d32021-04-17 11:36:35 +020015814$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015815
15816fi
Christian Heimes39258d32021-04-17 11:36:35 +020015817
15818 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 +010015819#include <stdio.h> /* Must be first for Gnu Readline */
15820#ifdef WITH_EDITLINE
15821# include <editline/readline.h>
15822#else
15823# include <readline/readline.h>
15824#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000015825
Christian Heimes39258d32021-04-17 11:36:35 +020015826"
15827if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015828
Christian Heimes39258d32021-04-17 11:36:35 +020015829$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015830
15831fi
Antoine Pitroud5131772009-10-26 19:22:14 +000015832
Christian Heimes39258d32021-04-17 11:36:35 +020015833
Roland Hiebere1f77692021-02-09 02:05:25 +010015834 # check for readline 4.0
Christian Heimes39258d32021-04-17 11:36:35 +020015835 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
15836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
15837$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
15838if eval \${$as_ac_Lib+:} false; then :
15839 $as_echo_n "(cached) " >&6
15840else
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015842LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846/* Override any GCC internal prototype to avoid an error.
15847 Use char because int might match the return type of a GCC
15848 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015849#ifdef __cplusplus
15850extern "C"
15851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015852char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015853int
Christian Heimes39258d32021-04-17 11:36:35 +020015854main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 ;
15858 return 0;
15859}
15860_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015861if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015862 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015863else
Roland Hiebere1f77692021-02-09 02:05:25 +010015864 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015865fi
Christian Heimes39258d32021-04-17 11:36:35 +020015866rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015868LIBS=$ac_check_lib_save_LIBS
15869fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015870eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15872$as_echo "$ac_res" >&6; }
15873if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015874
Christian Heimes39258d32021-04-17 11:36:35 +020015875$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015876
Martin v. Löwis0daad592001-09-30 21:09:59 +000015877fi
15878
Michael W. Hudson54241132001-12-07 15:38:26 +000015879
Roland Hiebere1f77692021-02-09 02:05:25 +010015880 # also in 4.0
Christian Heimes39258d32021-04-17 11:36:35 +020015881 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
15882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
15883$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
15884if eval \${$as_ac_Lib+:} false; then :
15885 $as_echo_n "(cached) " >&6
15886else
Thomas Wouters89d996e2007-09-08 17:39:28 +000015887 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015888LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015890/* end confdefs.h. */
15891
15892/* Override any GCC internal prototype to avoid an error.
15893 Use char because int might match the return type of a GCC
15894 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015895#ifdef __cplusplus
15896extern "C"
15897#endif
Thomas Wouters89d996e2007-09-08 17:39:28 +000015898char rl_completion_display_matches_hook ();
15899int
Christian Heimes39258d32021-04-17 11:36:35 +020015900main ()
Thomas Wouters89d996e2007-09-08 17:39:28 +000015901{
15902return rl_completion_display_matches_hook ();
15903 ;
15904 return 0;
15905}
15906_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015907if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015908 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015909else
Roland Hiebere1f77692021-02-09 02:05:25 +010015910 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015911fi
Christian Heimes39258d32021-04-17 11:36:35 +020015912rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015914LIBS=$ac_check_lib_save_LIBS
15915fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015916eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15918$as_echo "$ac_res" >&6; }
15919if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015920
Christian Heimes39258d32021-04-17 11:36:35 +020015921$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015922
15923fi
15924
15925
Roland Hiebere1f77692021-02-09 02:05:25 +010015926 # also in 4.0, but not in editline
Christian Heimes39258d32021-04-17 11:36:35 +020015927 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
15928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
15929$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
15930if eval \${$as_ac_Lib+:} false; then :
15931 $as_echo_n "(cached) " >&6
15932else
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015933 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015934LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15936/* end confdefs.h. */
15937
15938/* Override any GCC internal prototype to avoid an error.
15939 Use char because int might match the return type of a GCC
15940 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015941#ifdef __cplusplus
15942extern "C"
15943#endif
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015944char rl_resize_terminal ();
15945int
Christian Heimes39258d32021-04-17 11:36:35 +020015946main ()
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015947{
15948return rl_resize_terminal ();
15949 ;
15950 return 0;
15951}
15952_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015953if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015954 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015955else
Roland Hiebere1f77692021-02-09 02:05:25 +010015956 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015957fi
Christian Heimes39258d32021-04-17 11:36:35 +020015958rm -f core conftest.err conftest.$ac_objext \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015959 conftest$ac_exeext conftest.$ac_ext
15960LIBS=$ac_check_lib_save_LIBS
15961fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015962eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15964$as_echo "$ac_res" >&6; }
15965if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015966
Christian Heimes39258d32021-04-17 11:36:35 +020015967$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015968
15969fi
15970
15971
Roland Hiebere1f77692021-02-09 02:05:25 +010015972 # check for readline 4.2
Christian Heimes39258d32021-04-17 11:36:35 +020015973 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
15974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
15975$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
15976if eval \${$as_ac_Lib+:} false; then :
15977 $as_echo_n "(cached) " >&6
15978else
Martin v. Löwis11437992002-04-12 09:54:03 +000015979 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015980LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984/* Override any GCC internal prototype to avoid an error.
15985 Use char because int might match the return type of a GCC
15986 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015987#ifdef __cplusplus
15988extern "C"
15989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015990char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015991int
Christian Heimes39258d32021-04-17 11:36:35 +020015992main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015993{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015995 ;
15996 return 0;
15997}
15998_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015999if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010016000 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020016001else
Roland Hiebere1f77692021-02-09 02:05:25 +010016002 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000016003fi
Christian Heimes39258d32021-04-17 11:36:35 +020016004rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000016005 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016006LIBS=$ac_check_lib_save_LIBS
16007fi
Roland Hiebere1f77692021-02-09 02:05:25 +010016008eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020016009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16010$as_echo "$ac_res" >&6; }
16011if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000016012
Christian Heimes39258d32021-04-17 11:36:35 +020016013$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000016014
Guido van Rossum353ae582001-07-10 16:45:32 +000016015fi
16016
Jack Jansendd19cf82001-12-06 22:36:17 +000016017
Roland Hiebere1f77692021-02-09 02:05:25 +010016018 # also in readline 4.2
Christian Heimes39258d32021-04-17 11:36:35 +020016019 ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010016020#include <stdio.h> /* Must be first for Gnu Readline */
16021#ifdef WITH_EDITLINE
16022# include <editline/readline.h>
16023#else
16024# include <readline/readline.h>
16025#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000016026
Christian Heimes39258d32021-04-17 11:36:35 +020016027"
16028if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016029
Christian Heimes39258d32021-04-17 11:36:35 +020016030$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016031
16032fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016033
Christian Heimes39258d32021-04-17 11:36:35 +020016034
16035 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
16036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
16037$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
16038if eval \${$as_ac_Lib+:} false; then :
16039 $as_echo_n "(cached) " >&6
16040else
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016041 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010016042LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16044/* end confdefs.h. */
16045
16046/* Override any GCC internal prototype to avoid an error.
16047 Use char because int might match the return type of a GCC
16048 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020016049#ifdef __cplusplus
16050extern "C"
16051#endif
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016052char append_history ();
16053int
Christian Heimes39258d32021-04-17 11:36:35 +020016054main ()
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016055{
16056return append_history ();
16057 ;
16058 return 0;
16059}
16060_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016061if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010016062 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020016063else
Roland Hiebere1f77692021-02-09 02:05:25 +010016064 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016065fi
Christian Heimes39258d32021-04-17 11:36:35 +020016066rm -f core conftest.err conftest.$ac_objext \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016067 conftest$ac_exeext conftest.$ac_ext
16068LIBS=$ac_check_lib_save_LIBS
16069fi
Roland Hiebere1f77692021-02-09 02:05:25 +010016070eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020016071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16072$as_echo "$ac_res" >&6; }
16073if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016074
Christian Heimes39258d32021-04-17 11:36:35 +020016075$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016076
16077fi
16078
Roland Hiebere1f77692021-02-09 02:05:25 +010016079fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016080
Martin v. Löwis82bca632006-02-10 20:49:30 +000016081# End of readline checks: restore LIBS
16082LIBS=$LIBS_no_readline
16083
Christian Heimes39258d32021-04-17 11:36:35 +020016084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
16085$as_echo_n "checking for broken nice()... " >&6; }
16086if ${ac_cv_broken_nice+:} false; then :
16087 $as_echo_n "(cached) " >&6
16088else
Martin v. Löwis11437992002-04-12 09:54:03 +000016089
Christian Heimes39258d32021-04-17 11:36:35 +020016090if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000016091 ac_cv_broken_nice=no
Christian Heimes39258d32021-04-17 11:36:35 +020016092else
Matthias Kloseb9621712010-04-24 17:59:49 +000016093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016094/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016095
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080016096#include <stdlib.h>
16097#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016098int main()
16099{
16100 int val1 = nice(1);
16101 if (val1 != -1 && val1 == nice(2))
16102 exit(0);
16103 exit(1);
16104}
16105
Martin v. Löwis11437992002-04-12 09:54:03 +000016106_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016107if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016108 ac_cv_broken_nice=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016109else
Matthias Kloseb9621712010-04-24 17:59:49 +000016110 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016114fi
16115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016116fi
16117
Christian Heimes39258d32021-04-17 11:36:35 +020016118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
16119$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016120if test "$ac_cv_broken_nice" = yes
16121then
Martin v. Löwis11437992002-04-12 09:54:03 +000016122
Christian Heimes39258d32021-04-17 11:36:35 +020016123$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016124
16125fi
16126
Christian Heimes39258d32021-04-17 11:36:35 +020016127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
16128$as_echo_n "checking for broken poll()... " >&6; }
16129if ${ac_cv_broken_poll+:} false; then :
16130 $as_echo_n "(cached) " >&6
16131else
16132 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016133 ac_cv_broken_poll=no
Christian Heimes39258d32021-04-17 11:36:35 +020016134else
Matthias Kloseb9621712010-04-24 17:59:49 +000016135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016136/* end confdefs.h. */
16137
16138#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016139#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016141int main()
16142{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016143 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016144 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016145
16146 close (42);
16147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016148 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016149 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016150 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016151 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016152 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016153 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016154 return 1;
16155}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016156
16157_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016158if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016159 ac_cv_broken_poll=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016160else
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16164 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016167fi
16168
Christian Heimes39258d32021-04-17 11:36:35 +020016169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16170$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016171if test "$ac_cv_broken_poll" = yes
16172then
16173
Christian Heimes39258d32021-04-17 11:36:35 +020016174$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016175
16176fi
16177
Martin v. Löwis1d459062005-03-14 21:23:33 +000016178# check tzset(3) exists and works like we expect it to
Christian Heimes39258d32021-04-17 11:36:35 +020016179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16180$as_echo_n "checking for working tzset()... " >&6; }
16181if ${ac_cv_working_tzset+:} false; then :
16182 $as_echo_n "(cached) " >&6
16183else
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016184
Christian Heimes39258d32021-04-17 11:36:35 +020016185if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016186 ac_cv_working_tzset=no
Christian Heimes39258d32021-04-17 11:36:35 +020016187else
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016189/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016190
16191#include <stdlib.h>
16192#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016193#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016194
16195#if HAVE_TZNAME
16196extern char *tzname[];
16197#endif
16198
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016199int main()
16200{
Brett Cannon18367812003-09-19 00:59:16 +000016201 /* Note that we need to ensure that not only does tzset(3)
16202 do 'something' with localtime, but it works as documented
16203 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016204 This includes making sure that tzname is set properly if
16205 tm->tm_zone does not exist since it is the alternative way
16206 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016207
16208 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016209 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016210 */
16211
Martin v. Löwis1d459062005-03-14 21:23:33 +000016212 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016213 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16214
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016215 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016216 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016217 if (localtime(&groundhogday)->tm_hour != 0)
16218 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016219#if HAVE_TZNAME
16220 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16221 if (strcmp(tzname[0], "UTC") ||
16222 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16223 exit(1);
16224#endif
Brett Cannon18367812003-09-19 00:59:16 +000016225
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016226 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016227 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016228 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016229 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016230#if HAVE_TZNAME
16231 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16232 exit(1);
16233#endif
Brett Cannon18367812003-09-19 00:59:16 +000016234
16235 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16236 tzset();
16237 if (localtime(&groundhogday)->tm_hour != 11)
16238 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016239#if HAVE_TZNAME
16240 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16241 exit(1);
16242#endif
16243
16244#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016245 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16246 exit(1);
16247 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16248 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016249#endif
Brett Cannon18367812003-09-19 00:59:16 +000016250
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016251 exit(0);
16252}
16253
16254_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016255if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016256 ac_cv_working_tzset=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016257else
Matthias Kloseb9621712010-04-24 17:59:49 +000016258 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16261 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016262fi
16263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264fi
16265
Christian Heimes39258d32021-04-17 11:36:35 +020016266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16267$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016268if test "$ac_cv_working_tzset" = yes
16269then
16270
Christian Heimes39258d32021-04-17 11:36:35 +020016271$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016272
16273fi
16274
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016275# Look for subsecond timestamps in struct stat
Christian Heimes39258d32021-04-17 11:36:35 +020016276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16277$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
16278if ${ac_cv_stat_tv_nsec+:} false; then :
16279 $as_echo_n "(cached) " >&6
16280else
Matthias Kloseb9621712010-04-24 17:59:49 +000016281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016282/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016283#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016284int
Christian Heimes39258d32021-04-17 11:36:35 +020016285main ()
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016286{
16287
16288struct stat st;
16289st.st_mtim.tv_nsec = 1;
16290
16291 ;
16292 return 0;
16293}
16294_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016296 ac_cv_stat_tv_nsec=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016297else
Matthias Kloseb9621712010-04-24 17:59:49 +000016298 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016299fi
Christian Heimes39258d32021-04-17 11:36:35 +020016300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301fi
16302
Christian Heimes39258d32021-04-17 11:36:35 +020016303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16304$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016305if test "$ac_cv_stat_tv_nsec" = yes
16306then
16307
Christian Heimes39258d32021-04-17 11:36:35 +020016308$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016309
16310fi
16311
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016312# Look for BSD style subsecond timestamps in struct stat
Christian Heimes39258d32021-04-17 11:36:35 +020016313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16314$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
16315if ${ac_cv_stat_tv_nsec2+:} false; then :
16316 $as_echo_n "(cached) " >&6
16317else
Matthias Kloseb9621712010-04-24 17:59:49 +000016318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016319/* end confdefs.h. */
16320#include <sys/stat.h>
16321int
Christian Heimes39258d32021-04-17 11:36:35 +020016322main ()
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016323{
16324
16325struct stat st;
16326st.st_mtimespec.tv_nsec = 1;
16327
16328 ;
16329 return 0;
16330}
16331_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016333 ac_cv_stat_tv_nsec2=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016334else
Matthias Kloseb9621712010-04-24 17:59:49 +000016335 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016336fi
Christian Heimes39258d32021-04-17 11:36:35 +020016337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338fi
16339
Christian Heimes39258d32021-04-17 11:36:35 +020016340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16341$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016342if test "$ac_cv_stat_tv_nsec2" = yes
16343then
16344
Christian Heimes39258d32021-04-17 11:36:35 +020016345$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016346
16347fi
16348
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016349# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016350ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016351if test "$cross_compiling" = no; then
16352 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16353fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016354
Christian Heimes39258d32021-04-17 11:36:35 +020016355for ac_header in curses.h ncurses.h
16356do :
16357 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16358ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16359if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16360 cat >>confdefs.h <<_ACEOF
16361#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16362_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016363
16364fi
Pablo Galindocc128882021-03-01 16:47:53 +000016365
Christian Heimes39258d32021-04-17 11:36:35 +020016366done
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016367
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016368
16369# On Solaris, term.h requires curses.h
Christian Heimes39258d32021-04-17 11:36:35 +020016370for ac_header in term.h
16371do :
16372 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016373#ifdef HAVE_CURSES_H
16374#include <curses.h>
16375#endif
16376
16377"
Christian Heimes39258d32021-04-17 11:36:35 +020016378if test "x$ac_cv_header_term_h" = xyes; then :
16379 cat >>confdefs.h <<_ACEOF
16380#define HAVE_TERM_H 1
16381_ACEOF
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016382
16383fi
16384
Christian Heimes39258d32021-04-17 11:36:35 +020016385done
16386
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016387
Jack Jansen666b1e72001-10-31 12:11:48 +000016388# On HP/UX 11.0, mvwdelch is a block with a return statement
Christian Heimes39258d32021-04-17 11:36:35 +020016389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16390$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
16391if ${ac_cv_mvwdelch_is_expression+:} false; then :
16392 $as_echo_n "(cached) " >&6
16393else
Matthias Kloseb9621712010-04-24 17:59:49 +000016394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016395/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016396#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016397int
Christian Heimes39258d32021-04-17 11:36:35 +020016398main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016399{
Jack Jansen666b1e72001-10-31 12:11:48 +000016400
16401 int rtn;
16402 rtn = mvwdelch(0,0,0);
16403
Martin v. Löwis11437992002-04-12 09:54:03 +000016404 ;
16405 return 0;
16406}
16407_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016408if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016409 ac_cv_mvwdelch_is_expression=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016410else
Matthias Kloseb9621712010-04-24 17:59:49 +000016411 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016412fi
Christian Heimes39258d32021-04-17 11:36:35 +020016413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016414fi
16415
Christian Heimes39258d32021-04-17 11:36:35 +020016416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16417$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016418
16419if test "$ac_cv_mvwdelch_is_expression" = yes
16420then
Martin v. Löwis11437992002-04-12 09:54:03 +000016421
Christian Heimes39258d32021-04-17 11:36:35 +020016422$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016423
16424fi
16425
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016426# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16427# structs since version 5.7. If the macro is defined as zero before including
16428# [n]curses.h, ncurses will expose fields of the structs regardless of the
16429# configuration.
Christian Heimes39258d32021-04-17 11:36:35 +020016430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16431$as_echo_n "checking whether WINDOW has _flags... " >&6; }
16432if ${ac_cv_window_has_flags+:} false; then :
16433 $as_echo_n "(cached) " >&6
16434else
Matthias Kloseb9621712010-04-24 17:59:49 +000016435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016436/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016437
16438 #define NCURSES_OPAQUE 0
16439 #include <curses.h>
16440
Martin v. Löwis11437992002-04-12 09:54:03 +000016441int
Christian Heimes39258d32021-04-17 11:36:35 +020016442main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016443{
Jack Jansen666b1e72001-10-31 12:11:48 +000016444
16445 WINDOW *w;
16446 w->_flags = 0;
16447
Martin v. Löwis11437992002-04-12 09:54:03 +000016448 ;
16449 return 0;
16450}
16451_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016452if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016453 ac_cv_window_has_flags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016454else
Matthias Kloseb9621712010-04-24 17:59:49 +000016455 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016456fi
Christian Heimes39258d32021-04-17 11:36:35 +020016457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016458fi
16459
Christian Heimes39258d32021-04-17 11:36:35 +020016460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16461$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016462
Jack Jansen666b1e72001-10-31 12:11:48 +000016463
16464if test "$ac_cv_window_has_flags" = yes
16465then
Martin v. Löwis11437992002-04-12 09:54:03 +000016466
Christian Heimes39258d32021-04-17 11:36:35 +020016467$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016468
16469fi
16470
Christian Heimes39258d32021-04-17 11:36:35 +020016471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16472$as_echo_n "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16474/* end confdefs.h. */
16475#include <curses.h>
16476int
Christian Heimes39258d32021-04-17 11:36:35 +020016477main ()
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016478{
16479
16480#ifndef is_pad
16481void *x=is_pad
16482#endif
16483
16484 ;
16485 return 0;
16486}
16487_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016488if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016489
Christian Heimes39258d32021-04-17 11:36:35 +020016490$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016491
Christian Heimes39258d32021-04-17 11:36:35 +020016492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16493$as_echo "yes" >&6; }
16494else
16495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16496$as_echo "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016497
16498fi
Christian Heimes39258d32021-04-17 11:36:35 +020016499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016500
Christian Heimes39258d32021-04-17 11:36:35 +020016501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16502$as_echo_n "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016504/* end confdefs.h. */
16505#include <curses.h>
16506int
Christian Heimes39258d32021-04-17 11:36:35 +020016507main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016508{
16509void *x=is_term_resized
16510 ;
16511 return 0;
16512}
16513_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016515
Christian Heimes39258d32021-04-17 11:36:35 +020016516$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016517
Christian Heimes39258d32021-04-17 11:36:35 +020016518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16519$as_echo "yes" >&6; }
16520else
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16522$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016523
16524fi
Christian Heimes39258d32021-04-17 11:36:35 +020016525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526
Christian Heimes39258d32021-04-17 11:36:35 +020016527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16528$as_echo_n "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016530/* end confdefs.h. */
16531#include <curses.h>
16532int
Christian Heimes39258d32021-04-17 11:36:35 +020016533main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016534{
16535void *x=resize_term
16536 ;
16537 return 0;
16538}
16539_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016540if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016541
Christian Heimes39258d32021-04-17 11:36:35 +020016542$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016543
Christian Heimes39258d32021-04-17 11:36:35 +020016544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16545$as_echo "yes" >&6; }
16546else
16547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16548$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016549
16550fi
Christian Heimes39258d32021-04-17 11:36:35 +020016551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552
Christian Heimes39258d32021-04-17 11:36:35 +020016553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16554$as_echo_n "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016556/* end confdefs.h. */
16557#include <curses.h>
16558int
Christian Heimes39258d32021-04-17 11:36:35 +020016559main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016560{
16561void *x=resizeterm
16562 ;
16563 return 0;
16564}
16565_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016566if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016567
Christian Heimes39258d32021-04-17 11:36:35 +020016568$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016569
Christian Heimes39258d32021-04-17 11:36:35 +020016570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16571$as_echo "yes" >&6; }
16572else
16573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16574$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016575
16576fi
Christian Heimes39258d32021-04-17 11:36:35 +020016577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016578
Christian Heimes39258d32021-04-17 11:36:35 +020016579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16580$as_echo_n "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16582/* end confdefs.h. */
16583#include <curses.h>
16584int
Christian Heimes39258d32021-04-17 11:36:35 +020016585main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016586{
16587
16588#ifndef immedok
16589void *x=immedok
16590#endif
16591
16592 ;
16593 return 0;
16594}
16595_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016596if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016597
Christian Heimes39258d32021-04-17 11:36:35 +020016598$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016599
Christian Heimes39258d32021-04-17 11:36:35 +020016600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16601$as_echo "yes" >&6; }
16602else
16603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16604$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016605
16606fi
Christian Heimes39258d32021-04-17 11:36:35 +020016607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016608
Christian Heimes39258d32021-04-17 11:36:35 +020016609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16610$as_echo_n "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16612/* end confdefs.h. */
16613#include <curses.h>
16614int
Christian Heimes39258d32021-04-17 11:36:35 +020016615main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016616{
16617
16618#ifndef syncok
16619void *x=syncok
16620#endif
16621
16622 ;
16623 return 0;
16624}
16625_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016626if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016627
Christian Heimes39258d32021-04-17 11:36:35 +020016628$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016629
Christian Heimes39258d32021-04-17 11:36:35 +020016630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16631$as_echo "yes" >&6; }
16632else
16633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16634$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016635
16636fi
Christian Heimes39258d32021-04-17 11:36:35 +020016637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016638
Christian Heimes39258d32021-04-17 11:36:35 +020016639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16640$as_echo_n "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16642/* end confdefs.h. */
16643#include <curses.h>
16644int
Christian Heimes39258d32021-04-17 11:36:35 +020016645main ()
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016646{
16647
16648#ifndef wchgat
16649void *x=wchgat
16650#endif
16651
16652 ;
16653 return 0;
16654}
16655_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016656if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016657
Christian Heimes39258d32021-04-17 11:36:35 +020016658$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016659
Christian Heimes39258d32021-04-17 11:36:35 +020016660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16661$as_echo "yes" >&6; }
16662else
16663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16664$as_echo "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016665
16666fi
Christian Heimes39258d32021-04-17 11:36:35 +020016667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016668
Christian Heimes39258d32021-04-17 11:36:35 +020016669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16670$as_echo_n "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16672/* end confdefs.h. */
16673#include <curses.h>
16674int
Christian Heimes39258d32021-04-17 11:36:35 +020016675main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016676{
16677
16678#ifndef filter
16679void *x=filter
16680#endif
16681
16682 ;
16683 return 0;
16684}
16685_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016686if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016687
Christian Heimes39258d32021-04-17 11:36:35 +020016688$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016689
Christian Heimes39258d32021-04-17 11:36:35 +020016690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16691$as_echo "yes" >&6; }
16692else
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16694$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016695
16696fi
Christian Heimes39258d32021-04-17 11:36:35 +020016697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016698
Christian Heimes39258d32021-04-17 11:36:35 +020016699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16700$as_echo_n "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16702/* end confdefs.h. */
16703#include <curses.h>
16704int
Christian Heimes39258d32021-04-17 11:36:35 +020016705main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016706{
16707
16708#ifndef has_key
16709void *x=has_key
16710#endif
16711
16712 ;
16713 return 0;
16714}
16715_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016716if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016717
Christian Heimes39258d32021-04-17 11:36:35 +020016718$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016719
Christian Heimes39258d32021-04-17 11:36:35 +020016720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16721$as_echo "yes" >&6; }
16722else
16723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16724$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016725
16726fi
Christian Heimes39258d32021-04-17 11:36:35 +020016727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016728
Christian Heimes39258d32021-04-17 11:36:35 +020016729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16730$as_echo_n "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16732/* end confdefs.h. */
16733#include <curses.h>
16734int
Christian Heimes39258d32021-04-17 11:36:35 +020016735main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016736{
16737
16738#ifndef typeahead
16739void *x=typeahead
16740#endif
16741
16742 ;
16743 return 0;
16744}
16745_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016746if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016747
Christian Heimes39258d32021-04-17 11:36:35 +020016748$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016749
Christian Heimes39258d32021-04-17 11:36:35 +020016750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16751$as_echo "yes" >&6; }
16752else
16753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16754$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016755
16756fi
Christian Heimes39258d32021-04-17 11:36:35 +020016757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016758
Christian Heimes39258d32021-04-17 11:36:35 +020016759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16760$as_echo_n "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16762/* end confdefs.h. */
16763#include <curses.h>
16764int
Christian Heimes39258d32021-04-17 11:36:35 +020016765main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016766{
16767
16768#ifndef use_env
16769void *x=use_env
16770#endif
16771
16772 ;
16773 return 0;
16774}
16775_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016776if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016777
Christian Heimes39258d32021-04-17 11:36:35 +020016778$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016779
Christian Heimes39258d32021-04-17 11:36:35 +020016780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16781$as_echo "yes" >&6; }
16782else
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16784$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016785
16786fi
Christian Heimes39258d32021-04-17 11:36:35 +020016787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016788# last curses configure check
16789CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790
Christian Heimes39258d32021-04-17 11:36:35 +020016791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16792$as_echo "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016793
16794if test "x$cross_compiling" = xyes; then
16795 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Christian Heimes39258d32021-04-17 11:36:35 +020016796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16797$as_echo_n "checking for /dev/ptmx... " >&6; }
16798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16799$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016800 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16801 fi
16802 if test "${ac_cv_file__dev_ptc+set}" != set; then
Christian Heimes39258d32021-04-17 11:36:35 +020016803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16804$as_echo_n "checking for /dev/ptc... " >&6; }
16805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16806$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016807 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16808 fi
16809fi
16810
Christian Heimes39258d32021-04-17 11:36:35 +020016811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16812$as_echo_n "checking for /dev/ptmx... " >&6; }
16813if ${ac_cv_file__dev_ptmx+:} false; then :
16814 $as_echo_n "(cached) " >&6
16815else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016816 test "$cross_compiling" = yes &&
16817 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16818if test -r "/dev/ptmx"; then
16819 ac_cv_file__dev_ptmx=yes
16820else
16821 ac_cv_file__dev_ptmx=no
16822fi
16823fi
Christian Heimes39258d32021-04-17 11:36:35 +020016824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16825$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16826if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016827
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016828fi
16829
16830if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016831
Christian Heimes39258d32021-04-17 11:36:35 +020016832$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016833
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016834fi
Christian Heimes39258d32021-04-17 11:36:35 +020016835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16836$as_echo_n "checking for /dev/ptc... " >&6; }
16837if ${ac_cv_file__dev_ptc+:} false; then :
16838 $as_echo_n "(cached) " >&6
16839else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016840 test "$cross_compiling" = yes &&
16841 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16842if test -r "/dev/ptc"; then
16843 ac_cv_file__dev_ptc=yes
16844else
16845 ac_cv_file__dev_ptc=no
16846fi
16847fi
Christian Heimes39258d32021-04-17 11:36:35 +020016848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16849$as_echo "$ac_cv_file__dev_ptc" >&6; }
16850if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016851
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016852fi
16853
16854if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016855
Christian Heimes39258d32021-04-17 11:36:35 +020016856$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016857
Neal Norwitz865400f2003-03-21 01:42:58 +000016858fi
16859
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016860if test $ac_sys_system = Darwin
16861then
16862 LIBS="$LIBS -framework CoreFoundation"
16863fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016864
Christian Heimes39258d32021-04-17 11:36:35 +020016865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16866$as_echo_n "checking for %zd printf() format support... " >&6; }
16867if ${ac_cv_have_size_t_format+:} false; then :
16868 $as_echo_n "(cached) " >&6
16869else
16870 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016871 ac_cv_have_size_t_format="cross -- assuming yes"
16872
Christian Heimes39258d32021-04-17 11:36:35 +020016873else
Matthias Kloseb9621712010-04-24 17:59:49 +000016874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016875/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016876
Thomas Wouters477c8d52006-05-27 19:21:47 +000016877#include <stdio.h>
16878#include <stddef.h>
16879#include <string.h>
16880
Christian Heimes2c181612007-12-17 20:04:13 +000016881#ifdef HAVE_SYS_TYPES_H
16882#include <sys/types.h>
16883#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016884
16885#ifdef HAVE_SSIZE_T
16886typedef ssize_t Py_ssize_t;
16887#elif SIZEOF_VOID_P == SIZEOF_LONG
16888typedef long Py_ssize_t;
16889#else
16890typedef int Py_ssize_t;
16891#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016892
Christian Heimes2c181612007-12-17 20:04:13 +000016893int main()
16894{
16895 char buffer[256];
16896
Thomas Wouters477c8d52006-05-27 19:21:47 +000016897 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16898 return 1;
16899
Thomas Wouters89f507f2006-12-13 04:49:30 +000016900 if (strcmp(buffer, "123"))
16901 return 1;
16902
16903 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16904 return 1;
16905
16906 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016907 return 1;
16908
16909 return 0;
16910}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016911
Thomas Wouters477c8d52006-05-27 19:21:47 +000016912_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016913if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016914 ac_cv_have_size_t_format=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016915else
Matthias Kloseb9621712010-04-24 17:59:49 +000016916 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016920fi
16921
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016922fi
Christian Heimes39258d32021-04-17 11:36:35 +020016923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16924$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016925if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016926
Christian Heimes39258d32021-04-17 11:36:35 +020016927$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016928
16929fi
16930
Matthias Kloseb9621712010-04-24 17:59:49 +000016931ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016932#ifdef HAVE_SYS_TYPES_H
16933#include <sys/types.h>
16934#endif
16935#ifdef HAVE_SYS_SOCKET_H
16936#include <sys/socket.h>
16937#endif
16938
Matthias Kloseb9621712010-04-24 17:59:49 +000016939"
Christian Heimes39258d32021-04-17 11:36:35 +020016940if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016941
Christian Heimes39258d32021-04-17 11:36:35 +020016942else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016943
Christian Heimes39258d32021-04-17 11:36:35 +020016944$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016945
16946fi
16947
Michael W. Hudson54241132001-12-07 15:38:26 +000016948
Christian Heimes39258d32021-04-17 11:36:35 +020016949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16950$as_echo_n "checking for broken mbstowcs... " >&6; }
16951if ${ac_cv_broken_mbstowcs+:} false; then :
16952 $as_echo_n "(cached) " >&6
16953else
16954 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016955 ac_cv_broken_mbstowcs=no
Christian Heimes39258d32021-04-17 11:36:35 +020016956else
Matthias Kloseb9621712010-04-24 17:59:49 +000016957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016958/* end confdefs.h. */
16959
Stefan Krah19c21392012-11-22 23:47:32 +010016960#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016961#include<stdlib.h>
16962int main() {
16963 size_t len = -1;
16964 const char *str = "text";
16965 len = mbstowcs(NULL, str, 0);
16966 return (len != 4);
16967}
16968
16969_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016970if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016971 ac_cv_broken_mbstowcs=no
Christian Heimes39258d32021-04-17 11:36:35 +020016972else
Matthias Kloseb9621712010-04-24 17:59:49 +000016973 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16976 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016977fi
16978
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016979fi
16980
Christian Heimes39258d32021-04-17 11:36:35 +020016981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16982$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016983if test "$ac_cv_broken_mbstowcs" = yes
16984then
16985
Christian Heimes39258d32021-04-17 11:36:35 +020016986$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016987
16988fi
16989
Antoine Pitroub52ec782009-01-25 16:34:23 +000016990# Check for --with-computed-gotos
Christian Heimes39258d32021-04-17 11:36:35 +020016991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16992$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016993
16994# Check whether --with-computed-gotos was given.
Christian Heimes39258d32021-04-17 11:36:35 +020016995if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016996 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016997if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016998then
16999
Christian Heimes39258d32021-04-17 11:36:35 +020017000$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000017001
Christian Heimes39258d32021-04-17 11:36:35 +020017002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17003$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000017004fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000017005if test "$withval" = no
17006then
17007
Christian Heimes39258d32021-04-17 11:36:35 +020017008$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000017009
Christian Heimes39258d32021-04-17 11:36:35 +020017010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17011$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000017012fi
17013
Christian Heimes39258d32021-04-17 11:36:35 +020017014else
17015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
17016$as_echo "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000017017fi
17018
Antoine Pitroub52ec782009-01-25 16:34:23 +000017019
Christian Heimes39258d32021-04-17 11:36:35 +020017020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
17021$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
17022if ${ac_cv_computed_gotos+:} false; then :
17023 $as_echo_n "(cached) " >&6
17024else
17025 if test "$cross_compiling" = yes; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010017026 if test "${with_computed_gotos+set}" = set; then
17027 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
17028 else
17029 ac_cv_computed_gotos=no
17030 fi
Christian Heimes39258d32021-04-17 11:36:35 +020017031else
Matthias Kloseb17289e2012-03-15 19:51:34 +010017032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17033/* end confdefs.h. */
17034
17035int main(int argc, char **argv)
17036{
17037 static void *targets[1] = { &&LABEL1 };
17038 goto LABEL2;
17039LABEL1:
17040 return 0;
17041LABEL2:
17042 goto *targets[0];
17043 return 1;
17044}
17045
17046_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017047if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010017048 ac_cv_computed_gotos=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017049else
Matthias Kloseb17289e2012-03-15 19:51:34 +010017050 ac_cv_computed_gotos=no
17051fi
17052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17053 conftest.$ac_objext conftest.beam conftest.$ac_ext
17054fi
17055
17056fi
17057
Christian Heimes39258d32021-04-17 11:36:35 +020017058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
17059$as_echo "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010017060case "$ac_cv_computed_gotos" in yes*)
17061
Christian Heimes39258d32021-04-17 11:36:35 +020017062$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010017063
17064esac
17065
Benjamin Petersond8d835b2010-10-15 23:14:46 +000017066case $ac_sys_system in
17067AIX*)
17068
Christian Heimes39258d32021-04-17 11:36:35 +020017069$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000017070 ;;
17071esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017072
Michael W. Hudson54241132001-12-07 15:38:26 +000017073
Mark Dickinsonb2153e92010-05-05 22:31:36 +000017074
17075
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017076for h in `(cd $srcdir;echo Python/thread_*.h)`
17077do
17078 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17079done
17080
Michael W. Hudson54241132001-12-07 15:38:26 +000017081
Ned Deily8d02f912020-06-25 10:46:44 -040017082SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Christian Heimes39258d32021-04-17 11:36:35 +020017083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
17084$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017085for dir in $SRCDIRS; do
17086 if test ! -d $dir; then
17087 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017088 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017089done
Christian Heimes39258d32021-04-17 11:36:35 +020017090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
17091$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000017092
Stefan Krah1919b7e2012-03-21 18:25:23 +010017093# Availability of -O2:
Christian Heimes39258d32021-04-17 11:36:35 +020017094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
17095$as_echo_n "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017096saved_cflags="$CFLAGS"
17097CFLAGS="-O2"
17098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17099/* end confdefs.h. */
17100
17101int
Christian Heimes39258d32021-04-17 11:36:35 +020017102main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010017103{
17104
17105
17106 ;
17107 return 0;
17108}
17109_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017110if ac_fn_c_try_compile "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017111 have_O2=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017112else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017113 have_O2=no
17114fi
Christian Heimes39258d32021-04-17 11:36:35 +020017115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
17117$as_echo "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017118CFLAGS="$saved_cflags"
17119
17120# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
17121# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Christian Heimes39258d32021-04-17 11:36:35 +020017122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
17123$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017124saved_cflags="$CFLAGS"
17125CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
17126if test "$have_O2" = no; then
17127 CFLAGS=""
17128fi
Christian Heimes39258d32021-04-17 11:36:35 +020017129if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017130 have_glibc_memmove_bug=undefined
Christian Heimes39258d32021-04-17 11:36:35 +020017131else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17133/* end confdefs.h. */
17134
17135#include <stdio.h>
17136#include <stdlib.h>
17137#include <string.h>
17138void foo(void *p, void *q) { memmove(p, q, 19); }
17139int main() {
17140 char a[32] = "123456789000000000";
17141 foo(&a[9], a);
17142 if (strcmp(a, "123456789123456789000000000") != 0)
17143 return 1;
17144 foo(a, &a[9]);
17145 if (strcmp(a, "123456789000000000") != 0)
17146 return 1;
17147 return 0;
17148}
17149
17150_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017151if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017152 have_glibc_memmove_bug=no
Christian Heimes39258d32021-04-17 11:36:35 +020017153else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017154 have_glibc_memmove_bug=yes
17155fi
17156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17157 conftest.$ac_objext conftest.beam conftest.$ac_ext
17158fi
17159
17160CFLAGS="$saved_cflags"
Christian Heimes39258d32021-04-17 11:36:35 +020017161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17162$as_echo "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017163if test "$have_glibc_memmove_bug" = yes; then
17164
Christian Heimes39258d32021-04-17 11:36:35 +020017165$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017166
17167fi
17168
17169if test "$have_gcc_asm_for_x87" = yes; then
17170 # Some versions of gcc miscompile inline asm:
17171 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17172 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17173 case $CC in
17174 *gcc*)
Christian Heimes39258d32021-04-17 11:36:35 +020017175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17176$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017177 saved_cflags="$CFLAGS"
17178 CFLAGS="-O2"
Christian Heimes39258d32021-04-17 11:36:35 +020017179 if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017180 have_ipa_pure_const_bug=undefined
Christian Heimes39258d32021-04-17 11:36:35 +020017181else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17183/* end confdefs.h. */
17184
17185 __attribute__((noinline)) int
17186 foo(int *p) {
17187 int r;
17188 asm ( "movl \$6, (%1)\n\t"
17189 "xorl %0, %0\n\t"
17190 : "=r" (r) : "r" (p) : "memory"
17191 );
17192 return r;
17193 }
17194 int main() {
17195 int p = 8;
17196 if ((foo(&p) ? : p) != 6)
17197 return 1;
17198 return 0;
17199 }
17200
17201_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017202if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017203 have_ipa_pure_const_bug=no
Christian Heimes39258d32021-04-17 11:36:35 +020017204else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017205 have_ipa_pure_const_bug=yes
17206fi
17207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17208 conftest.$ac_objext conftest.beam conftest.$ac_ext
17209fi
17210
17211 CFLAGS="$saved_cflags"
Christian Heimes39258d32021-04-17 11:36:35 +020017212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17213$as_echo "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017214 if test "$have_ipa_pure_const_bug" = yes; then
17215
Christian Heimes39258d32021-04-17 11:36:35 +020017216$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017217
17218 fi
17219 ;;
17220 esac
17221fi
17222
Victor Stinner4f5366e2015-01-09 02:13:19 +010017223# Check for stdatomic.h
Christian Heimes39258d32021-04-17 11:36:35 +020017224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17225$as_echo_n "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227/* end confdefs.h. */
17228
17229
17230 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017231 atomic_int int_var;
17232 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017233 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017234 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17235 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17236 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017237 return 0;
17238 }
17239
17240
17241_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017242if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017243 have_stdatomic_h=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017244else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017245 have_stdatomic_h=no
17246fi
Christian Heimes39258d32021-04-17 11:36:35 +020017247rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017248 conftest$ac_exeext conftest.$ac_ext
17249
Christian Heimes39258d32021-04-17 11:36:35 +020017250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17251$as_echo "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017252
17253if test "$have_stdatomic_h" = yes; then
17254
Christian Heimes39258d32021-04-17 11:36:35 +020017255$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017256
17257fi
17258
Victor Stinner52a327c2020-12-23 03:41:08 +010017259# Check for GCC >= 4.7 and clang __atomic builtin functions
Christian Heimes39258d32021-04-17 11:36:35 +020017260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17261$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17263/* end confdefs.h. */
17264
17265
Victor Stinner52a327c2020-12-23 03:41:08 +010017266 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017267 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017268 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17269 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017270 return 0;
17271 }
17272
17273
17274_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017275if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017276 have_builtin_atomic=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017277else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017278 have_builtin_atomic=no
17279fi
Christian Heimes39258d32021-04-17 11:36:35 +020017280rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017281 conftest$ac_exeext conftest.$ac_ext
17282
Christian Heimes39258d32021-04-17 11:36:35 +020017283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17284$as_echo "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017285
17286if test "$have_builtin_atomic" = yes; then
17287
Christian Heimes39258d32021-04-17 11:36:35 +020017288$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017289
17290fi
17291
Ned Deily322f5ba2013-11-21 23:01:59 -080017292# ensurepip option
Christian Heimes39258d32021-04-17 11:36:35 +020017293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17294$as_echo_n "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017295
17296# Check whether --with-ensurepip was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017297if test "${with_ensurepip+set}" = set; then :
Ned Deily322f5ba2013-11-21 23:01:59 -080017298 withval=$with_ensurepip;
Christian Heimes39258d32021-04-17 11:36:35 +020017299else
Ned Deily322f5ba2013-11-21 23:01:59 -080017300 with_ensurepip=upgrade
17301fi
17302
17303case $with_ensurepip in #(
17304 yes|upgrade) :
17305 ENSUREPIP=upgrade ;; #(
17306 install) :
17307 ENSUREPIP=install ;; #(
17308 no) :
17309 ENSUREPIP=no ;; #(
17310 *) :
17311 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17312esac
Christian Heimes39258d32021-04-17 11:36:35 +020017313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17314$as_echo "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017315
17316
Victor Stinner35a97c02015-03-08 02:59:09 +010017317# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Christian Heimes39258d32021-04-17 11:36:35 +020017318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17319$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17321/* end confdefs.h. */
17322
17323
17324 #include <dirent.h>
17325
17326 int main() {
17327 struct dirent entry;
17328 return entry.d_type == DT_UNKNOWN;
17329 }
17330
17331
17332_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017333if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner35a97c02015-03-08 02:59:09 +010017334 have_dirent_d_type=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017335else
Victor Stinner35a97c02015-03-08 02:59:09 +010017336 have_dirent_d_type=no
17337fi
Christian Heimes39258d32021-04-17 11:36:35 +020017338rm -f core conftest.err conftest.$ac_objext \
Victor Stinner35a97c02015-03-08 02:59:09 +010017339 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17341$as_echo "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017342
17343if test "$have_dirent_d_type" = yes; then
17344
Christian Heimes39258d32021-04-17 11:36:35 +020017345$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010017346
17347fi
17348
Victor Stinner9eb57c52015-03-19 22:21:49 +010017349# check if the Linux getrandom() syscall is available
Christian Heimes39258d32021-04-17 11:36:35 +020017350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17351$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17353/* end confdefs.h. */
17354
17355
Victor Stinner1b80b242016-04-12 22:34:58 +020017356 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017357 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017358 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017359
17360 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017361 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017362 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017363 const int flags = GRND_NONBLOCK;
17364 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017365 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017366 return 0;
17367 }
17368
17369
17370_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017371if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010017372 have_getrandom_syscall=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017373else
Victor Stinner9eb57c52015-03-19 22:21:49 +010017374 have_getrandom_syscall=no
17375fi
Christian Heimes39258d32021-04-17 11:36:35 +020017376rm -f core conftest.err conftest.$ac_objext \
Victor Stinner9eb57c52015-03-19 22:21:49 +010017377 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17379$as_echo "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017380
17381if test "$have_getrandom_syscall" = yes; then
17382
Christian Heimes39258d32021-04-17 11:36:35 +020017383$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010017384
17385fi
17386
Victor Stinner3abf44e2015-09-18 15:38:37 +020017387# check if the getrandom() function is available
17388# the test was written for the Solaris function of <sys/random.h>
Christian Heimes39258d32021-04-17 11:36:35 +020017389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17390$as_echo_n "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17392/* end confdefs.h. */
17393
17394
17395 #include <sys/random.h>
17396
17397 int main() {
17398 char buffer[1];
17399 const size_t buflen = sizeof(buffer);
17400 const int flags = 0;
17401 /* ignore the result, Python checks for ENOSYS at runtime */
17402 (void)getrandom(buffer, buflen, flags);
17403 return 0;
17404 }
17405
17406
17407_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017408if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020017409 have_getrandom=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017410else
Victor Stinner3abf44e2015-09-18 15:38:37 +020017411 have_getrandom=no
17412fi
Christian Heimes39258d32021-04-17 11:36:35 +020017413rm -f core conftest.err conftest.$ac_objext \
Victor Stinner3abf44e2015-09-18 15:38:37 +020017414 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17416$as_echo "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017417
17418if test "$have_getrandom" = yes; then
17419
Christian Heimes39258d32021-04-17 11:36:35 +020017420$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020017421
17422fi
17423
Neil Schemenauer5741c452019-02-08 10:48:46 -080017424# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17425# shm_* may only be available if linking against librt
17426save_LIBS="$LIBS"
17427save_includes_default="$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020017428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17429$as_echo_n "checking for library containing shm_open... " >&6; }
17430if ${ac_cv_search_shm_open+:} false; then :
17431 $as_echo_n "(cached) " >&6
17432else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017433 ac_func_search_save_LIBS=$LIBS
17434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17435/* end confdefs.h. */
17436
17437/* Override any GCC internal prototype to avoid an error.
17438 Use char because int might match the return type of a GCC
17439 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020017440#ifdef __cplusplus
17441extern "C"
17442#endif
Neil Schemenauer5741c452019-02-08 10:48:46 -080017443char shm_open ();
17444int
Christian Heimes39258d32021-04-17 11:36:35 +020017445main ()
Neil Schemenauer5741c452019-02-08 10:48:46 -080017446{
17447return shm_open ();
17448 ;
17449 return 0;
17450}
17451_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017452for ac_lib in '' rt; do
Neil Schemenauer5741c452019-02-08 10:48:46 -080017453 if test -z "$ac_lib"; then
17454 ac_res="none required"
17455 else
17456 ac_res=-l$ac_lib
17457 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17458 fi
Christian Heimes39258d32021-04-17 11:36:35 +020017459 if ac_fn_c_try_link "$LINENO"; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017460 ac_cv_search_shm_open=$ac_res
17461fi
Christian Heimes39258d32021-04-17 11:36:35 +020017462rm -f core conftest.err conftest.$ac_objext \
Neil Schemenauer5741c452019-02-08 10:48:46 -080017463 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020017464 if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017465 break
17466fi
17467done
Christian Heimes39258d32021-04-17 11:36:35 +020017468if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017469
Christian Heimes39258d32021-04-17 11:36:35 +020017470else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017471 ac_cv_search_shm_open=no
17472fi
17473rm conftest.$ac_ext
17474LIBS=$ac_func_search_save_LIBS
17475fi
Christian Heimes39258d32021-04-17 11:36:35 +020017476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17477$as_echo "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080017478ac_res=$ac_cv_search_shm_open
Christian Heimes39258d32021-04-17 11:36:35 +020017479if test "$ac_res" != no; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017480 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17481
17482fi
17483
17484if test "$ac_cv_search_shm_open" = "-lrt"; then
17485
Christian Heimes39258d32021-04-17 11:36:35 +020017486$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080017487
17488fi
Christian Heimes39258d32021-04-17 11:36:35 +020017489for ac_header in sys/mman.h
17490do :
17491 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17492if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17493 cat >>confdefs.h <<_ACEOF
17494#define HAVE_SYS_MMAN_H 1
17495_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017496
17497fi
17498
Christian Heimes39258d32021-04-17 11:36:35 +020017499done
17500
Neil Schemenauer5741c452019-02-08 10:48:46 -080017501# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17502ac_includes_default="\
17503${ac_includes_default}
17504#ifndef __cplusplus
17505# ifdef HAVE_SYS_MMAN_H
17506# include <sys/mman.h>
17507# endif
17508#endif
17509"
Christian Heimes39258d32021-04-17 11:36:35 +020017510for ac_func in shm_open shm_unlink
17511do :
17512 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17513ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17514if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17515 cat >>confdefs.h <<_ACEOF
17516#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17517_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017518
17519fi
Christian Heimes39258d32021-04-17 11:36:35 +020017520done
Neil Schemenauer5741c452019-02-08 10:48:46 -080017521
17522# we don't want to link with librt always, restore LIBS
17523LIBS="$save_LIBS"
17524ac_includes_default="$save_includes_default"
17525
Christian Heimesff5be6e2018-01-20 13:19:21 +010017526# Check for usable OpenSSL
17527
17528 found=false
17529
17530# Check whether --with-openssl was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017531if test "${with_openssl+set}" = set; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017532 withval=$with_openssl;
17533 case "$withval" in
17534 "" | y | ye | yes | n | no)
17535 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17536 ;;
17537 *) ssldirs="$withval"
17538 ;;
17539 esac
17540
Christian Heimes39258d32021-04-17 11:36:35 +020017541else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017542
17543 # if pkg-config is installed and openssl has installed a .pc file,
17544 # then use that information and don't search ssldirs
17545 if test -n "$ac_tool_prefix"; then
17546 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17547set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020017548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17549$as_echo_n "checking for $ac_word... " >&6; }
17550if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17551 $as_echo_n "(cached) " >&6
17552else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017553 if test -n "$PKG_CONFIG"; then
17554 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17555else
17556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17557for as_dir in $PATH
17558do
17559 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020017560 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017561 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020017562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017563 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Christian Heimes39258d32021-04-17 11:36:35 +020017564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017565 break 2
17566 fi
17567done
17568 done
17569IFS=$as_save_IFS
17570
17571fi
17572fi
17573PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17574if test -n "$PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17576$as_echo "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017577else
Christian Heimes39258d32021-04-17 11:36:35 +020017578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17579$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017580fi
17581
17582
17583fi
17584if test -z "$ac_cv_prog_PKG_CONFIG"; then
17585 ac_ct_PKG_CONFIG=$PKG_CONFIG
17586 # Extract the first word of "pkg-config", so it can be a program name with args.
17587set dummy pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020017588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17589$as_echo_n "checking for $ac_word... " >&6; }
17590if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17591 $as_echo_n "(cached) " >&6
17592else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017593 if test -n "$ac_ct_PKG_CONFIG"; then
17594 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17595else
17596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17597for as_dir in $PATH
17598do
17599 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020017600 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017601 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020017602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017603 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Christian Heimes39258d32021-04-17 11:36:35 +020017604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017605 break 2
17606 fi
17607done
17608 done
17609IFS=$as_save_IFS
17610
17611fi
17612fi
17613ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17614if test -n "$ac_ct_PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17616$as_echo "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017617else
Christian Heimes39258d32021-04-17 11:36:35 +020017618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17619$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017620fi
17621
17622 if test "x$ac_ct_PKG_CONFIG" = x; then
17623 PKG_CONFIG=""
17624 else
17625 case $cross_compiling:$ac_tool_warned in
17626yes:)
Christian Heimes39258d32021-04-17 11:36:35 +020017627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010017629ac_tool_warned=yes ;;
17630esac
17631 PKG_CONFIG=$ac_ct_PKG_CONFIG
17632 fi
17633else
17634 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17635fi
17636
17637 if test x"$PKG_CONFIG" != x""; then
17638 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17639 if test $? = 0; then
17640 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17641 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17642 found=true
17643 fi
17644 fi
17645
17646 # no such luck; use some default ssldirs
17647 if ! $found; then
17648 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17649 fi
17650
17651
17652fi
17653
17654
17655
17656 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17657 # an 'openssl' subdirectory
17658
17659 if ! $found; then
17660 OPENSSL_INCLUDES=
17661 for ssldir in $ssldirs; do
Christian Heimes39258d32021-04-17 11:36:35 +020017662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17663$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017664 if test -f "$ssldir/include/openssl/ssl.h"; then
17665 OPENSSL_INCLUDES="-I$ssldir/include"
17666 OPENSSL_LDFLAGS="-L$ssldir/lib"
17667 OPENSSL_LIBS="-lssl -lcrypto"
17668 found=true
Christian Heimes39258d32021-04-17 11:36:35 +020017669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17670$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017671 break
17672 else
Christian Heimes39258d32021-04-17 11:36:35 +020017673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17674$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017675 fi
17676 done
17677
17678 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17679 # it will just work!
17680 fi
17681
17682 # try the preprocessor and linker with our new flags,
17683 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17684
Christian Heimes39258d32021-04-17 11:36:35 +020017685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17686$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017687 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17688 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17689
17690 save_LIBS="$LIBS"
17691 save_LDFLAGS="$LDFLAGS"
17692 save_CPPFLAGS="$CPPFLAGS"
17693 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17694 LIBS="$OPENSSL_LIBS $LIBS"
17695 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17697/* end confdefs.h. */
17698#include <openssl/ssl.h>
17699int
Christian Heimes39258d32021-04-17 11:36:35 +020017700main ()
Christian Heimesff5be6e2018-01-20 13:19:21 +010017701{
17702SSL_new(NULL)
17703 ;
17704 return 0;
17705}
17706_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017707if ac_fn_c_try_link "$LINENO"; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017708
Christian Heimes39258d32021-04-17 11:36:35 +020017709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17710$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017711 have_openssl=yes
17712
Christian Heimes39258d32021-04-17 11:36:35 +020017713else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017714
Christian Heimes39258d32021-04-17 11:36:35 +020017715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17716$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017717 have_openssl=no
17718
17719fi
Christian Heimes39258d32021-04-17 11:36:35 +020017720rm -f core conftest.err conftest.$ac_objext \
Christian Heimesff5be6e2018-01-20 13:19:21 +010017721 conftest$ac_exeext conftest.$ac_ext
17722 CPPFLAGS="$save_CPPFLAGS"
17723 LDFLAGS="$save_LDFLAGS"
17724 LIBS="$save_LIBS"
17725
17726
17727
17728
17729
17730
Christian Heimes32eba612021-03-19 10:29:25 +010017731# rpath to libssl and libcrypto
Christian Heimes39258d32021-04-17 11:36:35 +020017732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
17733$as_echo_n "checking for --with-openssl-rpath... " >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010017734
17735# Check whether --with-openssl-rpath was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017736if test "${with_openssl_rpath+set}" = set; then :
Christian Heimes32eba612021-03-19 10:29:25 +010017737 withval=$with_openssl_rpath;
Christian Heimes39258d32021-04-17 11:36:35 +020017738else
Christian Heimes32eba612021-03-19 10:29:25 +010017739 with_openssl_rpath=no
17740
17741fi
17742
17743case $with_openssl_rpath in #(
17744 auto|yes) :
17745 OPENSSL_RPATH=auto ;; #(
17746 no) :
17747 OPENSSL_RPATH= ;; #(
17748 *) :
Christian Heimes39258d32021-04-17 11:36:35 +020017749 if test -d "$with_openssl_rpath"; then :
Christian Heimes32eba612021-03-19 10:29:25 +010017750 OPENSSL_RPATH="$with_openssl_rpath"
Christian Heimes39258d32021-04-17 11:36:35 +020017751else
Christian Heimes32eba612021-03-19 10:29:25 +010017752 as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
17753fi
17754
17755 ;;
17756esac
Christian Heimes39258d32021-04-17 11:36:35 +020017757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5
17758$as_echo "$OPENSSL_RPATH" >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010017759
17760
Christian Heimes892d66e2018-01-29 14:10:18 +010017761# ssl module default cipher suite string
17762
17763
17764
Christian Heimes39258d32021-04-17 11:36:35 +020017765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17766$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017767
17768# Check whether --with-ssl-default-suites was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017769if test "${with_ssl_default_suites+set}" = set; then :
Christian Heimes892d66e2018-01-29 14:10:18 +010017770 withval=$with_ssl_default_suites;
Christian Heimes39258d32021-04-17 11:36:35 +020017771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17772$as_echo "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017773case "$withval" in
17774 python)
Christian Heimes39258d32021-04-17 11:36:35 +020017775 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017776
17777 ;;
17778 openssl)
Christian Heimes39258d32021-04-17 11:36:35 +020017779 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017780
17781 ;;
17782 *)
Christian Heimes39258d32021-04-17 11:36:35 +020017783 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017784
Christian Heimes39258d32021-04-17 11:36:35 +020017785 cat >>confdefs.h <<_ACEOF
17786#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17787_ACEOF
Christian Heimes892d66e2018-01-29 14:10:18 +010017788
17789 ;;
17790esac
17791
Christian Heimes39258d32021-04-17 11:36:35 +020017792else
Christian Heimes892d66e2018-01-29 14:10:18 +010017793
Christian Heimes39258d32021-04-17 11:36:35 +020017794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17795$as_echo "python" >&6; }
17796$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017797
17798
17799fi
17800
17801
Christian Heimes9b60e552020-05-15 23:54:53 +020017802# builtin hash modules
17803default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17804
Christian Heimes39258d32021-04-17 11:36:35 +020017805$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020017806
Christian Heimes39258d32021-04-17 11:36:35 +020017807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17808$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020017809
17810# Check whether --with-builtin-hashlib-hashes was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017811if test "${with_builtin_hashlib_hashes+set}" = set; then :
Christian Heimes9b60e552020-05-15 23:54:53 +020017812 withval=$with_builtin_hashlib_hashes;
17813case "$withval" in
17814 yes)
17815 withval=$default_hashlib_hashes
17816 ;;
17817 no)
17818 withval=""
17819 ;;
17820esac
Christian Heimes39258d32021-04-17 11:36:35 +020017821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17822$as_echo "$withval" >&6; }
17823cat >>confdefs.h <<_ACEOF
17824#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17825_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017826
17827
Christian Heimes39258d32021-04-17 11:36:35 +020017828else
Christian Heimes9b60e552020-05-15 23:54:53 +020017829
Christian Heimes39258d32021-04-17 11:36:35 +020017830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17831$as_echo "$default_hashlib_hashes" >&6; };
17832cat >>confdefs.h <<_ACEOF
17833#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17834_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017835
17836
17837fi
17838
17839
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017840# --with-experimental-isolated-subinterpreters
17841
Christian Heimes39258d32021-04-17 11:36:35 +020017842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17843$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017844
17845# Check whether --with-experimental-isolated-subinterpreters was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017846if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017847 withval=$with_experimental_isolated_subinterpreters;
17848if test "$withval" != no
17849then
Christian Heimes39258d32021-04-17 11:36:35 +020017850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17851$as_echo "yes" >&6; };
17852 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017853
17854else
Christian Heimes39258d32021-04-17 11:36:35 +020017855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17856$as_echo "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017857fi
Christian Heimes39258d32021-04-17 11:36:35 +020017858else
17859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17860$as_echo "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017861fi
17862
17863
Victor Stinner801bb0b2021-02-17 11:14:42 +010017864# --with-static-libpython
17865STATIC_LIBPYTHON=1
Christian Heimes39258d32021-04-17 11:36:35 +020017866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
17867$as_echo_n "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017868
17869# Check whether --with-static-libpython was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017870if test "${with_static_libpython+set}" = set; then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010017871 withval=$with_static_libpython;
17872if test "$withval" = no
17873then
Christian Heimes39258d32021-04-17 11:36:35 +020017874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17875$as_echo "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017876 STATIC_LIBPYTHON=0
17877else
Christian Heimes39258d32021-04-17 11:36:35 +020017878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17879$as_echo "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017880fi
Christian Heimes39258d32021-04-17 11:36:35 +020017881else
17882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17883$as_echo "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017884fi
17885
17886LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050017887if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010017888 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
17889 if test "$STATIC_LIBPYTHON" = 1; then
17890 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17891 fi
17892else
17893 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17894fi
17895
17896
17897
pxinwr277ce302020-12-30 20:50:39 +080017898# Check whether to disable test modules. Once set, setup.py will not build
17899# test extension modules and "make install" will not install test suites.
Christian Heimes39258d32021-04-17 11:36:35 +020017900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17901$as_echo_n "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017902# Check whether --enable-test-modules was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017903if test "${enable_test_modules+set}" = set; then :
pxinwr277ce302020-12-30 20:50:39 +080017904 enableval=$enable_test_modules;
17905fi
17906
17907if test "$enable_test_modules" = no; then
17908 TEST_MODULES=no
Christian Heimes39258d32021-04-17 11:36:35 +020017909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17910$as_echo "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017911else
17912 TEST_MODULES=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17914$as_echo "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017915fi
17916
17917
Christian Heimes892d66e2018-01-29 14:10:18 +010017918
Guido van Rossum627b2d71993-12-24 10:39:16 +000017919# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017920ac_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 +000017921
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017922ac_config_files="$ac_config_files Modules/ld_so_aix"
17923
Martin v. Löwis11437992002-04-12 09:54:03 +000017924cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017925# This file is a shell script that caches the results of configure
17926# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017927# scripts and configure runs, see configure's option --config-cache.
17928# It is not useful on other systems. If it contains results you don't
17929# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017930#
Martin v. Löwis11437992002-04-12 09:54:03 +000017931# config.status only pays attention to the cache file if you give it
17932# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017933#
Skip Montanaro6dead952003-09-25 14:50:04 +000017934# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017935# loading this file, other *unset* `ac_cv_foo' will be assigned the
17936# following values.
17937
17938_ACEOF
17939
Guido van Rossumf78abae1997-01-21 22:02:36 +000017940# The following way of writing the cache mishandles newlines in values,
17941# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017943# Ultrix sh set writes to stderr and can't be redirected directly,
17944# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945(
17946 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17947 eval ac_val=\$$ac_var
17948 case $ac_val in #(
17949 *${as_nl}*)
17950 case $ac_var in #(
Christian Heimes39258d32021-04-17 11:36:35 +020017951 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17952$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017953 esac
17954 case $ac_var in #(
17955 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017956 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17957 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 esac ;;
17959 esac
17960 done
17961
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17964 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017965 # `set' does not quote correctly, so add quotes: double-quote
17966 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017967 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017968 "s/'/'\\\\''/g;
17969 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 *)
17972 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975 esac |
17976 sort
17977) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017978 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017980 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981 :clear
Christian Heimes39258d32021-04-17 11:36:35 +020017982 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17985 :end' >>confcache
17986if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17987 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017988 if test "x$cache_file" != "x/dev/null"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017989 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17990$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017991 if test ! -f "$cache_file" || test -h "$cache_file"; then
17992 cat confcache >"$cache_file"
17993 else
17994 case $cache_file in #(
17995 */* | ?:*)
17996 mv -f confcache "$cache_file"$$ &&
17997 mv -f "$cache_file"$$ "$cache_file" ;; #(
17998 *)
17999 mv -f confcache "$cache_file" ;;
18000 esac
18001 fi
18002 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018003 else
Christian Heimes39258d32021-04-17 11:36:35 +020018004 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18005$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018006 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018007fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018008rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018009
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018010test "x$prefix" = xNONE && prefix=$ac_default_prefix
18011# Let make expand exec_prefix.
18012test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018013
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018014DEFS=-DHAVE_CONFIG_H
18015
Skip Montanaro6dead952003-09-25 14:50:04 +000018016ac_libobjs=
18017ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018018U=
Skip Montanaro6dead952003-09-25 14:50:04 +000018019for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18020 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Christian Heimes39258d32021-04-17 11:36:35 +020018022 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18024 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000018025 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18026 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000018027done
18028LIBOBJS=$ac_libobjs
18029
18030LTLIBOBJS=$ac_ltlibobjs
18031
18032
Martin v. Löwis11437992002-04-12 09:54:03 +000018033
Matthias Kloseb9621712010-04-24 17:59:49 +000018034
Victor Stinnere0be4232011-10-25 13:06:09 +020018035: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000018036ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000018037ac_clean_files_save=$ac_clean_files
18038ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Christian Heimes39258d32021-04-17 11:36:35 +020018039{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18040$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000018041as_write_fail=0
18042cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018043#! $SHELL
18044# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018045# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018046# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018047# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018048
Martin v. Löwis11437992002-04-12 09:54:03 +000018049debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018050ac_cs_recheck=false
18051ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000018052
Matthias Kloseb9621712010-04-24 17:59:49 +000018053SHELL=\${CONFIG_SHELL-$SHELL}
18054export SHELL
18055_ASEOF
18056cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18057## -------------------- ##
18058## M4sh Initialization. ##
18059## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061# Be more Bourne compatible
18062DUALCASE=1; export DUALCASE # for MKS sh
Christian Heimes39258d32021-04-17 11:36:35 +020018063if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000018064 emulate sh
18065 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000018066 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000018067 # is contrary to our usage. Disable this feature.
18068 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 setopt NO_GLOB_SUBST
Christian Heimes39258d32021-04-17 11:36:35 +020018070else
Matthias Kloseb9621712010-04-24 17:59:49 +000018071 case `(set -o) 2>/dev/null` in #(
18072 *posix*) :
18073 set -o posix ;; #(
18074 *) :
18075 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076esac
Michael W. Hudson54241132001-12-07 15:38:26 +000018077fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000018078
18079
Matthias Kloseb9621712010-04-24 17:59:49 +000018080as_nl='
18081'
18082export as_nl
Christian Heimes39258d32021-04-17 11:36:35 +020018083# Printing a long string crashes Solaris 7 /usr/bin/printf.
18084as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18085as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18086as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18087# Prefer a ksh shell builtin over an external printf program on Solaris,
18088# but without wasting forks for bash or zsh.
18089if test -z "$BASH_VERSION$ZSH_VERSION" \
18090 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18091 as_echo='print -r --'
18092 as_echo_n='print -rn --'
18093elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18094 as_echo='printf %s\n'
18095 as_echo_n='printf %s'
18096else
18097 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18098 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18099 as_echo_n='/usr/ucb/echo -n'
18100 else
18101 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18102 as_echo_n_body='eval
18103 arg=$1;
18104 case $arg in #(
18105 *"$as_nl"*)
18106 expr "X$arg" : "X\\(.*\\)$as_nl";
18107 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18108 esac;
18109 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18110 '
18111 export as_echo_n_body
18112 as_echo_n='sh -c $as_echo_n_body as_echo'
18113 fi
18114 export as_echo_body
18115 as_echo='sh -c $as_echo_body as_echo'
18116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018117
18118# The user is always right.
Christian Heimes39258d32021-04-17 11:36:35 +020018119if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018120 PATH_SEPARATOR=:
18121 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18122 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18123 PATH_SEPARATOR=';'
18124 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127
Christian Heimes39258d32021-04-17 11:36:35 +020018128# IFS
18129# We need space, tab and new line, in precisely that order. Quoting is
18130# there to prevent editors from complaining about space-tab.
18131# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18132# splitting by setting IFS to empty value.)
18133IFS=" "" $as_nl"
18134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020018136as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000018137case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138 *[\\/]* ) as_myself=$0 ;;
18139 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018140for as_dir in $PATH
18141do
18142 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020018143 test -z "$as_dir" && as_dir=.
18144 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000018145 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148 ;;
18149esac
18150# We did not find ourselves, most probably we were run as `sh COMMAND'
18151# in which case we are not to be found in the path.
18152if test "x$as_myself" = x; then
18153 as_myself=$0
18154fi
18155if test ! -f "$as_myself"; then
Christian Heimes39258d32021-04-17 11:36:35 +020018156 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018157 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158fi
18159
Christian Heimes39258d32021-04-17 11:36:35 +020018160# Unset variables that we do not need and which cause bugs (e.g. in
18161# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18162# suppresses any "Segmentation fault" message there. '((' could
18163# trigger a bug in pdksh 5.2.14.
18164for as_var in BASH_ENV ENV MAIL MAILPATH
18165do eval test x\${$as_var+set} = xset \
18166 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18167done
18168PS1='$ '
18169PS2='> '
18170PS4='+ '
18171
18172# NLS nuisances.
18173LC_ALL=C
18174export LC_ALL
18175LANGUAGE=C
18176export LANGUAGE
18177
18178# CDPATH.
18179(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Matthias Kloseb9621712010-04-24 17:59:49 +000018180
18181
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018182# as_fn_error STATUS ERROR [LINENO LOG_FD]
18183# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018184# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18185# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018186# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018187as_fn_error ()
18188{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018189 as_status=$1; test $as_status -eq 0 && as_status=1
18190 if test "$4"; then
18191 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +020018192 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018193 fi
Christian Heimes39258d32021-04-17 11:36:35 +020018194 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018195 as_fn_exit $as_status
18196} # as_fn_error
18197
18198
18199# as_fn_set_status STATUS
18200# -----------------------
18201# Set $? to STATUS, without forking.
18202as_fn_set_status ()
18203{
18204 return $1
18205} # as_fn_set_status
18206
18207# as_fn_exit STATUS
18208# -----------------
18209# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18210as_fn_exit ()
18211{
18212 set +e
18213 as_fn_set_status $1
18214 exit $1
18215} # as_fn_exit
18216
18217# as_fn_unset VAR
18218# ---------------
18219# Portably unset VAR.
18220as_fn_unset ()
18221{
18222 { eval $1=; unset $1;}
18223}
18224as_unset=as_fn_unset
18225# as_fn_append VAR VALUE
18226# ----------------------
18227# Append the text in VALUE to the end of the definition contained in VAR. Take
18228# advantage of any shell optimizations that allow amortized linear growth over
18229# repeated appends, instead of the typical quadratic growth present in naive
18230# implementations.
Christian Heimes39258d32021-04-17 11:36:35 +020018231if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018232 eval 'as_fn_append ()
18233 {
18234 eval $1+=\$2
18235 }'
Christian Heimes39258d32021-04-17 11:36:35 +020018236else
Matthias Kloseb9621712010-04-24 17:59:49 +000018237 as_fn_append ()
18238 {
18239 eval $1=\$$1\$2
18240 }
18241fi # as_fn_append
18242
18243# as_fn_arith ARG...
18244# ------------------
18245# Perform arithmetic evaluation on the ARGs, and store the result in the
18246# global $as_val. Take advantage of shells that can avoid forks. The arguments
18247# must be portable across $(()) and expr.
Christian Heimes39258d32021-04-17 11:36:35 +020018248if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018249 eval 'as_fn_arith ()
18250 {
18251 as_val=$(( $* ))
18252 }'
Christian Heimes39258d32021-04-17 11:36:35 +020018253else
Matthias Kloseb9621712010-04-24 17:59:49 +000018254 as_fn_arith ()
18255 {
18256 as_val=`expr "$@" || test $? -eq 1`
18257 }
18258fi # as_fn_arith
18259
18260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261if expr a : '\(a\)' >/dev/null 2>&1 &&
18262 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18263 as_expr=expr
18264else
18265 as_expr=false
18266fi
18267
18268if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18269 as_basename=basename
18270else
18271 as_basename=false
18272fi
18273
Matthias Kloseb9621712010-04-24 17:59:49 +000018274if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18275 as_dirname=dirname
18276else
18277 as_dirname=false
18278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280as_me=`$as_basename -- "$0" ||
18281$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18282 X"$0" : 'X\(//\)$' \| \
18283 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020018284$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018285 sed '/^.*\/\([^/][^/]*\)\/*$/{
18286 s//\1/
18287 q
18288 }
18289 /^X\/\(\/\/\)$/{
18290 s//\1/
18291 q
18292 }
18293 /^X\/\(\/\).*/{
18294 s//\1/
18295 q
18296 }
18297 s/.*/./; q'`
18298
Matthias Kloseb9621712010-04-24 17:59:49 +000018299# Avoid depending upon Character Ranges.
18300as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18301as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18302as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18303as_cr_digits='0123456789'
18304as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305
18306ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018307case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018308-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018309 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018310 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018311 xy) ECHO_C='\c';;
18312 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18313 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018314 esac;;
18315*)
18316 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018317esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018318
Martin v. Löwis11437992002-04-12 09:54:03 +000018319rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018320if test -d conf$$.dir; then
18321 rm -f conf$$.dir/conf$$.file
18322else
18323 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018324 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018326if (echo >conf$$.file) 2>/dev/null; then
18327 if ln -s conf$$.file conf$$ 2>/dev/null; then
18328 as_ln_s='ln -s'
18329 # ... but there are two gotchas:
18330 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18331 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018332 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018333 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018334 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018335 elif ln conf$$.file conf$$ 2>/dev/null; then
18336 as_ln_s=ln
18337 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018338 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018339 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018340else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018341 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18344rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018345
Matthias Kloseb9621712010-04-24 17:59:49 +000018346
18347# as_fn_mkdir_p
18348# -------------
18349# Create "$as_dir" as a directory, including parents if necessary.
18350as_fn_mkdir_p ()
18351{
18352
18353 case $as_dir in #(
18354 -*) as_dir=./$as_dir;;
18355 esac
18356 test -d "$as_dir" || eval $as_mkdir_p || {
18357 as_dirs=
18358 while :; do
18359 case $as_dir in #(
Christian Heimes39258d32021-04-17 11:36:35 +020018360 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000018361 *) as_qdir=$as_dir;;
18362 esac
18363 as_dirs="'$as_qdir' $as_dirs"
18364 as_dir=`$as_dirname -- "$as_dir" ||
18365$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18366 X"$as_dir" : 'X\(//\)[^/]' \| \
18367 X"$as_dir" : 'X\(//\)$' \| \
18368 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020018369$as_echo X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018370 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18371 s//\1/
18372 q
18373 }
18374 /^X\(\/\/\)[^/].*/{
18375 s//\1/
18376 q
18377 }
18378 /^X\(\/\/\)$/{
18379 s//\1/
18380 q
18381 }
18382 /^X\(\/\).*/{
18383 s//\1/
18384 q
18385 }
18386 s/.*/./; q'`
18387 test -d "$as_dir" && break
18388 done
18389 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018390 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018391
18392
18393} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018394if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018395 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018396else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018397 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018398 as_mkdir_p=false
18399fi
18400
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018401
18402# as_fn_executable_p FILE
18403# -----------------------
18404# Test if FILE is an executable regular file.
18405as_fn_executable_p ()
18406{
18407 test -f "$1" && test -x "$1"
18408} # as_fn_executable_p
18409as_test_x='test -x'
18410as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018411
18412# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018413as_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 +000018414
18415# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018416as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018417
18418
Martin v. Löwis11437992002-04-12 09:54:03 +000018419exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018420## ----------------------------------- ##
18421## Main body of $CONFIG_STATUS script. ##
18422## ----------------------------------- ##
18423_ASEOF
18424test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018425
Matthias Kloseb9621712010-04-24 17:59:49 +000018426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18427# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018428# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018429# values after options handling.
18430ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018431This file was extended by python $as_me 3.10, which was
Christian Heimes39258d32021-04-17 11:36:35 +020018432generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018433
18434 CONFIG_FILES = $CONFIG_FILES
18435 CONFIG_HEADERS = $CONFIG_HEADERS
18436 CONFIG_LINKS = $CONFIG_LINKS
18437 CONFIG_COMMANDS = $CONFIG_COMMANDS
18438 $ $0 $@
18439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440on `(hostname || uname -n) 2>/dev/null | sed 1q`
18441"
18442
Martin v. Löwis11437992002-04-12 09:54:03 +000018443_ACEOF
18444
Matthias Kloseb9621712010-04-24 17:59:49 +000018445case $ac_config_files in *"
18446"*) set x $ac_config_files; shift; ac_config_files=$*;;
18447esac
18448
18449case $ac_config_headers in *"
18450"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18451esac
18452
18453
18454cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018455# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018456config_files="$ac_config_files"
18457config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018460
Matthias Kloseb9621712010-04-24 17:59:49 +000018461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018462ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018463\`$as_me' instantiates files and other configuration actions
18464from templates according to the current configuration. Unless the files
18465and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018466
Matthias Kloseb9621712010-04-24 17:59:49 +000018467Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018468
18469 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018471 --config print configuration, then exit
18472 -q, --quiet, --silent
18473 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018474 -d, --debug don't remove temporary files
18475 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018476 --file=FILE[:TEMPLATE]
18477 instantiate the configuration file FILE
18478 --header=FILE[:TEMPLATE]
18479 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018480
18481Configuration files:
18482$config_files
18483
18484Configuration headers:
18485$config_headers
18486
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018487Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Christian Heimes39258d32021-04-17 11:36:35 +020018491ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018492ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018493python config.status 3.10
Christian Heimes39258d32021-04-17 11:36:35 +020018494configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018495 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018496
Christian Heimes39258d32021-04-17 11:36:35 +020018497Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018498This config.status script is free software; the Free Software Foundation
18499gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500
18501ac_pwd='$ac_pwd'
18502srcdir='$srcdir'
18503INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018504MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018505test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018506_ACEOF
18507
Matthias Kloseb9621712010-04-24 17:59:49 +000018508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18509# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018510ac_need_defaults=:
18511while test $# != 0
18512do
18513 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018514 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18516 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018517 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018518 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018519 --*=)
18520 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18521 ac_optarg=
18522 ac_shift=:
18523 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018525 ac_option=$1
18526 ac_optarg=$2
18527 ac_shift=shift
18528 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018529 esac
18530
Skip Montanaro6dead952003-09-25 14:50:04 +000018531 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018532 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018533 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18534 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018535 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Christian Heimes39258d32021-04-17 11:36:35 +020018536 $as_echo "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018537 --config | --confi | --conf | --con | --co | --c )
Christian Heimes39258d32021-04-17 11:36:35 +020018538 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018539 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018540 debug=: ;;
18541 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018542 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018543 case $ac_optarg in
Christian Heimes39258d32021-04-17 11:36:35 +020018544 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018545 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018546 esac
18547 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018548 ac_need_defaults=false;;
18549 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018550 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018551 case $ac_optarg in
Christian Heimes39258d32021-04-17 11:36:35 +020018552 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018553 esac
18554 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018555 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556 --he | --h)
18557 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018558 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018559Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560 --help | --hel | -h )
Christian Heimes39258d32021-04-17 11:36:35 +020018561 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018562 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18563 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18564 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018565
18566 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018567 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018568Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018569
Matthias Kloseb9621712010-04-24 17:59:49 +000018570 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018572
18573 esac
18574 shift
18575done
18576
Skip Montanaro6dead952003-09-25 14:50:04 +000018577ac_configure_extra_args=
18578
18579if $ac_cs_silent; then
18580 exec 6>/dev/null
18581 ac_configure_extra_args="$ac_configure_extra_args --silent"
18582fi
18583
18584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018586if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018587 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018588 shift
Christian Heimes39258d32021-04-17 11:36:35 +020018589 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000018590 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018591 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018592 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018593fi
18594
Martin v. Löwis11437992002-04-12 09:54:03 +000018595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597exec 5>>config.log
18598{
18599 echo
18600 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18601## Running $as_me. ##
18602_ASBOX
Christian Heimes39258d32021-04-17 11:36:35 +020018603 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018604} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018607cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018608_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018609
Matthias Kloseb9621712010-04-24 17:59:49 +000018610cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611
18612# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018613for ac_config_target in $ac_config_targets
18614do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018615 case $ac_config_target in
18616 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18617 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18618 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018619 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18620 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018622 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018623 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018624 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018625 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018626
Victor Stinnere0be4232011-10-25 13:06:09 +020018627 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 esac
18629done
18630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631
Martin v. Löwis11437992002-04-12 09:54:03 +000018632# If the user did not use the arguments to specify the items to instantiate,
18633# then the envvar interface is used. Set only those that are not.
18634# We use the long form for the default assignment because of an extremely
18635# bizarre bug on SunOS 4.1.3.
18636if $ac_need_defaults; then
Christian Heimes39258d32021-04-17 11:36:35 +020018637 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18638 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000018639fi
18640
Skip Montanaro6dead952003-09-25 14:50:04 +000018641# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018642# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018643# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018644# Hook for its removal unless debugging.
18645# Note that there is a small window in which the directory will not be cleaned:
18646# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018647$debug ||
18648{
Victor Stinnere0be4232011-10-25 13:06:09 +020018649 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018650 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018651 : "${ac_tmp:=$tmp}"
18652 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018653' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018654 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018655}
Martin v. Löwis11437992002-04-12 09:54:03 +000018656# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018657
Martin v. Löwis11437992002-04-12 09:54:03 +000018658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018659 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018660 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018661} ||
18662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018663 tmp=./conf$$-$RANDOM
18664 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018665} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018666ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018667
Matthias Kloseb9621712010-04-24 17:59:49 +000018668# Set up the scripts for CONFIG_FILES section.
18669# No need to generate them if there are no CONFIG_FILES.
18670# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018672
Matthias Kloseb9621712010-04-24 17:59:49 +000018673
18674ac_cr=`echo X | tr X '\015'`
18675# On cygwin, bash can eat \r inside `` if the user requested igncr.
18676# But we know of no other shell where ac_cr would be empty at this
18677# point, so we can use a bashism as a fallback.
18678if test "x$ac_cr" = x; then
18679 eval ac_cr=\$\'\\r\'
18680fi
18681ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18682if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018683 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018684else
18685 ac_cs_awk_cr=$ac_cr
18686fi
18687
Victor Stinnere0be4232011-10-25 13:06:09 +020018688echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018689_ACEOF
18690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018691
Matthias Kloseb9621712010-04-24 17:59:49 +000018692{
18693 echo "cat >conf$$subs.awk <<_ACEOF" &&
18694 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18695 echo "_ACEOF"
18696} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018697 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18698ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018699ac_delim='%!_!# '
18700for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018701 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018702 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018703
Matthias Kloseb9621712010-04-24 17:59:49 +000018704 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18705 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018706 break
18707 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018708 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018709 else
18710 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018711 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018712done
Matthias Kloseb9621712010-04-24 17:59:49 +000018713rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714
Matthias Kloseb9621712010-04-24 17:59:49 +000018715cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018716cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018718sed -n '
18719h
18720s/^/S["/; s/!.*/"]=/
18721p
18722g
18723s/^[^!]*!//
18724:repl
18725t repl
18726s/'"$ac_delim"'$//
18727t delim
18728:nl
18729h
18730s/\(.\{148\}\)..*/\1/
18731t more1
18732s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18733p
18734n
18735b repl
18736:more1
18737s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18738p
18739g
18740s/.\{148\}//
18741t nl
18742:delim
18743h
18744s/\(.\{148\}\)..*/\1/
18745t more2
18746s/["\\]/\\&/g; s/^/"/; s/$/"/
18747p
18748b
18749:more2
18750s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18751p
18752g
18753s/.\{148\}//
18754t delim
18755' <conf$$subs.awk | sed '
18756/^[^""]/{
18757 N
18758 s/\n//
18759}
18760' >>$CONFIG_STATUS || ac_write_fail=1
18761rm -f conf$$subs.awk
18762cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18763_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018764cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018765 for (key in S) S_is_set[key] = 1
18766 FS = ""
18767
18768}
18769{
18770 line = $ 0
18771 nfields = split(line, field, "@")
18772 substed = 0
18773 len = length(field[1])
18774 for (i = 2; i < nfields; i++) {
18775 key = field[i]
18776 keylen = length(key)
18777 if (S_is_set[key]) {
18778 value = S[key]
18779 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18780 len += length(value) + length(field[++i])
18781 substed = 1
18782 } else
18783 len += 1 + keylen
18784 }
18785
18786 print line
18787}
18788
18789_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018791cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18792if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18793 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18794else
18795 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018796fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018797 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018798_ACEOF
18799
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018800# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18801# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018802# trailing colons and then remove the whole line if VPATH becomes empty
18803# (actually we leave an empty line to preserve line numbers).
18804if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018805 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18806h
18807s///
18808s/^/:/
18809s/[ ]*$/:/
18810s/:\$(srcdir):/:/g
18811s/:\${srcdir}:/:/g
18812s/:@srcdir@:/:/g
18813s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018814s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018815x
18816s/\(=[ ]*\).*/\1/
18817G
18818s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018819s/^[^=]*=[ ]*$//
18820}'
18821fi
18822
Matthias Kloseb9621712010-04-24 17:59:49 +000018823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018824fi # test -n "$CONFIG_FILES"
18825
Matthias Kloseb9621712010-04-24 17:59:49 +000018826# Set up the scripts for CONFIG_HEADERS section.
18827# No need to generate them if there are no CONFIG_HEADERS.
18828# This happens for instance with `./config.status Makefile'.
18829if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018830cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018831BEGIN {
18832_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018833
Matthias Kloseb9621712010-04-24 17:59:49 +000018834# Transform confdefs.h into an awk script `defines.awk', embedded as
18835# here-document in config.status, that substitutes the proper values into
18836# config.h.in to produce config.h.
18837
18838# Create a delimiter string that does not exist in confdefs.h, to ease
18839# handling of long lines.
18840ac_delim='%!_!# '
18841for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018842 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18843 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018844 break
18845 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018846 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018847 else
18848 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18849 fi
18850done
18851
18852# For the awk script, D is an array of macro values keyed by name,
18853# likewise P contains macro parameters if any. Preserve backslash
18854# newline sequences.
18855
18856ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18857sed -n '
18858s/.\{148\}/&'"$ac_delim"'/g
18859t rset
18860:rset
18861s/^[ ]*#[ ]*define[ ][ ]*/ /
18862t def
18863d
18864:def
18865s/\\$//
18866t bsnl
18867s/["\\]/\\&/g
18868s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18869D["\1"]=" \3"/p
18870s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18871d
18872:bsnl
18873s/["\\]/\\&/g
18874s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18875D["\1"]=" \3\\\\\\n"\\/p
18876t cont
18877s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18878t cont
18879d
18880:cont
18881n
18882s/.\{148\}/&'"$ac_delim"'/g
18883t clear
18884:clear
18885s/\\$//
18886t bsnlc
18887s/["\\]/\\&/g; s/^/"/; s/$/"/p
18888d
18889:bsnlc
18890s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18891b cont
18892' <confdefs.h | sed '
18893s/'"$ac_delim"'/"\\\
18894"/g' >>$CONFIG_STATUS || ac_write_fail=1
18895
18896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18897 for (key in D) D_is_set[key] = 1
18898 FS = ""
18899}
18900/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18901 line = \$ 0
18902 split(line, arg, " ")
18903 if (arg[1] == "#") {
18904 defundef = arg[2]
18905 mac1 = arg[3]
18906 } else {
18907 defundef = substr(arg[1], 2)
18908 mac1 = arg[2]
18909 }
18910 split(mac1, mac2, "(") #)
18911 macro = mac2[1]
18912 prefix = substr(line, 1, index(line, defundef) - 1)
18913 if (D_is_set[macro]) {
18914 # Preserve the white space surrounding the "#".
18915 print prefix "define", macro P[macro] D[macro]
18916 next
18917 } else {
18918 # Replace #undef with comments. This is necessary, for example,
18919 # in the case of _POSIX_SOURCE, which is predefined and required
18920 # on some systems where configure will not decide to define it.
18921 if (defundef == "undef") {
18922 print "/*", prefix defundef, macro, "*/"
18923 next
18924 }
18925 }
18926}
18927{ print }
18928_ACAWK
18929_ACEOF
18930cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018931 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018932fi # test -n "$CONFIG_HEADERS"
18933
18934
18935eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18936shift
18937for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018938do
18939 case $ac_tag in
18940 :[FHLC]) ac_mode=$ac_tag; continue;;
18941 esac
18942 case $ac_mode$ac_tag in
18943 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018944 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018945 :[FH]-) ac_tag=-:-;;
18946 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18947 esac
18948 ac_save_IFS=$IFS
18949 IFS=:
18950 set x $ac_tag
18951 IFS=$ac_save_IFS
18952 shift
18953 ac_file=$1
18954 shift
18955
18956 case $ac_mode in
18957 :L) ac_source=$1;;
18958 :[FH])
18959 ac_file_inputs=
18960 for ac_f
18961 do
18962 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018963 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018964 *) # Look for the file first in the build tree, then in the source tree
18965 # (if the path is not absolute). The absolute path cannot be DOS-style,
18966 # because $ac_f cannot contain `:'.
18967 test -f "$ac_f" ||
18968 case $ac_f in
18969 [\\/$]*) false;;
18970 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18971 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018972 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018973 esac
Christian Heimes39258d32021-04-17 11:36:35 +020018974 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018975 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018976 done
18977
18978 # Let's still pretend it is `configure' which instantiates (i.e., don't
18979 # use $as_me), people would be surprised to read:
18980 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018981 configure_input='Generated from '`
Christian Heimes39258d32021-04-17 11:36:35 +020018982 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000018983 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018984 if test x"$ac_file" != x-; then
18985 configure_input="$ac_file. $configure_input"
Christian Heimes39258d32021-04-17 11:36:35 +020018986 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18987$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018988 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018989 # Neutralize special characters interpreted by sed in replacement strings.
18990 case $configure_input in #(
18991 *\&* | *\|* | *\\* )
Christian Heimes39258d32021-04-17 11:36:35 +020018992 ac_sed_conf_input=`$as_echo "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018993 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18994 *) ac_sed_conf_input=$configure_input;;
18995 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018996
18997 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018998 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18999 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019000 esac
19001 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019002 esac
19003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019004 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019005$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019006 X"$ac_file" : 'X\(//\)[^/]' \| \
19007 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019008 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020019009$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019010 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19011 s//\1/
19012 q
19013 }
19014 /^X\(\/\/\)[^/].*/{
19015 s//\1/
19016 q
19017 }
19018 /^X\(\/\/\)$/{
19019 s//\1/
19020 q
19021 }
19022 /^X\(\/\).*/{
19023 s//\1/
19024 q
19025 }
19026 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000019027 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000019028 ac_builddir=.
19029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019030case "$ac_dir" in
19031.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19032*)
Christian Heimes39258d32021-04-17 11:36:35 +020019033 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034 # A ".." for each directory in $ac_dir_suffix.
Christian Heimes39258d32021-04-17 11:36:35 +020019035 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019036 case $ac_top_builddir_sub in
19037 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19038 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19039 esac ;;
19040esac
19041ac_abs_top_builddir=$ac_pwd
19042ac_abs_builddir=$ac_pwd$ac_dir_suffix
19043# for backward compatibility:
19044ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000019045
19046case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019047 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000019048 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019049 ac_top_srcdir=$ac_top_builddir_sub
19050 ac_abs_top_srcdir=$ac_pwd ;;
19051 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000019052 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019053 ac_top_srcdir=$srcdir
19054 ac_abs_top_srcdir=$srcdir ;;
19055 *) # Relative name.
19056 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19057 ac_top_srcdir=$ac_top_build_prefix$srcdir
19058 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019059esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019060ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000019061
Martin v. Löwis11437992002-04-12 09:54:03 +000019062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019063 case $ac_mode in
19064 :F)
19065 #
19066 # CONFIG_FILE
19067 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019068
19069 case $INSTALL in
19070 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019071 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019072 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010019073 ac_MKDIR_P=$MKDIR_P
19074 case $MKDIR_P in
19075 [\\/$]* | ?:[\\/]* ) ;;
19076 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19077 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000019078_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019079
Matthias Kloseb9621712010-04-24 17:59:49 +000019080cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019081# If the template does not know about datarootdir, expand it.
19082# FIXME: This hack should be removed a few years after 2.60.
19083ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000019084ac_sed_dataroot='
19085/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019086 p
19087 q
19088}
19089/@datadir@/p
19090/@docdir@/p
19091/@infodir@/p
19092/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000019093/@mandir@/p'
19094case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019095*datarootdir*) ac_datarootdir_seen=yes;;
19096*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Christian Heimes39258d32021-04-17 11:36:35 +020019097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19098$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019100cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019101 ac_datarootdir_hack='
19102 s&@datadir@&$datadir&g
19103 s&@docdir@&$docdir&g
19104 s&@infodir@&$infodir&g
19105 s&@localedir@&$localedir&g
19106 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000019107 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108esac
19109_ACEOF
19110
19111# Neutralize VPATH when `$srcdir' = `.'.
19112# Shell code in configure.ac might set extrasub.
19113# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000019114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19115ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000019116$extrasub
19117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000019119:t
19120/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000019121s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019122s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000019123s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019124s&@srcdir@&$ac_srcdir&;t t
19125s&@abs_srcdir@&$ac_abs_srcdir&;t t
19126s&@top_srcdir@&$ac_top_srcdir&;t t
19127s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19128s&@builddir@&$ac_builddir&;t t
19129s&@abs_builddir@&$ac_abs_builddir&;t t
19130s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19131s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010019132s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019133$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000019134"
Victor Stinnere0be4232011-10-25 13:06:09 +020019135eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19136 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019138test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019139 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19140 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19141 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Christian Heimes39258d32021-04-17 11:36:35 +020019142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019143which seems to be undefined. Please make sure it is defined" >&5
Christian Heimes39258d32021-04-17 11:36:35 +020019144$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019145which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019146
Victor Stinnere0be4232011-10-25 13:06:09 +020019147 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019148 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019149 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19150 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019151 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019152 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019153 ;;
19154 :H)
19155 #
19156 # CONFIG_HEADER
19157 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019158 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019159 {
Christian Heimes39258d32021-04-17 11:36:35 +020019160 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019161 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19162 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019163 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019164 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Christian Heimes39258d32021-04-17 11:36:35 +020019165 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19166$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019167 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019168 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019169 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019170 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019171 fi
19172 else
Christian Heimes39258d32021-04-17 11:36:35 +020019173 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019174 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019175 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019176 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019177 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019179
19180 esac
19181
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019182
19183 case $ac_file$ac_mode in
19184 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19185
19186 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019187done # for ac_tag
19188
Guido van Rossum627b2d71993-12-24 10:39:16 +000019189
Matthias Kloseb9621712010-04-24 17:59:49 +000019190as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019191_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019192ac_clean_files=$ac_clean_files_save
19193
Matthias Kloseb9621712010-04-24 17:59:49 +000019194test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019195 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019196
Martin v. Löwis11437992002-04-12 09:54:03 +000019197
19198# configure is writing to config.log, and then calls config.status.
19199# config.status does its own redirection, appending to config.log.
19200# Unfortunately, on DOS this fails, as config.log is still kept open
19201# by configure, so config.status won't be able to write to it; its
19202# output is simply discarded. So we exec the FD to /dev/null,
19203# effectively closing config.log, so it can be properly (re)opened and
19204# appended to by config.status. When coming back to configure, we
19205# need to make the FD available again.
19206if test "$no_create" != yes; then
19207 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019208 ac_config_status_args=
19209 test "$silent" = yes &&
19210 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019211 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019212 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019213 exec 5>>config.log
19214 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19215 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019216 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019217fi
19218if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Christian Heimes39258d32021-04-17 11:36:35 +020019219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19220$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019221fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019222
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019223
Christian Heimes75ed8902013-11-20 01:11:18 +010019224echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019225if test ! -f Modules/Setup.local
19226then
19227 echo "# Edit this file for local setup changes" >Modules/Setup.local
19228fi
19229
Christian Heimes75ed8902013-11-20 01:11:18 +010019230echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019231$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019232 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019233 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019234mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019235
19236if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19237 echo "" >&6
19238 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019239 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 +000019240 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019241 echo "" >&6
19242 echo "" >&6
19243fi