blob: 4dc0eabf24c03e17d73d3ebfe2eb13fad04b946c [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
755LIPO_32BIT_FLAGS
756ARCH_RUN_32BIT
757UNIVERSALSDK
758CONFIG_ARGS
759SOVERSION
760VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200761PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200762PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100763host_os
764host_vendor
765host_cpu
766host
767build_os
768build_vendor
769build_cpu
770build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500771HAS_GIT
772GITBRANCH
773GITTAG
774GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400775BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000776target_alias
777host_alias
778build_alias
779LIBS
780ECHO_T
781ECHO_N
782ECHO_C
783DEFS
784mandir
785localedir
786libdir
787psdir
788pdfdir
789dvidir
790htmldir
791infodir
792docdir
793oldincludedir
794includedir
795localstatedir
796sharedstatedir
797sysconfdir
798datadir
799datarootdir
800libexecdir
801sbindir
802bindir
803program_transform_name
804prefix
805exec_prefix
806PACKAGE_URL
807PACKAGE_BUGREPORT
808PACKAGE_STRING
809PACKAGE_VERSION
810PACKAGE_TARNAME
811PACKAGE_NAME
812PATH_SEPARATOR
813SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000814ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000815ac_user_opts='
816enable_option_checking
817enable_universalsdk
818with_universal_archs
819with_framework_name
820enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_cxx_main
822with_suffix
823enable_shared
824enable_profiling
825with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200826with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200827with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000828enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700829with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100830with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400831with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100832with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800833with_memory_sanitizer
834with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_libs
836with_system_expat
837with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100838with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100839with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000840enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700841with_tcltk_includes
842with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000844enable_ipv6
845with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000846with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000847with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000848with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700849with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000850with_libm
851with_libc
852enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100853with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100854with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100855with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000856with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800857with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100858with_openssl
Christian Heimes32eba612021-03-19 10:29:25 +0100859with_openssl_rpath
Christian Heimes892d66e2018-01-29 14:10:18 +0100860with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200861with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200862with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100863with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800864enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000865'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 ac_precious_vars='build_alias
867host_alias
868target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100869MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870CC
871CFLAGS
872LDFLAGS
873LIBS
874CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800875CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700876PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800877PKG_CONFIG
878PKG_CONFIG_PATH
879PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880
Guido van Rossum627b2d71993-12-24 10:39:16 +0000881
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000883ac_init_help=
884ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000885ac_unrecognized_opts=
886ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887# The variables have the same names as the options, with
888# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000889cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892no_recursion=
893prefix=NONE
894program_prefix=NONE
895program_suffix=NONE
896program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901x_includes=NONE
902x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000903
904# Installation directory options.
905# These are left unexpanded so users can "make install exec_prefix=/foo"
906# and all the variables that are supposed to be based on exec_prefix
907# by default will actually change.
908# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910bindir='${exec_prefix}/bin'
911sbindir='${exec_prefix}/sbin'
912libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913datarootdir='${prefix}/share'
914datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915sysconfdir='${prefix}/etc'
916sharedstatedir='${prefix}/com'
917localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918includedir='${prefix}/include'
919oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
921infodir='${datarootdir}/info'
922htmldir='${docdir}'
923dvidir='${docdir}'
924pdfdir='${docdir}'
925psdir='${docdir}'
926libdir='${exec_prefix}/lib'
927localedir='${datarootdir}/locale'
928mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000933do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 # If the previous option needs an argument, assign it.
935 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 ac_prev=
938 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000939 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200942 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
943 *=) ac_optarg= ;;
944 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
Christian Heimes39258d32021-04-17 11:36:35 +0200947 # Accept the important Cygnus configure options, so we can diagnose typos.
948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 case $ac_dashdash$ac_option in
950 --)
951 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 -bindir | --bindir | --bindi | --bind | --bin | --bi)
954 ac_prev=bindir ;;
955 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 -cache-file | --cache-file | --cache-fil | --cache-fi \
964 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
965 ac_prev=cache_file ;;
966 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
967 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 cache_file=$ac_optarg ;;
969
970 --config-cache | -C)
971 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000972
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000978 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
979 | --dataroo | --dataro | --datar)
980 ac_prev=datarootdir ;;
981 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
982 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
983 datarootdir=$ac_optarg ;;
984
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +0200989 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +0200991 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 case $ac_user_opts in
993 *"
994"enable_$ac_useropt"
995"*) ;;
996 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
997 ac_unrecognized_sep=', ';;
998 esac
999 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001000
1001 -docdir | --docdir | --docdi | --doc | --do)
1002 ac_prev=docdir ;;
1003 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1004 docdir=$ac_optarg ;;
1005
1006 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1007 ac_prev=dvidir ;;
1008 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1009 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001012 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001014 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001015 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001016 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001017 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001018 case $ac_user_opts in
1019 *"
1020"enable_$ac_useropt"
1021"*) ;;
1022 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1023 ac_unrecognized_sep=', ';;
1024 esac
1025 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1028 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1029 | --exec | --exe | --ex)
1030 ac_prev=exec_prefix ;;
1031 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1032 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1033 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 # Obsolete; use --with-gas.
1038 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 -help | --help | --hel | --he | -h)
1041 ac_init_help=long ;;
1042 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1043 ac_init_help=recursive ;;
1044 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1045 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1053 ac_prev=htmldir ;;
1054 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1055 | --ht=*)
1056 htmldir=$ac_optarg ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -includedir | --includedir | --includedi | --included | --include \
1059 | --includ | --inclu | --incl | --inc)
1060 ac_prev=includedir ;;
1061 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1062 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -infodir | --infodir | --infodi | --infod | --info | --inf)
1066 ac_prev=infodir ;;
1067 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -libdir | --libdir | --libdi | --libd)
1071 ac_prev=libdir ;;
1072 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1076 | --libexe | --libex | --libe)
1077 ac_prev=libexecdir ;;
1078 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1079 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001082 -localedir | --localedir | --localedi | --localed | --locale)
1083 ac_prev=localedir ;;
1084 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1085 localedir=$ac_optarg ;;
1086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001088 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089 ac_prev=localstatedir ;;
1090 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001091 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
1094 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1095 ac_prev=mandir ;;
1096 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100 # Obsolete; use --without-fp.
1101 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 no_create=yes ;;
1106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001107 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1108 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1109 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1112 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1113 | --oldin | --oldi | --old | --ol | --o)
1114 ac_prev=oldincludedir ;;
1115 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1116 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1117 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1121 ac_prev=prefix ;;
1122 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1126 | --program-pre | --program-pr | --program-p)
1127 ac_prev=program_prefix ;;
1128 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1129 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1133 | --program-suf | --program-su | --program-s)
1134 ac_prev=program_suffix ;;
1135 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1136 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -program-transform-name | --program-transform-name \
1140 | --program-transform-nam | --program-transform-na \
1141 | --program-transform-n | --program-transform- \
1142 | --program-transform | --program-transfor \
1143 | --program-transfo | --program-transf \
1144 | --program-trans | --program-tran \
1145 | --progr-tra | --program-tr | --program-t)
1146 ac_prev=program_transform_name ;;
1147 -program-transform-name=* | --program-transform-name=* \
1148 | --program-transform-nam=* | --program-transform-na=* \
1149 | --program-transform-n=* | --program-transform-=* \
1150 | --program-transform=* | --program-transfor=* \
1151 | --program-transfo=* | --program-transf=* \
1152 | --program-trans=* | --program-tran=* \
1153 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001156 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1157 ac_prev=pdfdir ;;
1158 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1159 pdfdir=$ac_optarg ;;
1160
1161 -psdir | --psdir | --psdi | --psd | --ps)
1162 ac_prev=psdir ;;
1163 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1164 psdir=$ac_optarg ;;
1165
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1167 | -silent | --silent | --silen | --sile | --sil)
1168 silent=yes ;;
1169
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1171 ac_prev=sbindir ;;
1172 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1173 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
1176 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1177 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1178 | --sharedst | --shareds | --shared | --share | --shar \
1179 | --sha | --sh)
1180 ac_prev=sharedstatedir ;;
1181 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1182 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1183 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1184 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 -site | --site | --sit)
1188 ac_prev=site ;;
1189 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1193 ac_prev=srcdir ;;
1194 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001197 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1198 | --syscon | --sysco | --sysc | --sys | --sy)
1199 ac_prev=sysconfdir ;;
1200 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1201 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001203
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1210 verbose=yes ;;
1211
Martin v. Löwis11437992002-04-12 09:54:03 +00001212 -version | --version | --versio | --versi | --vers | -V)
1213 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001219 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001221 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 case $ac_user_opts in
1223 *"
1224"with_$ac_useropt"
1225"*) ;;
1226 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1227 ac_unrecognized_sep=', ';;
1228 esac
1229 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001235 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001237 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001238 case $ac_user_opts in
1239 *"
1240"with_$ac_useropt"
1241"*) ;;
1242 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1243 ac_unrecognized_sep=', ';;
1244 esac
1245 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247 --x)
1248 # Obsolete; use --with-x.
1249 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
1251 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1252 | --x-incl | --x-inc | --x-in | --x-i)
1253 ac_prev=x_includes ;;
1254 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1255 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257
1258 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1259 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1260 ac_prev=x_libraries ;;
1261 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1262 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1266Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 ;;
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 *=*)
1270 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1271 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 case $ac_envvar in #(
1273 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 export $ac_envvar ;;
1278
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001279 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 # FIXME: should be removed in autoconf 3.0.
Christian Heimes39258d32021-04-17 11:36:35 +02001281 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001283 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001284 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 ;;
1286
1287 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288done
1289
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001291 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001293fi
1294
Matthias Kloseb9621712010-04-24 17:59:49 +00001295if test -n "$ac_unrecognized_opts"; then
1296 case $enable_option_checking in
1297 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Christian Heimes39258d32021-04-17 11:36:35 +02001299 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 esac
1301fi
1302
1303# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1305 datadir sysconfdir sharedstatedir localstatedir includedir \
1306 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimes39258d32021-04-17 11:36:35 +02001307 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001310 # Remove trailing slashes.
1311 case $ac_val in
1312 */ )
1313 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1314 eval $ac_var=\$ac_val;;
1315 esac
1316 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 [\\/$]* | ?:[\\/]* ) continue;;
1319 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001320 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001322done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323
Martin v. Löwis11437992002-04-12 09:54:03 +00001324# There might be people who depend on the old broken behavior: `$host'
1325# used to hold the argument of --host etc.
1326# FIXME: To remove some day.
1327build=$build_alias
1328host=$host_alias
1329target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Martin v. Löwis11437992002-04-12 09:54:03 +00001331# FIXME: To remove some day.
1332if test "x$host_alias" != x; then
1333 if test "x$build_alias" = x; then
1334 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001335 elif test "x$build_alias" != "x$host_alias"; then
1336 cross_compiling=yes
1337 fi
1338fi
1339
1340ac_tool_prefix=
1341test -n "$host_alias" && ac_tool_prefix=$host_alias-
1342
1343test "$silent" = yes && exec 6>/dev/null
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346ac_pwd=`pwd` && test -n "$ac_pwd" &&
1347ac_ls_di=`ls -di .` &&
1348ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001349 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352
1353
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354# Find the source files, if location was not specified.
1355if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001356 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001357 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 ac_confdir=`$as_dirname -- "$as_myself" ||
1359$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1360 X"$as_myself" : 'X\(//\)[^/]' \| \
1361 X"$as_myself" : 'X\(//\)$' \| \
1362 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +02001363$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\/\)[^/].*/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\/\)$/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\).*/{
1377 s//\1/
1378 q
1379 }
1380 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001381 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001383 srcdir=..
1384 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001385else
1386 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001388if test ! -r "$srcdir/$ac_unique_file"; then
1389 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001390 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001392ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1393ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001394 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 pwd)`
1396# When building in place, set srcdir=.
1397if test "$ac_abs_confdir" = "$ac_pwd"; then
1398 srcdir=.
1399fi
1400# Remove unnecessary trailing slashes from srcdir.
1401# Double slashes in file names in object file debugging info
1402# mess up M-x gdb in Emacs.
1403case $srcdir in
1404*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1405esac
1406for ac_var in $ac_precious_vars; do
1407 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1408 eval ac_env_${ac_var}_value=\$${ac_var}
1409 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1410 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1411done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001412
Martin v. Löwis11437992002-04-12 09:54:03 +00001413#
1414# Report the --help message.
1415#
1416if test "$ac_init_help" = "long"; then
1417 # Omit some internal or obsolete options to make the list less imposing.
1418 # This message is too long to be a string in the A/UX 3.1 sh.
1419 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001420\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001421
1422Usage: $0 [OPTION]... [VAR=VALUE]...
1423
1424To assign environment variables (e.g., CC, CFLAGS...), specify them as
1425VAR=VALUE. See below for descriptions of some of the useful variables.
1426
1427Defaults for the options are specified in brackets.
1428
1429Configuration:
1430 -h, --help display this help and exit
1431 --help=short display options specific to this package
1432 --help=recursive display the short help of all the included packages
1433 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001434 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 --cache-file=FILE cache test results in FILE [disabled]
1436 -C, --config-cache alias for \`--cache-file=config.cache'
1437 -n, --no-create do not create output files
1438 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1439
Martin v. Löwis11437992002-04-12 09:54:03 +00001440Installation directories:
1441 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446By default, \`make install' will install all the files in
1447\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1448an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1449for instance \`--prefix=\$HOME'.
1450
1451For better control, use the options below.
1452
1453Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001454 --bindir=DIR user executables [EPREFIX/bin]
1455 --sbindir=DIR system admin executables [EPREFIX/sbin]
1456 --libexecdir=DIR program executables [EPREFIX/libexec]
1457 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1458 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1459 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1460 --libdir=DIR object code libraries [EPREFIX/lib]
1461 --includedir=DIR C header files [PREFIX/include]
1462 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1463 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1464 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1465 --infodir=DIR info documentation [DATAROOTDIR/info]
1466 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1467 --mandir=DIR man documentation [DATAROOTDIR/man]
1468 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1469 --htmldir=DIR html documentation [DOCDIR]
1470 --dvidir=DIR dvi documentation [DOCDIR]
1471 --pdfdir=DIR pdf documentation [DOCDIR]
1472 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001473_ACEOF
1474
1475 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001476
1477System types:
1478 --build=BUILD configure for building on BUILD [guessed]
1479 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001480_ACEOF
1481fi
1482
1483if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001484 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001485 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001486 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001487 cat <<\_ACEOF
1488
1489Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001490 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1492 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001493 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001494 create a universal binary build. SDKDIR specifies
1495 which macOS SDK should be used to perform the build,
1496 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001498 create a Python.framework rather than a traditional
1499 Unix install. optional INSTALLDIR specifies the
1500 installation path. see Mac/README.rst (default is
1501 no)
1502 --enable-shared enable building a shared Python library (default is
1503 no)
1504 --enable-profiling enable C-level code profiling with gprof (default is
1505 no)
1506 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1507 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001508 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001509 support loadable extensions in _sqlite module, see
1510 Doc/library/sqlite3.rst (default is no)
1511 --enable-ipv6 enable ipv6 (with ipv4) support, see
1512 Doc/library/socket.rst (default is yes if supported)
1513 --enable-big-digits[=15|30]
1514 use big digits (30 or 15 bits) for Python longs
1515 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001516 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001517
1518Optional Packages:
1519 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1520 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001521 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001522 specify the kind of universal binary that should be
1523 created. this option is only valid when
1524 --enable-universalsdk is set; options are:
Ronald Oussoren41761932020-11-08 10:05:27 +01001525 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1526 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001527 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001528 specify the name for the python framework on macOS
1529 only valid when --enable-framework is set. see
1530 Mac/README.rst (default is 'Python')
1531 --with-cxx-main[=COMPILER]
1532 compile main() and link Python executable with C++
1533 compiler specified in COMPILER (default is $CXX)
1534 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1535 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001536 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001537 (default is no)
1538 --with-assertions build with C assertions enabled (default is no)
1539 --with-lto enable Link-Time-Optimization in any build (default
1540 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001541 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001542 select hash algorithm for use in Python/pyhash.c
1543 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001544 --with-tzpath=<list of absolute paths separated by pathsep>
1545 Select the default time zone search path for zoneinfo.TZPATH
1546
Charles-François Natalid30b0222014-05-08 23:08:51 +01001547 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001548 enable AddressSanitizer memory error detector,
1549 'asan' (default is no)
1550 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1551 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001552 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001553 enable UndefinedBehaviorSanitizer undefined
1554 behaviour detector, 'ubsan' (default is no)
1555 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001556 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001557 library, see Doc/library/pyexpat.rst (default is no)
1558 --with-system-ffi build _ctypes module using an installed ffi library,
1559 see Doc/library/ctypes.rst (default is
1560 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001561 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001562 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001563 --with-decimal-contextvar
1564 build _decimal module using a coroutine-local rather
1565 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001566 --with-tcltk-includes='-I...'
1567 override search for Tcl and Tk include files
1568 --with-tcltk-libs='-L...'
1569 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001570 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001571 override order to check db backends for dbm; a valid
1572 value is a colon separated string with the backend
1573 names `ndbm', `gdbm' and `bdb'.
1574 --with-doc-strings enable documentation strings (default is yes)
1575 --with-pymalloc enable specialized mallocs (default is yes)
1576 --with-c-locale-coercion
1577 enable C locale coercion to a UTF-8 based locale
1578 (default is yes)
1579 --with-valgrind enable Valgrind support (default is no)
1580 --with-dtrace enable DTrace support (default is no)
1581 --with-libm=STRING override libm math library to STRING (default is
1582 system-dependent)
1583 --with-libc=STRING override libc C library to STRING (default is
1584 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001585 --with-platlibdir=DIRNAME
1586 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001587 --with-wheel-pkg-dir=PATH
1588 Directory of wheel packages used by ensurepip
1589 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001590 --with(out)-readline[=editline]
1591 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001592 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001593 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001594 --with-ensurepip[=install|upgrade|no]
1595 "install" or "upgrade" using bundled pip (default is
1596 upgrade)
Christian Heimes5d6e8c12021-03-27 14:44:04 +01001597 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes32eba612021-03-19 10:29:25 +01001598 --with-openssl-rpath=[DIR|auto|no]
1599 Set runtime library directory (rpath) for OpenSSL
1600 libraries, no (default): don't set rpath, auto:
1601 auto-detect rpath from --with-openssl and
1602 pkg-config, DIR: set an explicit rpath
Christian Heimes892d66e2018-01-29 14:10:18 +01001603 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001604 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001605 Python's preferred selection (default), openssl:
1606 leave OpenSSL's defaults untouched, STRING: use a
Christian Heimese9832522021-05-01 20:53:10 +02001607 custom string, python and STRING also set TLS 1.2 as
1608 minimum TLS version
Christian Heimes9b60e552020-05-15 23:54:53 +02001609 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1610 builtin hash modules, md5, sha1, sha256, sha512,
1611 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001612 --with-experimental-isolated-subinterpreters
1613 better isolate subinterpreters, experimental build
1614 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001615 --without-static-libpython
1616 do not build libpythonMAJOR.MINOR.a and do not
1617 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001618
1619Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001620 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 CC C compiler command
1622 CFLAGS C compiler flags
1623 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1624 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001629 PROFILE_TASK
1630 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001631 PKG_CONFIG path to pkg-config utility
1632 PKG_CONFIG_PATH
1633 directories to add to pkg-config's search path
1634 PKG_CONFIG_LIBDIR
1635 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
1637Use these variables to override the choices made by `configure' or to help
1638it to find libraries and programs with nonstandard names/locations.
1639
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001640Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
1644
1645if test "$ac_init_help" = "recursive"; then
1646 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 test -d "$ac_dir" ||
1649 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1650 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 ac_builddir=.
1652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653case "$ac_dir" in
1654.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1655*)
Christian Heimes39258d32021-04-17 11:36:35 +02001656 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 # A ".." for each directory in $ac_dir_suffix.
Christian Heimes39258d32021-04-17 11:36:35 +02001658 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 case $ac_top_builddir_sub in
1660 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1661 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1662 esac ;;
1663esac
1664ac_abs_top_builddir=$ac_pwd
1665ac_abs_builddir=$ac_pwd$ac_dir_suffix
1666# for backward compatibility:
1667ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001668
1669case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001670 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001671 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001672 ac_top_srcdir=$ac_top_builddir_sub
1673 ac_abs_top_srcdir=$ac_pwd ;;
1674 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001675 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001676 ac_top_srcdir=$srcdir
1677 ac_abs_top_srcdir=$srcdir ;;
1678 *) # Relative name.
1679 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1680 ac_top_srcdir=$ac_top_build_prefix$srcdir
1681 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001682esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001683ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001685 cd "$ac_dir" || { ac_status=$?; continue; }
Christian Heimes39258d32021-04-17 11:36:35 +02001686 # Check for guested configure.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001687 if test -f "$ac_srcdir/configure.gnu"; then
1688 echo &&
1689 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1690 elif test -f "$ac_srcdir/configure"; then
1691 echo &&
1692 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001693 else
Christian Heimes39258d32021-04-17 11:36:35 +02001694 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695 fi || ac_status=$?
1696 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 done
1698fi
1699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001700test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001701if $ac_init_version; then
1702 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001703python configure 3.10
Christian Heimes39258d32021-04-17 11:36:35 +02001704generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001705
Christian Heimes39258d32021-04-17 11:36:35 +02001706Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001707This configure script is free software; the Free Software Foundation
1708gives unlimited permission to copy, distribute and modify it.
1709_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001710 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001712
1713## ------------------------ ##
1714## Autoconf initialization. ##
1715## ------------------------ ##
1716
1717# ac_fn_c_try_compile LINENO
1718# --------------------------
1719# Try to compile conftest.$ac_ext, and return whether this succeeded.
1720ac_fn_c_try_compile ()
1721{
1722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001723 rm -f conftest.$ac_objext
Matthias Kloseb9621712010-04-24 17:59:49 +00001724 if { { ac_try="$ac_compile"
1725case "(($ac_try" in
1726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1727 *) ac_try_echo=$ac_try;;
1728esac
1729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001730$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 (eval "$ac_compile") 2>conftest.err
1732 ac_status=$?
1733 if test -s conftest.err; then
1734 grep -v '^ *+' conftest.err >conftest.er1
1735 cat conftest.er1 >&5
1736 mv -f conftest.er1 conftest.err
1737 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001739 test $ac_status = 0; } && {
1740 test -z "$ac_c_werror_flag" ||
1741 test ! -s conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02001742 } && test -s conftest.$ac_objext; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001744else
1745 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001746sed 's/^/| /' conftest.$ac_ext >&5
1747
1748 ac_retval=1
1749fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001750 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 as_fn_set_status $ac_retval
1752
1753} # ac_fn_c_try_compile
1754
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001755# ac_fn_c_try_cpp LINENO
1756# ----------------------
1757# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1758ac_fn_c_try_cpp ()
1759{
1760 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1761 if { { ac_try="$ac_cpp conftest.$ac_ext"
1762case "(($ac_try" in
1763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1764 *) ac_try_echo=$ac_try;;
1765esac
1766eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001767$as_echo "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001768 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1769 ac_status=$?
1770 if test -s conftest.err; then
1771 grep -v '^ *+' conftest.err >conftest.er1
1772 cat conftest.er1 >&5
1773 mv -f conftest.er1 conftest.err
1774 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001776 test $ac_status = 0; } > conftest.i && {
1777 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1778 test ! -s conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02001779 }; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001780 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001781else
1782 $as_echo "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001783sed 's/^/| /' conftest.$ac_ext >&5
1784
1785 ac_retval=1
1786fi
1787 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1788 as_fn_set_status $ac_retval
1789
1790} # ac_fn_c_try_cpp
1791
Matthias Kloseb9621712010-04-24 17:59:49 +00001792# ac_fn_c_try_link LINENO
1793# -----------------------
1794# Try to link conftest.$ac_ext, and return whether this succeeded.
1795ac_fn_c_try_link ()
1796{
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001798 rm -f conftest.$ac_objext conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001799 if { { ac_try="$ac_link"
1800case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803esac
1804eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001805$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 (eval "$ac_link") 2>conftest.err
1807 ac_status=$?
1808 if test -s conftest.err; then
1809 grep -v '^ *+' conftest.err >conftest.er1
1810 cat conftest.er1 >&5
1811 mv -f conftest.er1 conftest.err
1812 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 test $ac_status = 0; } && {
1815 test -z "$ac_c_werror_flag" ||
1816 test ! -s conftest.err
1817 } && test -s conftest$ac_exeext && {
1818 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001819 test -x conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02001820 }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001822else
1823 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001824sed 's/^/| /' conftest.$ac_ext >&5
1825
1826 ac_retval=1
1827fi
1828 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1829 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1830 # interfere with the next link command; also delete a directory that is
1831 # left behind by Apple's compiler. We do this before executing the actions.
1832 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001833 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001834 as_fn_set_status $ac_retval
1835
1836} # ac_fn_c_try_link
1837
Christian Heimes39258d32021-04-17 11:36:35 +02001838# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001839# -------------------------------------------------------
Christian Heimes39258d32021-04-17 11:36:35 +02001840# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1841# the include files in INCLUDES and setting the cache variable VAR
1842# accordingly.
1843ac_fn_c_check_header_mongrel ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001844{
1845 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001846 if eval \${$3+:} false; then :
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1848$as_echo_n "checking for $2... " >&6; }
1849if eval \${$3+:} false; then :
1850 $as_echo_n "(cached) " >&6
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855else
1856 # Is the header compilable?
1857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1858$as_echo_n "checking $2 usability... " >&6; }
1859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001860/* end confdefs.h. */
1861$4
1862#include <$2>
1863_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02001864if ac_fn_c_try_compile "$LINENO"; then :
1865 ac_header_compiler=yes
1866else
1867 ac_header_compiler=no
Matthias Kloseb9621712010-04-24 17:59:49 +00001868fi
Christian Heimes39258d32021-04-17 11:36:35 +02001869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1871$as_echo "$ac_header_compiler" >&6; }
1872
1873# Is the header present?
1874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1875$as_echo_n "checking $2 presence... " >&6; }
1876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878#include <$2>
1879_ACEOF
1880if ac_fn_c_try_cpp "$LINENO"; then :
1881 ac_header_preproc=yes
1882else
1883 ac_header_preproc=no
1884fi
1885rm -f conftest.err conftest.i conftest.$ac_ext
1886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1887$as_echo "$ac_header_preproc" >&6; }
1888
1889# So? What about this header?
1890case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1891 yes:no: )
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1893$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1895$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1896 ;;
1897 no:yes:* )
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1899$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1901$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1903$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1905$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1907$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1908( $as_echo "## --------------------------------------- ##
1909## Report this to https://bugs.python.org/ ##
1910## --------------------------------------- ##"
1911 ) | sed "s/^/$as_me: WARNING: /" >&2
1912 ;;
1913esac
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
1916if eval \${$3+:} false; then :
1917 $as_echo_n "(cached) " >&6
1918else
1919 eval "$3=\$ac_header_compiler"
Matthias Kloseb9621712010-04-24 17:59:49 +00001920fi
1921eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02001922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
1924fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
Christian Heimes39258d32021-04-17 11:36:35 +02001927} # ac_fn_c_check_header_mongrel
Matthias Kloseb9621712010-04-24 17:59:49 +00001928
1929# ac_fn_c_try_run LINENO
1930# ----------------------
Christian Heimes39258d32021-04-17 11:36:35 +02001931# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1932# that executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001933ac_fn_c_try_run ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 if { { ac_try="$ac_link"
1937case "(($ac_try" in
1938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1939 *) ac_try_echo=$ac_try;;
1940esac
1941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001942$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 (eval "$ac_link") 2>&5
1944 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02001945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001946 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1947 { { case "(($ac_try" in
1948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1949 *) ac_try_echo=$ac_try;;
1950esac
1951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001952$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 (eval "$ac_try") 2>&5
1954 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02001955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1956 test $ac_status = 0; }; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001957 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001958else
1959 $as_echo "$as_me: program exited with status $ac_status" >&5
1960 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001961sed 's/^/| /' conftest.$ac_ext >&5
1962
1963 ac_retval=$ac_status
1964fi
1965 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001966 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001967 as_fn_set_status $ac_retval
1968
1969} # ac_fn_c_try_run
1970
Christian Heimes39258d32021-04-17 11:36:35 +02001971# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1972# -------------------------------------------------------
1973# Tests whether HEADER exists and can be compiled using the include files in
1974# INCLUDES, setting the cache variable VAR accordingly.
1975ac_fn_c_check_header_compile ()
1976{
1977 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1979$as_echo_n "checking for $2... " >&6; }
1980if eval \${$3+:} false; then :
1981 $as_echo_n "(cached) " >&6
1982else
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986#include <$2>
1987_ACEOF
1988if ac_fn_c_try_compile "$LINENO"; then :
1989 eval "$3=yes"
1990else
1991 eval "$3=no"
1992fi
1993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
1998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1999
2000} # ac_fn_c_check_header_compile
2001
Matthias Kloseb9621712010-04-24 17:59:49 +00002002# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2003# -------------------------------------------
2004# Tests whether TYPE exists after having included INCLUDES, setting cache
2005# variable VAR accordingly.
2006ac_fn_c_check_type ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2010$as_echo_n "checking for $2... " >&6; }
2011if eval \${$3+:} false; then :
2012 $as_echo_n "(cached) " >&6
2013else
Matthias Kloseb9621712010-04-24 17:59:49 +00002014 eval "$3=no"
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
Christian Heimes39258d32021-04-17 11:36:35 +02002019main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002020{
2021if (sizeof ($2))
2022 return 0;
2023 ;
2024 return 0;
2025}
2026_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002027if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
Christian Heimes39258d32021-04-17 11:36:35 +02002032main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002033{
2034if (sizeof (($2)))
2035 return 0;
2036 ;
2037 return 0;
2038}
2039_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002040if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
Christian Heimes39258d32021-04-17 11:36:35 +02002042else
Matthias Kloseb9621712010-04-24 17:59:49 +00002043 eval "$3=yes"
2044fi
Christian Heimes39258d32021-04-17 11:36:35 +02002045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002046fi
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
2049eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2051$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002052 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002053
2054} # ac_fn_c_check_type
2055
Matthias Kloseb9621712010-04-24 17:59:49 +00002056# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2057# --------------------------------------------
2058# Tries to find the compile-time value of EXPR in a program that includes
2059# INCLUDES, setting VAR accordingly. Returns whether the value could be
2060# computed
2061ac_fn_c_compute_int ()
2062{
2063 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2064 if test "$cross_compiling" = yes; then
2065 # Depending upon the size, compute the lo and hi bounds.
2066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
Christian Heimes39258d32021-04-17 11:36:35 +02002070main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002071{
2072static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002080if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002081 ac_lo=0 ac_mid=0
2082 while :; do
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
Christian Heimes39258d32021-04-17 11:36:35 +02002087main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002097if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002098 ac_hi=$ac_mid; break
Christian Heimes39258d32021-04-17 11:36:35 +02002099else
Matthias Kloseb9621712010-04-24 17:59:49 +00002100 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2101 if test $ac_lo -le $ac_mid; then
2102 ac_lo= ac_hi=
2103 break
2104 fi
2105 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2106fi
Christian Heimes39258d32021-04-17 11:36:35 +02002107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002108 done
Christian Heimes39258d32021-04-17 11:36:35 +02002109else
Matthias Kloseb9621712010-04-24 17:59:49 +00002110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h. */
2112$4
2113int
Christian Heimes39258d32021-04-17 11:36:35 +02002114main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002115{
2116static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002117test_array [0] = 0;
2118return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002119
2120 ;
2121 return 0;
2122}
2123_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002124if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002125 ac_hi=-1 ac_mid=-1
2126 while :; do
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130int
Christian Heimes39258d32021-04-17 11:36:35 +02002131main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002132{
2133static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002134test_array [0] = 0;
2135return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002136
2137 ;
2138 return 0;
2139}
2140_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002141if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002142 ac_lo=$ac_mid; break
Christian Heimes39258d32021-04-17 11:36:35 +02002143else
Matthias Kloseb9621712010-04-24 17:59:49 +00002144 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2145 if test $ac_mid -le $ac_hi; then
2146 ac_lo= ac_hi=
2147 break
2148 fi
2149 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2150fi
Christian Heimes39258d32021-04-17 11:36:35 +02002151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002152 done
Christian Heimes39258d32021-04-17 11:36:35 +02002153else
Matthias Kloseb9621712010-04-24 17:59:49 +00002154 ac_lo= ac_hi=
2155fi
Christian Heimes39258d32021-04-17 11:36:35 +02002156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002157fi
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 +00002159# Binary search between lo and hi bounds.
2160while test "x$ac_lo" != "x$ac_hi"; do
2161 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165int
Christian Heimes39258d32021-04-17 11:36:35 +02002166main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002167{
2168static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002169test_array [0] = 0;
2170return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002171
2172 ;
2173 return 0;
2174}
2175_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002176if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 ac_hi=$ac_mid
Christian Heimes39258d32021-04-17 11:36:35 +02002178else
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2180fi
Christian Heimes39258d32021-04-17 11:36:35 +02002181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002182done
2183case $ac_lo in #((
2184?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2185'') ac_retval=1 ;;
2186esac
2187 else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
Christian Heimes39258d32021-04-17 11:36:35 +02002191static long int longval () { return $2; }
2192static unsigned long int ulongval () { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002193#include <stdio.h>
2194#include <stdlib.h>
2195int
Christian Heimes39258d32021-04-17 11:36:35 +02002196main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002197{
2198
2199 FILE *f = fopen ("conftest.val", "w");
2200 if (! f)
2201 return 1;
2202 if (($2) < 0)
2203 {
2204 long int i = longval ();
2205 if (i != ($2))
2206 return 1;
2207 fprintf (f, "%ld", i);
2208 }
2209 else
2210 {
2211 unsigned long int i = ulongval ();
2212 if (i != ($2))
2213 return 1;
2214 fprintf (f, "%lu", i);
2215 }
2216 /* Do not output a trailing newline, as this causes \r\n confusion
2217 on some platforms. */
2218 return ferror (f) || fclose (f) != 0;
2219
2220 ;
2221 return 0;
2222}
2223_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002224if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002225 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02002226else
Matthias Kloseb9621712010-04-24 17:59:49 +00002227 ac_retval=1
2228fi
2229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2230 conftest.$ac_objext conftest.beam conftest.$ac_ext
2231rm -f conftest.val
2232
2233 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235 as_fn_set_status $ac_retval
2236
2237} # ac_fn_c_compute_int
2238
2239# ac_fn_c_check_func LINENO FUNC VAR
2240# ----------------------------------
2241# Tests whether FUNC exists, setting the cache variable VAR accordingly
2242ac_fn_c_check_func ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2246$as_echo_n "checking for $2... " >&6; }
2247if eval \${$3+:} false; then :
2248 $as_echo_n "(cached) " >&6
2249else
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2253 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2254#define $2 innocuous_$2
2255
2256/* System header to define __stub macros and hopefully few prototypes,
Christian Heimes39258d32021-04-17 11:36:35 +02002257 which can conflict with char $2 (); below.
2258 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2259 <limits.h> exists even on freestanding compilers. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002260
Christian Heimes39258d32021-04-17 11:36:35 +02002261#ifdef __STDC__
2262# include <limits.h>
2263#else
2264# include <assert.h>
2265#endif
2266
Matthias Kloseb9621712010-04-24 17:59:49 +00002267#undef $2
2268
2269/* Override any GCC internal prototype to avoid an error.
2270 Use char because int might match the return type of a GCC
2271 builtin and then its argument prototype would still apply. */
2272#ifdef __cplusplus
2273extern "C"
2274#endif
2275char $2 ();
2276/* The GNU C library defines this for functions which it implements
2277 to always fail with ENOSYS. Some functions are actually named
2278 something starting with __ and the normal name is an alias. */
2279#if defined __stub_$2 || defined __stub___$2
2280choke me
2281#endif
2282
2283int
Christian Heimes39258d32021-04-17 11:36:35 +02002284main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002285{
2286return $2 ();
2287 ;
2288 return 0;
2289}
2290_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002291if ac_fn_c_try_link "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002292 eval "$3=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002293else
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 eval "$3=no"
2295fi
Christian Heimes39258d32021-04-17 11:36:35 +02002296rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00002297 conftest$ac_exeext conftest.$ac_ext
2298fi
2299eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2301$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002302 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002303
2304} # ac_fn_c_check_func
2305
Christian Heimes39258d32021-04-17 11:36:35 +02002306# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2307# ---------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002308# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Christian Heimes39258d32021-04-17 11:36:35 +02002309# accordingly.
2310ac_fn_c_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002311{
2312 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2313 as_decl_name=`echo $2|sed 's/ *(.*//'`
2314 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Christian Heimes39258d32021-04-17 11:36:35 +02002315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2316$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2317if eval \${$3+:} false; then :
2318 $as_echo_n "(cached) " >&6
2319else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$4
2323int
Christian Heimes39258d32021-04-17 11:36:35 +02002324main ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002325{
2326#ifndef $as_decl_name
2327#ifdef __cplusplus
2328 (void) $as_decl_use;
2329#else
2330 (void) $as_decl_name;
2331#endif
2332#endif
2333
2334 ;
2335 return 0;
2336}
2337_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002338if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002339 eval "$3=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002340else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002341 eval "$3=no"
2342fi
Christian Heimes39258d32021-04-17 11:36:35 +02002343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002344fi
2345eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002348 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2349
Christian Heimes39258d32021-04-17 11:36:35 +02002350} # ac_fn_c_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002351
Matthias Kloseb9621712010-04-24 17:59:49 +00002352# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2353# ----------------------------------------------------
2354# Tries to find if the field MEMBER exists in type AGGR, after including
2355# INCLUDES, setting cache variable VAR accordingly.
2356ac_fn_c_check_member ()
2357{
2358 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2360$as_echo_n "checking for $2.$3... " >&6; }
2361if eval \${$4+:} false; then :
2362 $as_echo_n "(cached) " >&6
2363else
Matthias Kloseb9621712010-04-24 17:59:49 +00002364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h. */
2366$5
2367int
Christian Heimes39258d32021-04-17 11:36:35 +02002368main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002369{
2370static $2 ac_aggr;
2371if (ac_aggr.$3)
2372return 0;
2373 ;
2374 return 0;
2375}
2376_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002377if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002378 eval "$4=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002379else
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h. */
2382$5
2383int
Christian Heimes39258d32021-04-17 11:36:35 +02002384main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002385{
2386static $2 ac_aggr;
2387if (sizeof ac_aggr.$3)
2388return 0;
2389 ;
2390 return 0;
2391}
2392_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002393if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002394 eval "$4=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002395else
Matthias Kloseb9621712010-04-24 17:59:49 +00002396 eval "$4=no"
2397fi
Christian Heimes39258d32021-04-17 11:36:35 +02002398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002399fi
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
2402eval ac_res=\$$4
Christian Heimes39258d32021-04-17 11:36:35 +02002403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2404$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002405 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002406
2407} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002409This file contains any messages produced by compilers while
2410running configure, to aid debugging if configure makes a mistake.
2411
Pablo Galindod4fe0982020-05-19 03:33:01 +01002412It was created by python $as_me 3.10, which was
Christian Heimes39258d32021-04-17 11:36:35 +02002413generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002414
Christian Heimes39258d32021-04-17 11:36:35 +02002415 $ $0 $@
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
2417_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002419{
2420cat <<_ASUNAME
2421## --------- ##
2422## Platform. ##
2423## --------- ##
2424
2425hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2426uname -m = `(uname -m) 2>/dev/null || echo unknown`
2427uname -r = `(uname -r) 2>/dev/null || echo unknown`
2428uname -s = `(uname -s) 2>/dev/null || echo unknown`
2429uname -v = `(uname -v) 2>/dev/null || echo unknown`
2430
2431/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2432/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2433
2434/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2435/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2436/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002438/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2439/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2440/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2441
2442_ASUNAME
2443
2444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2445for as_dir in $PATH
2446do
2447 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002448 test -z "$as_dir" && as_dir=.
2449 $as_echo "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453} >&5
2454
2455cat >&5 <<_ACEOF
2456
2457
2458## ----------- ##
2459## Core tests. ##
2460## ----------- ##
2461
2462_ACEOF
2463
2464
2465# Keep a trace of the command line.
2466# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002467# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002468# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002469# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002470ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002471ac_configure_args0=
2472ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002473ac_must_keep_next=false
2474for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 for ac_arg
2477 do
2478 case $ac_arg in
2479 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2480 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2481 | -silent | --silent | --silen | --sile | --sil)
2482 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 *\'*)
Christian Heimes39258d32021-04-17 11:36:35 +02002484 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 esac
2486 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002491 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 case $ac_arg in
2494 *=* | --config-cache | -C | -disable-* | --disable-* \
2495 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2496 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2497 | -with-* | --with-* | -without-* | --without-* | --x)
2498 case "$ac_configure_args0 " in
2499 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2500 esac
2501 ;;
2502 -* ) ac_must_keep_next=true ;;
2503 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 ;;
2507 esac
2508 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002509done
Matthias Kloseb9621712010-04-24 17:59:49 +00002510{ ac_configure_args0=; unset ac_configure_args0;}
2511{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002512
2513# When interrupted or exit'd, cleanup temporary files, and complete
2514# config.log. We remove comments because anyway the quotes in there
2515# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516# WARNING: Use '\'' to represent an apostrophe within the trap.
2517# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002518trap 'exit_status=$?
2519 # Save into config.log some information that might help in debugging.
2520 {
2521 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002522
Christian Heimes39258d32021-04-17 11:36:35 +02002523 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528(
2529 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2530 eval ac_val=\$$ac_var
2531 case $ac_val in #(
2532 *${as_nl}*)
2533 case $ac_var in #(
Christian Heimes39258d32021-04-17 11:36:35 +02002534 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2535$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 esac
2537 case $ac_var in #(
2538 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2540 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 esac ;;
2542 esac
2543 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2546 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 "s/'\''/'\''\\\\'\'''\''/g;
2549 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2550 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002551 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002553 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 esac |
2555 sort
2556)
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002558
Christian Heimes39258d32021-04-17 11:36:35 +02002559 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002560## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 echo
2563 for ac_var in $ac_subst_vars
2564 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 eval ac_val=\$$ac_var
2566 case $ac_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002567 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac
Christian Heimes39258d32021-04-17 11:36:35 +02002569 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 done | sort
2571 echo
2572
2573 if test -n "$ac_subst_files"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002574 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 echo
2578 for ac_var in $ac_subst_files
2579 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 eval ac_val=\$$ac_var
2581 case $ac_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002582 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 esac
Christian Heimes39258d32021-04-17 11:36:35 +02002584 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 done | sort
2586 echo
2587 fi
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 if test -s confdefs.h; then
Christian Heimes39258d32021-04-17 11:36:35 +02002590 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002591## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002592## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
2596 fi
2597 test "$ac_signal" != 0 &&
Christian Heimes39258d32021-04-17 11:36:35 +02002598 $as_echo "$as_me: caught signal $ac_signal"
2599 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 rm -f core *.core core.conftest.* &&
2602 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002605for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002607done
2608ac_signal=0
2609
2610# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002612
Christian Heimes39258d32021-04-17 11:36:35 +02002613$as_echo "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615# Predefined preprocessor variables.
2616
Christian Heimes39258d32021-04-17 11:36:35 +02002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_NAME "$PACKAGE_NAME"
2619_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002620
Christian Heimes39258d32021-04-17 11:36:35 +02002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2623_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002624
Christian Heimes39258d32021-04-17 11:36:35 +02002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_VERSION "$PACKAGE_VERSION"
2627_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002628
Christian Heimes39258d32021-04-17 11:36:35 +02002629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_STRING "$PACKAGE_STRING"
2631_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002632
Christian Heimes39258d32021-04-17 11:36:35 +02002633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2635_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002636
Christian Heimes39258d32021-04-17 11:36:35 +02002637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_URL "$PACKAGE_URL"
2639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00002640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641
2642# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002643# Prefer an explicitly selected file to automatically selected ones.
Christian Heimes39258d32021-04-17 11:36:35 +02002644ac_site_file1=NONE
2645ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646if test -n "$CONFIG_SITE"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002647 # We do not want a PATH search for config.site.
2648 case $CONFIG_SITE in #((
2649 -*) ac_site_file1=./$CONFIG_SITE;;
2650 */*) ac_site_file1=$CONFIG_SITE;;
2651 *) ac_site_file1=./$CONFIG_SITE;;
2652 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653elif test "x$prefix" != xNONE; then
Christian Heimes39258d32021-04-17 11:36:35 +02002654 ac_site_file1=$prefix/share/config.site
2655 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656else
Christian Heimes39258d32021-04-17 11:36:35 +02002657 ac_site_file1=$ac_default_prefix/share/config.site
2658 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659fi
Christian Heimes39258d32021-04-17 11:36:35 +02002660for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661do
Christian Heimes39258d32021-04-17 11:36:35 +02002662 test "x$ac_site_file" = xNONE && continue
2663 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2665$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002667 . "$ac_site_file" \
Christian Heimes39258d32021-04-17 11:36:35 +02002668 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002670as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002671See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672 fi
2673done
2674
2675if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 # Some versions of bash will fail to source /dev/null (special files
2677 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2678 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002679 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2680$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2683 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 esac
2685 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686else
Christian Heimes39258d32021-04-17 11:36:35 +02002687 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2688$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 >$cache_file
2690fi
2691
2692# Check that the precious variables saved in the cache have kept the same
2693# value.
2694ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2697 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2699 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 case $ac_old_set,$ac_new_set in
2701 set,)
Christian Heimes39258d32021-04-17 11:36:35 +02002702 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2703$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 ac_cache_corrupted=: ;;
2705 ,set)
Christian Heimes39258d32021-04-17 11:36:35 +02002706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2707$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 ac_cache_corrupted=: ;;
2709 ,);;
2710 *)
2711 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 # differences in whitespace do not lead to failure.
2713 ac_old_val_w=`echo x $ac_old_val`
2714 ac_new_val_w=`echo x $ac_new_val`
2715 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2717$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002718 ac_cache_corrupted=:
2719 else
Christian Heimes39258d32021-04-17 11:36:35 +02002720 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2721$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 eval $ac_var=\$ac_old_val
2723 fi
Christian Heimes39258d32021-04-17 11:36:35 +02002724 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2725$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2727$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 fi;;
2729 esac
2730 # Pass precious variables to config.status.
2731 if test "$ac_new_set" = set; then
2732 case $ac_new_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002733 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 *) ac_arg=$ac_var=$ac_new_val ;;
2735 esac
2736 case " $ac_configure_args " in
2737 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 esac
2740 fi
2741done
2742if $ac_cache_corrupted; then
Christian Heimes39258d32021-04-17 11:36:35 +02002743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2746$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2747 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002749## -------------------- ##
2750## Main body of script. ##
2751## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752
Guido van Rossum7f43da71994-08-01 12:15:30 +00002753ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002754ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2757ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758
Guido van Rossum627b2d71993-12-24 10:39:16 +00002759
Michael W. Hudson54241132001-12-07 15:38:26 +00002760
Trent Nelson4d4ec652012-10-16 08:51:24 -04002761
Christian Heimesff5be6e2018-01-20 13:19:21 +01002762
2763
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002764if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002765 # If we're building out-of-tree, we need to make sure the following
2766 # resources get picked up before their $srcdir counterparts.
2767 # Objects/ -> typeslots.inc
Victor Stinner94faa072021-03-23 20:47:40 +01002768 # Include/ -> Python.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002769 # Python/ -> importlib.h
2770 # (A side effect of this is that these resources will automatically be
2771 # regenerated when building out-of-tree, regardless of whether or not
2772 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2773 # off.)
2774 BASECPPFLAGS="-IObjects -IInclude -IPython"
2775else
2776 BASECPPFLAGS=""
2777fi
2778
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779
2780
2781
2782
Victor Stinner9ed34a82017-05-02 22:35:58 +02002783if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002784then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002785# Extract the first word of "git", so it can be a program name with args.
2786set dummy git; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02002787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2788$as_echo_n "checking for $ac_word... " >&6; }
2789if ${ac_cv_prog_HAS_GIT+:} false; then :
2790 $as_echo_n "(cached) " >&6
2791else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002792 if test -n "$HAS_GIT"; then
2793 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002794else
2795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2796for as_dir in $PATH
2797do
2798 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002799 test -z "$as_dir" && as_dir=.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002800 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02002801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002802 ac_cv_prog_HAS_GIT="found"
Christian Heimes39258d32021-04-17 11:36:35 +02002803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804 break 2
2805 fi
2806done
2807 done
2808IFS=$as_save_IFS
2809
Ned Deily5c4b0d02017-03-04 00:19:55 -05002810 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002811fi
2812fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002813HAS_GIT=$ac_cv_prog_HAS_GIT
2814if test -n "$HAS_GIT"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2816$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002817else
Christian Heimes39258d32021-04-17 11:36:35 +02002818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2819$as_echo "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002820fi
2821
2822
2823else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002824HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002825fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002826if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827then
Xiang Zhang4c855572018-08-20 22:36:19 +08002828 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2829 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2830 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002831else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002832 GITVERSION=""
2833 GITTAG=""
2834 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002835fi
2836
2837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002839
2840
Christian Heimes39258d32021-04-17 11:36:35 +02002841ac_aux_dir=
2842for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2843 if test -f "$ac_dir/install-sh"; then
2844 ac_aux_dir=$ac_dir
2845 ac_install_sh="$ac_aux_dir/install-sh -c"
2846 break
2847 elif test -f "$ac_dir/install.sh"; then
2848 ac_aux_dir=$ac_dir
2849 ac_install_sh="$ac_aux_dir/install.sh -c"
2850 break
2851 elif test -f "$ac_dir/shtool"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/shtool install -c"
2854 break
2855 fi
2856done
2857if test -z "$ac_aux_dir"; then
2858 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2859fi
2860
2861# These three variables are undocumented and unsupported,
2862# and are intended to be withdrawn in a future Autoconf release.
2863# They can cause serious problems if a builder's source tree is in a directory
2864# whose full name contains unusual characters.
2865ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2866ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2867ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002868
2869
Christian Heimes39258d32021-04-17 11:36:35 +02002870# Make sure we can run config.sub.
2871$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2872 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002873
Christian Heimes39258d32021-04-17 11:36:35 +02002874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2875$as_echo_n "checking build system type... " >&6; }
2876if ${ac_cv_build+:} false; then :
2877 $as_echo_n "(cached) " >&6
2878else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002879 ac_build_alias=$build_alias
2880test "x$ac_build_alias" = x &&
Christian Heimes39258d32021-04-17 11:36:35 +02002881 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002882test "x$ac_build_alias" = x &&
2883 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Christian Heimes39258d32021-04-17 11:36:35 +02002884ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002886
2887fi
Christian Heimes39258d32021-04-17 11:36:35 +02002888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2889$as_echo "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002890case $ac_cv_build in
2891*-*-*) ;;
2892*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2893esac
2894build=$ac_cv_build
2895ac_save_IFS=$IFS; IFS='-'
2896set x $ac_cv_build
2897shift
2898build_cpu=$1
2899build_vendor=$2
2900shift; shift
2901# Remember, the first character of IFS is used to create $*,
2902# except with old shells:
2903build_os=$*
2904IFS=$ac_save_IFS
2905case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2906
2907
Christian Heimes39258d32021-04-17 11:36:35 +02002908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2909$as_echo_n "checking host system type... " >&6; }
2910if ${ac_cv_host+:} false; then :
2911 $as_echo_n "(cached) " >&6
2912else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002913 if test "x$host_alias" = x; then
2914 ac_cv_host=$ac_cv_build
2915else
Christian Heimes39258d32021-04-17 11:36:35 +02002916 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2917 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002918fi
2919
2920fi
Christian Heimes39258d32021-04-17 11:36:35 +02002921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2922$as_echo "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002923case $ac_cv_host in
2924*-*-*) ;;
2925*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2926esac
2927host=$ac_cv_host
2928ac_save_IFS=$IFS; IFS='-'
2929set x $ac_cv_host
2930shift
2931host_cpu=$1
2932host_vendor=$2
2933shift; shift
2934# Remember, the first character of IFS is used to create $*,
2935# except with old shells:
2936host_os=$*
2937IFS=$ac_save_IFS
2938case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2939
2940
2941
doko@python.orga10e4a92013-01-25 18:45:12 +01002942
2943
Ned Deilyfcbc2462014-08-22 13:32:49 -07002944# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2945rm -f pybuilddir.txt
2946
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002947for ac_prog in python$PACKAGE_VERSION python3 python
2948do
2949 # Extract the first word of "$ac_prog", so it can be a program name with args.
2950set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02002951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2952$as_echo_n "checking for $ac_word... " >&6; }
2953if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2954 $as_echo_n "(cached) " >&6
2955else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002956 if test -n "$PYTHON_FOR_REGEN"; then
2957 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002958else
2959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2960for as_dir in $PATH
2961do
2962 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002963 test -z "$as_dir" && as_dir=.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002964 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02002965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002966 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02002967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002968 break 2
2969 fi
2970done
2971 done
2972IFS=$as_save_IFS
2973
2974fi
2975fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002976PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2977if test -n "$PYTHON_FOR_REGEN"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2979$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002980else
Christian Heimes39258d32021-04-17 11:36:35 +02002981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2982$as_echo "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002983fi
2984
2985
Victor Stinnera5c62a82017-05-03 18:21:48 +02002986 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002987done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002988test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002989
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002990
2991
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002992if test "$cross_compiling" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02002993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2994$as_echo_n "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002995 if test -z "$PYTHON_FOR_BUILD"; then
2996 for interp in python$PACKAGE_VERSION python3 python; do
2997 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002998 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002999 break
3000 fi
3001 interp=
3002 done
3003 if test x$interp = x; then
3004 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3005 fi
Christian Heimes39258d32021-04-17 11:36:35 +02003006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3007$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003008 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003009 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003010elif test "$cross_compiling" = maybe; then
3011 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003012else
3013 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3014fi
3015
3016
Martin v. Löwis11437992002-04-12 09:54:03 +00003017
Benjamin Petersond23f8222009-04-05 19:13:16 +00003018if test "$prefix" != "/"; then
3019 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3020fi
3021
3022
Martin v. Löwis11437992002-04-12 09:54:03 +00003023
3024
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003025# We don't use PACKAGE_ variables, and they cause conflicts
3026# with other autoconf-based packages that include Python.h
3027grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3028rm confdefs.h
3029mv confdefs.h.new confdefs.h
3030
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003031
Pablo Galindod4fe0982020-05-19 03:33:01 +01003032VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003033
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003034# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003035
3036SOVERSION=1.0
3037
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003038# The later defininition of _XOPEN_SOURCE disables certain features
3039# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3040
Christian Heimes39258d32021-04-17 11:36:35 +02003041$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003042
3043
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3046# them.
3047
Christian Heimes39258d32021-04-17 11:36:35 +02003048$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003049
3050
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003051# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3052# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3053# them.
3054
Christian Heimes39258d32021-04-17 11:36:35 +02003055$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003056
3057
Martin v. Löwisd6320502004-08-12 13:45:08 +00003058# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003059# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3060# them.
3061
Christian Heimes39258d32021-04-17 11:36:35 +02003062$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063
3064
3065
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003066define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003067
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003068# Arguments passed to configure.
3069
3070CONFIG_ARGS="$ac_configure_args"
3071
Christian Heimes39258d32021-04-17 11:36:35 +02003072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3073$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074# Check whether --enable-universalsdk was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003075if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077 case $enableval in
3078 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003079 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003080 # information
3081 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003082 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003084 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3085 if test ! -d "${enableval}"
3086 then
3087 enableval=/
3088 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003089 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090 ;;
3091 esac
3092 case $enableval in
3093 no)
3094 UNIVERSALSDK=
3095 enable_universalsdk=
3096 ;;
3097 *)
3098 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003099 if test ! -d "${UNIVERSALSDK}"
3100 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003101 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 ;;
3104 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003105
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003106
Christian Heimes39258d32021-04-17 11:36:35 +02003107else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003108
3109 UNIVERSALSDK=
3110 enable_universalsdk=
3111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003113
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003114if test -n "${UNIVERSALSDK}"
3115then
Christian Heimes39258d32021-04-17 11:36:35 +02003116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3117$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003118else
Christian Heimes39258d32021-04-17 11:36:35 +02003119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3120$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003121fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003124
Ned Deily87adb6e2013-10-18 21:09:56 -07003125ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003126
Ned Deilycbfb9a52012-06-23 16:02:19 -07003127# For backward compatibility reasons we prefer to select '32-bit' if available,
3128# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003129UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003130if test "`uname -s`" = "Darwin"
3131then
3132 if test -n "${UNIVERSALSDK}"
3133 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003134 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003135 then
3136 UNIVERSAL_ARCHS="intel"
3137 fi
3138 fi
3139fi
3140
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003141
Christian Heimes39258d32021-04-17 11:36:35 +02003142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3143$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
3145# Check whether --with-universal-archs was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003146if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003147 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003148 UNIVERSAL_ARCHS="$withval"
3149
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150fi
3151
Ned Deily87adb6e2013-10-18 21:09:56 -07003152if test -n "${UNIVERSALSDK}"
3153then
Christian Heimes39258d32021-04-17 11:36:35 +02003154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3155$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003156else
Christian Heimes39258d32021-04-17 11:36:35 +02003157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3158$as_echo "no" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003159fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003160
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003161
3162# Check whether --with-framework-name was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003163if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003164 withval=$with_framework_name;
3165 PYTHONFRAMEWORK=${withval}
3166 PYTHONFRAMEWORKDIR=${withval}.framework
3167 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3168
Christian Heimes39258d32021-04-17 11:36:35 +02003169else
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003170
3171 PYTHONFRAMEWORK=Python
3172 PYTHONFRAMEWORKDIR=Python.framework
3173 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3174
3175fi
3176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177# Check whether --enable-framework was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003178if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003180 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003181 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003182 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003183 esac
3184 case $enableval in
3185 no)
3186 PYTHONFRAMEWORK=
3187 PYTHONFRAMEWORKDIR=no-framework
3188 PYTHONFRAMEWORKPREFIX=
3189 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 FRAMEWORKINSTALLFIRST=
3191 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003192 FRAMEWORKALTINSTALLFIRST=
3193 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003194 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003195 if test "x${prefix}" = "xNONE"; then
3196 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3197 else
3198 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3199 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003200 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003201 ;;
3202 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003203 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003204 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003206 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003207 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3208 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003209 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003210 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003212 if test "x${prefix}" = "xNONE" ; then
3213 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003214
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 else
3216 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3217 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003218
3219 case "${enableval}" in
3220 /System*)
3221 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3222 if test "${prefix}" = "NONE" ; then
3223 # See below
3224 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3225 fi
3226 ;;
3227
3228 /Library*)
3229 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3230 ;;
3231
3232 */Library/Frameworks)
3233 MDIR="`dirname "${enableval}"`"
3234 MDIR="`dirname "${MDIR}"`"
3235 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3236
3237 if test "${prefix}" = "NONE"; then
3238 # User hasn't specified the
3239 # --prefix option, but wants to install
3240 # the framework in a non-default location,
3241 # ensure that the compatibility links get
3242 # installed relative to that prefix as well
3243 # instead of in /usr/local.
3244 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3245 fi
3246 ;;
3247
3248 *)
3249 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3250 ;;
3251 esac
3252
Jack Jansen127e56e2001-09-11 14:41:54 +00003253 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003255 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003256 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003260
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003261 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3262
3263 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3264
Jack Jansene578a632001-08-15 01:27:14 +00003265 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003266
Christian Heimes39258d32021-04-17 11:36:35 +02003267else
Martin v. Löwis11437992002-04-12 09:54:03 +00003268
Jack Jansene578a632001-08-15 01:27:14 +00003269 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003270 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003271 PYTHONFRAMEWORKPREFIX=
3272 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273 FRAMEWORKINSTALLFIRST=
3274 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003275 FRAMEWORKALTINSTALLFIRST=
3276 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003277 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003278 if test "x${prefix}" = "xNONE" ; then
3279 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3280 else
3281 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3282 fi
Jack Jansene578a632001-08-15 01:27:14 +00003283 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286fi
3287
Thomas Wouters477c8d52006-05-27 19:21:47 +00003288
3289
Michael W. Hudson54241132001-12-07 15:38:26 +00003290
3291
3292
3293
Jack Jansene578a632001-08-15 01:27:14 +00003294
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003295
3296
3297
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003298
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003299
Ned Deilyb8f944f2013-11-21 22:42:25 -08003300
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003301
Christian Heimes39258d32021-04-17 11:36:35 +02003302cat >>confdefs.h <<_ACEOF
3303#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
3304_ACEOF
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003305
3306
Jack Jansene578a632001-08-15 01:27:14 +00003307##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003308## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003309## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003310##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003311# Set name for machine-dependent library files
3312
Christian Heimes39258d32021-04-17 11:36:35 +02003313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3314$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003315if test -z "$MACHDEP"
3316then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 # avoid using uname for cross builds
3318 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003319 # ac_sys_system and ac_sys_release are used for setting
3320 # a lot of different things including 'define_xopen_source'
3321 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003323 *-*-linux-android*)
3324 ac_sys_system=Linux-android
3325 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003326 *-*-linux*)
3327 ac_sys_system=Linux
3328 ;;
3329 *-*-cygwin*)
3330 ac_sys_system=Cygwin
3331 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003332 *-*-vxworks*)
3333 ac_sys_system=VxWorks
3334 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003335 *)
3336 # for now, limit cross builds to known configurations
3337 MACHDEP="unknown"
3338 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3339 esac
3340 ac_sys_release=
3341 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003342 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003343 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003344 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003345 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003346 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003347 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003349 fi
3350 ac_md_system=`echo $ac_sys_system |
3351 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3352 ac_md_release=`echo $ac_sys_release |
3353 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3354 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003355
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003356 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003357 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003358 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003359 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003360 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003361 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003362 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003363fi
Christian Heimes39258d32021-04-17 11:36:35 +02003364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3365$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003366
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003367
3368if test "$cross_compiling" = yes; then
3369 case "$host" in
3370 *-*-linux*)
3371 case "$host_cpu" in
3372 arm*)
3373 _host_cpu=arm
3374 ;;
3375 *)
3376 _host_cpu=$host_cpu
3377 esac
3378 ;;
3379 *-*-cygwin*)
3380 _host_cpu=
3381 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003382 *-*-vxworks*)
3383 _host_cpu=$host_cpu
3384 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003385 *)
3386 # for now, limit cross builds to known configurations
3387 MACHDEP="unknown"
3388 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3389 esac
3390 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3391fi
3392
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3394# disable features if it is defined, without any means to access these
3395# features as extensions. For these systems, we skip the definition of
3396# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3397# some feature, make sure there is no alternative way to access this
3398# feature. Also, when using wildcards, make sure you have verified the
3399# need for not defining _XOPEN_SOURCE on all systems matching the
3400# wildcard, and that the wildcard does not include future systems
3401# (which may remove their limitations).
3402case $ac_sys_system/$ac_sys_release in
3403 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3404 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003405 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003406 # In addition, Stefan Krah confirms that issue #1244610 exists through
3407 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003408 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003409 define_xopen_source=no
3410 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3411 # also defined. This can be overridden by defining _BSD_SOURCE
3412 # As this has a different meaning on Linux, only define it on OpenBSD
3413
Christian Heimes39258d32021-04-17 11:36:35 +02003414$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003415
3416 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003417 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003418 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3419 # also defined. This can be overridden by defining _BSD_SOURCE
3420 # As this has a different meaning on Linux, only define it on OpenBSD
3421
Christian Heimes39258d32021-04-17 11:36:35 +02003422$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003423
3424 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003425 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3426 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3427 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003428 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003429 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003430 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3431 # request to enable features supported by the standard as a request
3432 # to disable features not supported by the standard. The best way
3433 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3434 # entirely and define __EXTENSIONS__ instead.
3435 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003436 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003437 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3438 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003439 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003440 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003441 define_xopen_source=no;;
3442 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003443 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003444 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003445 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003446 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3447 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3448 # identifies itself as Darwin/7.*
3449 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3450 # disables platform specific features beyond repair.
3451 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3452 # has no effect, don't bother defining them
3453 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003454 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003455 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003456 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003457 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3458 # defining NI_NUMERICHOST.
3459 QNX/6.3.2)
3460 define_xopen_source=no
3461 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003462 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3463 # in network headers still using system V types.
3464 VxWorks/*)
3465 define_xopen_source=no
3466 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003467
Ian Nortona9edf442020-02-14 03:09:11 +00003468 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3469 # chroot() and other functions
3470 hp*|HP*)
3471 define_xopen_source=no
3472 ;;
3473
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003474esac
3475
3476if test $define_xopen_source = yes
3477then
Victor Stinner14d098d2011-09-07 22:29:43 +02003478 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003479
Christian Heimes39258d32021-04-17 11:36:35 +02003480$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003481
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003482
3483 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3484 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3485 # several APIs are not declared. Since this is also needed in some
3486 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003487
Christian Heimes39258d32021-04-17 11:36:35 +02003488$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003489
3490
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003491
Christian Heimes39258d32021-04-17 11:36:35 +02003492$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003493
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003494fi
3495
Christian Heimes647cd872013-12-07 23:39:33 +01003496# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3497case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003498 hp*|HP*)
3499 define_stdc_a1=yes;;
3500 *)
3501 define_stdc_a1=no;;
3502esac
3503
3504if test $define_stdc_a1 = yes
3505then
Christian Heimes647cd872013-12-07 23:39:33 +01003506
Christian Heimes39258d32021-04-17 11:36:35 +02003507$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
Christian Heimes647cd872013-12-07 23:39:33 +01003508
Christian Heimesb02bcae2013-12-08 15:21:08 +01003509fi
Christian Heimes647cd872013-12-07 23:39:33 +01003510
Jack Jansen6b08a402004-06-03 12:41:45 +00003511# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3512# it may influence the way we can build extensions, so distutils
3513# needs to check it
3514
Thomas Wouters477c8d52006-05-27 19:21:47 +00003515
Jack Jansen6b08a402004-06-03 12:41:45 +00003516CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003517EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003518
Guido van Rossum627b2d71993-12-24 10:39:16 +00003519# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003520
3521# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3522# for debug/optimization stuff. BASECFLAGS is for flags that are required
3523# just to get things to compile and link. Users are free to override OPT
3524# when running configure or make. The build should not break if they do.
3525# BASECFLAGS should generally not be messed with, however.
3526
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527# If the user switches compilers, we can't believe the cache
3528if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3529then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003530 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003531(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003532fi
3533
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003534# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3535# when the compiler supports them, but we don't always want -O2, and
3536# we set -g later.
3537if test -z "$CFLAGS"; then
3538 CFLAGS=
3539fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540
3541if test "$ac_sys_system" = "Darwin"
3542then
3543 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003544 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003545 # information
3546 if test -z "${CC}"
3547 then
3548 found_gcc=
3549 found_clang=
3550 as_save_IFS=$IFS; IFS=:
3551 for as_dir in $PATH
3552 do
3553 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003554 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003555 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003556 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003557 fi
3558 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003559 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003560 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003561 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003562 fi
3563 fi
3564 done
3565 IFS=$as_save_IFS
3566
3567 if test -n "$found_gcc" -a -n "$found_clang"
3568 then
3569 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3570 then
Christian Heimes39258d32021-04-17 11:36:35 +02003571 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3572$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003573 CC="$found_clang"
3574 CXX="$found_clang++"
3575 fi
3576
3577
3578 elif test -z "$found_gcc" -a -n "$found_clang"
3579 then
Christian Heimes39258d32021-04-17 11:36:35 +02003580 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3581$as_echo "$as_me: No GCC found, use CLANG" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003582 CC="$found_clang"
3583 CXX="$found_clang++"
3584
3585 elif test -z "$found_gcc" -a -z "$found_clang"
3586 then
3587 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3588 if test -n "${found_clang}"
3589 then
Christian Heimes39258d32021-04-17 11:36:35 +02003590 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3591$as_echo "$as_me: Using clang from Xcode.app" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003592 CC="${found_clang}"
3593 CXX="`/usr/bin/xcrun -find clang++`"
3594
3595 # else: use default behaviour
3596 fi
3597 fi
3598 fi
3599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003600ac_ext=c
3601ac_cpp='$CPP $CPPFLAGS'
3602ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3603ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3604ac_compiler_gnu=$ac_cv_c_compiler_gnu
3605if test -n "$ac_tool_prefix"; then
3606 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3607set dummy ${ac_tool_prefix}gcc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3609$as_echo_n "checking for $ac_word... " >&6; }
3610if ${ac_cv_prog_CC+:} false; then :
3611 $as_echo_n "(cached) " >&6
3612else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003613 if test -n "$CC"; then
3614 ac_cv_prog_CC="$CC" # Let the user override the test.
3615else
Martin v. Löwis11437992002-04-12 09:54:03 +00003616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617for as_dir in $PATH
3618do
3619 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003620 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Christian Heimes39258d32021-04-17 11:36:35 +02003624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 break 2
3626 fi
3627done
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003630
Jack Jansendd19cf82001-12-06 22:36:17 +00003631fi
3632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003633CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003634if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3636$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003637else
Christian Heimes39258d32021-04-17 11:36:35 +02003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3639$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640fi
3641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644if test -z "$ac_cv_prog_CC"; then
3645 ac_ct_CC=$CC
3646 # Extract the first word of "gcc", so it can be a program name with args.
3647set dummy gcc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
3650if ${ac_cv_prog_ac_ct_CC+:} false; then :
3651 $as_echo_n "(cached) " >&6
3652else
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 if test -n "$ac_ct_CC"; then
3654 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3655else
3656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003660 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 ac_cv_prog_ac_ct_CC="gcc"
Christian Heimes39258d32021-04-17 11:36:35 +02003664 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 break 2
3666 fi
3667done
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003670
3671fi
3672fi
3673ac_ct_CC=$ac_cv_prog_ac_ct_CC
3674if test -n "$ac_ct_CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3676$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
Christian Heimes39258d32021-04-17 11:36:35 +02003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680fi
3681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 if test "x$ac_ct_CC" = x; then
3683 CC=""
3684 else
3685 case $cross_compiling:$ac_tool_warned in
3686yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02003687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689ac_tool_warned=yes ;;
3690esac
3691 CC=$ac_ct_CC
3692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693else
3694 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003695fi
3696
Jack Jansendd19cf82001-12-06 22:36:17 +00003697if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698 if test -n "$ac_tool_prefix"; then
3699 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003700set dummy ${ac_tool_prefix}cc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3702$as_echo_n "checking for $ac_word... " >&6; }
3703if ${ac_cv_prog_CC+:} false; then :
3704 $as_echo_n "(cached) " >&6
3705else
Jack Jansendd19cf82001-12-06 22:36:17 +00003706 if test -n "$CC"; then
3707 ac_cv_prog_CC="$CC" # Let the user override the test.
3708else
Martin v. Löwis11437992002-04-12 09:54:03 +00003709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710for as_dir in $PATH
3711do
3712 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 ac_cv_prog_CC="${ac_tool_prefix}cc"
Christian Heimes39258d32021-04-17 11:36:35 +02003717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 break 2
3719 fi
3720done
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003723
3724fi
3725fi
3726CC=$ac_cv_prog_CC
3727if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3729$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003730else
Christian Heimes39258d32021-04-17 11:36:35 +02003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3732$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733fi
3734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738if test -z "$CC"; then
3739 # Extract the first word of "cc", so it can be a program name with args.
3740set dummy cc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742$as_echo_n "checking for $ac_word... " >&6; }
3743if ${ac_cv_prog_CC+:} false; then :
3744 $as_echo_n "(cached) " >&6
3745else
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 if test -n "$CC"; then
3747 ac_cv_prog_CC="$CC" # Let the user override the test.
3748else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH
3752do
3753 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003754 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3757 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 ac_prog_rejected=yes
3759 continue
3760 fi
3761 ac_cv_prog_CC="cc"
Christian Heimes39258d32021-04-17 11:36:35 +02003762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 break 2
3764 fi
3765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769if test $ac_prog_rejected = yes; then
3770 # We found a bogon in the path, so make sure we never use it.
3771 set dummy $ac_cv_prog_CC
3772 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 # We chose a different compiler from the bogus one.
3775 # However, it has the same basename, so the bogon will be chosen
3776 # first if we set CC to just the basename; use the full file name.
3777 shift
Christian Heimes39258d32021-04-17 11:36:35 +02003778 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779 fi
3780fi
3781fi
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3786$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787else
Christian Heimes39258d32021-04-17 11:36:35 +02003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3789$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790fi
3791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
3794if test -z "$CC"; then
3795 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 do
3798 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3799set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
3802if ${ac_cv_prog_CC+:} false; then :
3803 $as_echo_n "(cached) " >&6
3804else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003805 if test -n "$CC"; then
3806 ac_cv_prog_CC="$CC" # Let the user override the test.
3807else
Martin v. Löwis11437992002-04-12 09:54:03 +00003808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02003816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003818 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823fi
3824fi
3825CC=$ac_cv_prog_CC
3826if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3828$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Christian Heimes39258d32021-04-17 11:36:35 +02003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003832fi
3833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$CC" && break
3836 done
3837fi
3838if test -z "$CC"; then
3839 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003841do
3842 # Extract the first word of "$ac_prog", so it can be a program name with args.
3843set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3845$as_echo_n "checking for $ac_word... " >&6; }
3846if ${ac_cv_prog_ac_ct_CC+:} false; then :
3847 $as_echo_n "(cached) " >&6
3848else
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 if test -n "$ac_ct_CC"; then
3850 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3851else
3852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853for as_dir in $PATH
3854do
3855 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003856 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 ac_cv_prog_ac_ct_CC="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02003860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 break 2
3862 fi
3863done
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003866
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868fi
3869ac_ct_CC=$ac_cv_prog_ac_ct_CC
3870if test -n "$ac_ct_CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3872$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003873else
Christian Heimes39258d32021-04-17 11:36:35 +02003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3875$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878
Martin v. Löwis11437992002-04-12 09:54:03 +00003879 test -n "$ac_ct_CC" && break
3880done
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882 if test "x$ac_ct_CC" = x; then
3883 CC=""
3884 else
3885 case $cross_compiling:$ac_tool_warned in
3886yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02003887{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3888$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889ac_tool_warned=yes ;;
3890esac
3891 CC=$ac_ct_CC
3892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003893fi
3894
3895fi
3896
3897
Christian Heimes39258d32021-04-17 11:36:35 +02003898test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003900as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003901See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003902
3903# Provide some information about the compiler.
Christian Heimes39258d32021-04-17 11:36:35 +02003904$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003905set X $ac_compile
3906ac_compiler=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003907for ac_option in --version -v -V -qversion; do
Matthias Kloseb9621712010-04-24 17:59:49 +00003908 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909case "(($ac_try" in
3910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3911 *) ac_try_echo=$ac_try;;
3912esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02003914$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 if test -s conftest.err; then
3918 sed '10a\
3919... rest of stderr output deleted ...
3920 10q' conftest.err >conftest.er1
3921 cat conftest.er1 >&5
3922 fi
3923 rm -f conftest.er1 conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02003924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 test $ac_status = 0; }
3926done
Martin v. Löwis11437992002-04-12 09:54:03 +00003927
Matthias Kloseb9621712010-04-24 17:59:49 +00003928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003930
Martin v. Löwis11437992002-04-12 09:54:03 +00003931int
Christian Heimes39258d32021-04-17 11:36:35 +02003932main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00003933{
3934
3935 ;
3936 return 0;
3937}
3938_ACEOF
3939ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003940ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003941# Try to create an executable without -o first, disregard a.out.
3942# It will help us diagnose broken compilers, and finding out an intuition
3943# of exeext.
Christian Heimes39258d32021-04-17 11:36:35 +02003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3945$as_echo_n "checking whether the C compiler works... " >&6; }
3946ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Matthias Kloseb9621712010-04-24 17:59:49 +00003947
3948# The possible output files:
3949ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951ac_rmfiles=
3952for ac_file in $ac_files
3953do
3954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3957 esac
3958done
3959rm -f $ac_rmfiles
3960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02003967$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02003970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3973# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3974# in a Makefile. We should not override ac_cv_exeext if it was cached,
3975# so that the user can short-circuit this test for compilers unknown to
3976# Autoconf.
3977for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003978do
3979 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982 ;;
3983 [ab].out )
3984 # We found the default executable, but exeext='' is most
3985 # certainly right.
3986 break;;
3987 *.* )
Christian Heimes39258d32021-04-17 11:36:35 +02003988 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 then :; else
3990 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3991 fi
3992 # We set ac_cv_exeext here because the later test for it is not
3993 # safe: cross compilers may not add the suffix if given an `-o'
3994 # argument, so we may need to know it at that point already.
3995 # Even if this section looks crufty: it has the advantage of
3996 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997 break;;
3998 * )
3999 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 esac
4001done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002test "$ac_cv_exeext" = no && ac_cv_exeext=
4003
Christian Heimes39258d32021-04-17 11:36:35 +02004004else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005 ac_file=''
4006fi
Christian Heimes39258d32021-04-17 11:36:35 +02004007if test -z "$ac_file"; then :
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004011sed 's/^/| /' conftest.$ac_ext >&5
4012
Christian Heimes39258d32021-04-17 11:36:35 +02004013{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004015as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004016See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes39258d32021-04-17 11:36:35 +02004017else
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4019$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004020fi
Christian Heimes39258d32021-04-17 11:36:35 +02004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4022$as_echo_n "checking for C compiler default output file name... " >&6; }
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4024$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026
Matthias Kloseb9621712010-04-24 17:59:49 +00004027rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_clean_files=$ac_clean_files_save
Christian Heimes39258d32021-04-17 11:36:35 +02004029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4030$as_echo_n "checking for suffix of executables... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004031if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004037$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004039 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4043# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4044# work properly (i.e., refer to `conftest.exe'), while it won't with
4045# `rm'.
4046for ac_file in conftest.exe conftest conftest.*; do
4047 test -f "$ac_file" || continue
4048 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4051 break;;
4052 * ) break;;
4053 esac
4054done
Christian Heimes39258d32021-04-17 11:36:35 +02004055else
4056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004058as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004059See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004061rm -f conftest conftest$ac_cv_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02004062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4063$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064
4065rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004066EXEEXT=$ac_cv_exeext
4067ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4069/* end confdefs.h. */
4070#include <stdio.h>
4071int
Christian Heimes39258d32021-04-17 11:36:35 +02004072main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00004073{
4074FILE *f = fopen ("conftest.out", "w");
4075 return ferror (f) || fclose (f) != 0;
4076
4077 ;
4078 return 0;
4079}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004081ac_clean_files="$ac_clean_files conftest.out"
4082# Check that the compiler produces executables we can run. If not, either
4083# the compiler is broken, or we cross compile.
Christian Heimes39258d32021-04-17 11:36:35 +02004084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4085$as_echo_n "checking whether we are cross compiling... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004086if test "$cross_compiling" != yes; then
4087 { { ac_try="$ac_link"
4088case "(($ac_try" in
4089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090 *) ac_try_echo=$ac_try;;
4091esac
4092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004093$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 (eval "$ac_link") 2>&5
4095 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 test $ac_status = 0; }
4098 if { ac_try='./conftest$ac_cv_exeext'
4099 { { case "(($ac_try" in
4100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101 *) ac_try_echo=$ac_try;;
4102esac
4103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004104$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 (eval "$ac_try") 2>&5
4106 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 test $ac_status = 0; }; }; then
4109 cross_compiling=no
4110 else
4111 if test "$cross_compiling" = maybe; then
4112 cross_compiling=yes
4113 else
Christian Heimes39258d32021-04-17 11:36:35 +02004114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4116as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004117If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004118See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 fi
4120 fi
4121fi
Christian Heimes39258d32021-04-17 11:36:35 +02004122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4123$as_echo "$cross_compiling" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004124
4125rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4126ac_clean_files=$ac_clean_files_save
Christian Heimes39258d32021-04-17 11:36:35 +02004127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4128$as_echo_n "checking for suffix of object files... " >&6; }
4129if ${ac_cv_objext+:} false; then :
4130 $as_echo_n "(cached) " >&6
4131else
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133/* end confdefs.h. */
4134
4135int
Christian Heimes39258d32021-04-17 11:36:35 +02004136main ()
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004137{
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004144if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145case "(($ac_try" in
4146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4147 *) ac_try_echo=$ac_try;;
4148esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004150$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004153 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4154 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 for ac_file in conftest.o conftest.obj conftest.*; do
4156 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4160 break;;
4161 esac
4162done
Christian Heimes39258d32021-04-17 11:36:35 +02004163else
4164 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004165sed 's/^/| /' conftest.$ac_ext >&5
4166
Christian Heimes39258d32021-04-17 11:36:35 +02004167{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004169as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004170See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004172rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Christian Heimes39258d32021-04-17 11:36:35 +02004174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4175$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004176OBJEXT=$ac_cv_objext
4177ac_objext=$OBJEXT
Christian Heimes39258d32021-04-17 11:36:35 +02004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4179$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4180if ${ac_cv_c_compiler_gnu+:} false; then :
4181 $as_echo_n "(cached) " >&6
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004185
Martin v. Löwis11437992002-04-12 09:54:03 +00004186int
Christian Heimes39258d32021-04-17 11:36:35 +02004187main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004188{
4189#ifndef __GNUC__
4190 choke me
4191#endif
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 ac_compiler_gnu=yes
Christian Heimes39258d32021-04-17 11:36:35 +02004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004201fi
Christian Heimes39258d32021-04-17 11:36:35 +02004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_cv_c_compiler_gnu=$ac_compiler_gnu
4204
4205fi
Christian Heimes39258d32021-04-17 11:36:35 +02004206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4207$as_echo "$ac_cv_c_compiler_gnu" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004208if test $ac_compiler_gnu = yes; then
4209 GCC=yes
4210else
4211 GCC=
4212fi
Christian Heimes39258d32021-04-17 11:36:35 +02004213ac_test_CFLAGS=${CFLAGS+set}
Martin v. Löwis11437992002-04-12 09:54:03 +00004214ac_save_CFLAGS=$CFLAGS
Christian Heimes39258d32021-04-17 11:36:35 +02004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4216$as_echo_n "checking whether $CC accepts -g... " >&6; }
4217if ${ac_cv_prog_cc_g+:} false; then :
4218 $as_echo_n "(cached) " >&6
4219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 ac_save_c_werror_flag=$ac_c_werror_flag
4221 ac_c_werror_flag=yes
4222 ac_cv_prog_cc_g=no
4223 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004226
Martin v. Löwis11437992002-04-12 09:54:03 +00004227int
Christian Heimes39258d32021-04-17 11:36:35 +02004228main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 ac_cv_prog_cc_g=yes
Christian Heimes39258d32021-04-17 11:36:35 +02004237else
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 CFLAGS=""
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240/* end confdefs.h. */
4241
4242int
Christian Heimes39258d32021-04-17 11:36:35 +02004243main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004250if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251
Christian Heimes39258d32021-04-17 11:36:35 +02004252else
Matthias Kloseb9621712010-04-24 17:59:49 +00004253 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256/* end confdefs.h. */
4257
4258int
Christian Heimes39258d32021-04-17 11:36:35 +02004259main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260{
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004266if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268fi
Christian Heimes39258d32021-04-17 11:36:35 +02004269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Christian Heimes39258d32021-04-17 11:36:35 +02004271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272fi
Christian Heimes39258d32021-04-17 11:36:35 +02004273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 ac_c_werror_flag=$ac_save_c_werror_flag
4275fi
Christian Heimes39258d32021-04-17 11:36:35 +02004276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4277$as_echo "$ac_cv_prog_cc_g" >&6; }
4278if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280elif test $ac_cv_prog_cc_g = yes; then
4281 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004282 CFLAGS="-g -O2"
4283 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285 fi
4286else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 if test "$GCC" = yes; then
4288 CFLAGS="-O2"
4289 else
4290 CFLAGS=
4291 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292fi
Christian Heimes39258d32021-04-17 11:36:35 +02004293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4294$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4295if ${ac_cv_prog_cc_c89+:} false; then :
4296 $as_echo_n "(cached) " >&6
4297else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004299ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004301/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004302#include <stdarg.h>
4303#include <stdio.h>
4304struct stat;
4305/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4306struct buf { int x; };
4307FILE * (*rcsopen) (struct buf *, struct stat *, int);
4308static char *e (p, i)
4309 char **p;
4310 int i;
4311{
4312 return p[i];
4313}
4314static char *f (char * (*g) (char **, int), char **p, ...)
4315{
4316 char *s;
4317 va_list v;
4318 va_start (v,p);
4319 s = g (p, va_arg (v,int));
4320 va_end (v);
4321 return s;
4322}
4323
4324/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4325 function prototypes and stuff, but not '\xHH' hex character constants.
4326 These don't provoke an error unfortunately, instead are silently treated
4327 as 'x'. The following induces an error, until -std is added to get
4328 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4329 array size at least. It's necessary to write '\x00'==0 to get something
4330 that's true only with -std. */
4331int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4332
4333/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4334 inside strings and character constants. */
4335#define FOO(x) 'x'
4336int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4337
4338int test (int i, double x);
4339struct s1 {int (*f) (int a);};
4340struct s2 {int (*f) (double a);};
4341int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4342int argc;
4343char **argv;
4344int
4345main ()
4346{
4347return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4348 ;
4349 return 0;
4350}
Skip Montanaro6dead952003-09-25 14:50:04 +00004351_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004352for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4353 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004354do
4355 CC="$ac_save_CC $ac_arg"
Christian Heimes39258d32021-04-17 11:36:35 +02004356 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004358fi
Christian Heimes39258d32021-04-17 11:36:35 +02004359rm -f core conftest.err conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004361done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004363CC=$ac_save_CC
Christian Heimes32eba612021-03-19 10:29:25 +01004364
Pablo Galindo53e55292021-04-05 17:38:40 +01004365fi
Christian Heimes39258d32021-04-17 11:36:35 +02004366# AC_CACHE_VAL
4367case "x$ac_cv_prog_cc_c89" in
4368 x)
4369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4370$as_echo "none needed" >&6; } ;;
4371 xno)
4372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4373$as_echo "unsupported" >&6; } ;;
4374 *)
4375 CC="$CC $ac_cv_prog_cc_c89"
4376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4377$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4378esac
4379if test "x$ac_cv_prog_cc_c89" != xno; then :
4380
Matthias Kloseb9621712010-04-24 17:59:49 +00004381fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004382
Martin v. Löwis11437992002-04-12 09:54:03 +00004383ac_ext=c
4384ac_cpp='$CPP $CPPFLAGS'
4385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4387ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004389ac_ext=c
4390ac_cpp='$CPP $CPPFLAGS'
4391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4393ac_compiler_gnu=$ac_cv_c_compiler_gnu
Christian Heimes39258d32021-04-17 11:36:35 +02004394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4395$as_echo_n "checking how to run the C preprocessor... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004396# On Suns, sometimes $CPP names a directory.
4397if test -n "$CPP" && test -d "$CPP"; then
4398 CPP=
4399fi
4400if test -z "$CPP"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004401 if ${ac_cv_prog_CPP+:} false; then :
4402 $as_echo_n "(cached) " >&6
4403else
4404 # Double quotes because CPP needs to be expanded
4405 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004406 do
4407 ac_preproc_ok=false
4408for ac_c_preproc_warn_flag in '' yes
4409do
4410 # Use a header file that comes with gcc, so configuring glibc
4411 # with a fresh cross-compiler works.
Christian Heimes39258d32021-04-17 11:36:35 +02004412 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4413 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004414 # On the NeXT, cc -E runs the code through the compiler's parser,
4415 # not just through cpp. "Syntax error" is here to catch this case.
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004418#ifdef __STDC__
4419# include <limits.h>
4420#else
4421# include <assert.h>
4422#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004423 Syntax error
4424_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004425if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004426
Christian Heimes39258d32021-04-17 11:36:35 +02004427else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004428 # Broken: fails on valid input.
4429continue
4430fi
4431rm -f conftest.err conftest.i conftest.$ac_ext
4432
4433 # OK, works on sane cases. Now check whether nonexistent headers
4434 # can be detected and how.
4435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436/* end confdefs.h. */
4437#include <ac_nonexistent.h>
4438_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004439if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004440 # Broken: success on invalid input.
4441continue
Christian Heimes39258d32021-04-17 11:36:35 +02004442else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004443 # Passes both tests.
4444ac_preproc_ok=:
4445break
4446fi
4447rm -f conftest.err conftest.i conftest.$ac_ext
4448
4449done
4450# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4451rm -f conftest.i conftest.err conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02004452if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004453 break
4454fi
4455
4456 done
4457 ac_cv_prog_CPP=$CPP
4458
4459fi
4460 CPP=$ac_cv_prog_CPP
4461else
4462 ac_cv_prog_CPP=$CPP
4463fi
Christian Heimes39258d32021-04-17 11:36:35 +02004464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4465$as_echo "$CPP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004466ac_preproc_ok=false
4467for ac_c_preproc_warn_flag in '' yes
4468do
4469 # Use a header file that comes with gcc, so configuring glibc
4470 # with a fresh cross-compiler works.
Christian Heimes39258d32021-04-17 11:36:35 +02004471 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4472 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004473 # On the NeXT, cc -E runs the code through the compiler's parser,
4474 # not just through cpp. "Syntax error" is here to catch this case.
4475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4476/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004477#ifdef __STDC__
4478# include <limits.h>
4479#else
4480# include <assert.h>
4481#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004482 Syntax error
4483_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004484if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004485
Christian Heimes39258d32021-04-17 11:36:35 +02004486else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004487 # Broken: fails on valid input.
4488continue
4489fi
4490rm -f conftest.err conftest.i conftest.$ac_ext
4491
4492 # OK, works on sane cases. Now check whether nonexistent headers
4493 # can be detected and how.
4494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495/* end confdefs.h. */
4496#include <ac_nonexistent.h>
4497_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004498if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004499 # Broken: success on invalid input.
4500continue
Christian Heimes39258d32021-04-17 11:36:35 +02004501else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004502 # Passes both tests.
4503ac_preproc_ok=:
4504break
4505fi
4506rm -f conftest.err conftest.i conftest.$ac_ext
4507
4508done
4509# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4510rm -f conftest.i conftest.err conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02004511if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004512
Christian Heimes39258d32021-04-17 11:36:35 +02004513else
4514 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004516as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4517See \`config.log' for more details" "$LINENO" 5; }
4518fi
4519
4520ac_ext=c
4521ac_cpp='$CPP $CPPFLAGS'
4522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4524ac_compiler_gnu=$ac_cv_c_compiler_gnu
4525
Christian Heimes39258d32021-04-17 11:36:35 +02004526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4527$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4528if ${ac_cv_path_GREP+:} false; then :
4529 $as_echo_n "(cached) " >&6
4530else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004531 if test -z "$GREP"; then
4532 ac_path_GREP_found=false
4533 # Loop through the user's path and test for each of PROGNAME-LIST
4534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4535for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4536do
4537 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004538 test -z "$as_dir" && as_dir=.
4539 for ac_prog in grep ggrep; do
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004540 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004541 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004542 as_fn_executable_p "$ac_path_GREP" || continue
4543# Check for GNU ac_path_GREP and select it if it is found.
4544 # Check for GNU $ac_path_GREP
4545case `"$ac_path_GREP" --version 2>&1` in
4546*GNU*)
4547 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4548*)
4549 ac_count=0
Christian Heimes39258d32021-04-17 11:36:35 +02004550 $as_echo_n 0123456789 >"conftest.in"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004551 while :
4552 do
4553 cat "conftest.in" "conftest.in" >"conftest.tmp"
4554 mv "conftest.tmp" "conftest.in"
4555 cp "conftest.in" "conftest.nl"
Christian Heimes39258d32021-04-17 11:36:35 +02004556 $as_echo 'GREP' >> "conftest.nl"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004557 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4558 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4559 as_fn_arith $ac_count + 1 && ac_count=$as_val
4560 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4561 # Best one so far, save it but keep looking for a better one
4562 ac_cv_path_GREP="$ac_path_GREP"
4563 ac_path_GREP_max=$ac_count
4564 fi
4565 # 10*(2^10) chars as input seems more than enough
4566 test $ac_count -gt 10 && break
4567 done
4568 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4569esac
4570
4571 $ac_path_GREP_found && break 3
4572 done
4573 done
4574 done
4575IFS=$as_save_IFS
4576 if test -z "$ac_cv_path_GREP"; then
4577 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4578 fi
4579else
4580 ac_cv_path_GREP=$GREP
4581fi
4582
4583fi
Christian Heimes39258d32021-04-17 11:36:35 +02004584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4585$as_echo "$ac_cv_path_GREP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004586 GREP="$ac_cv_path_GREP"
4587
4588
Christian Heimes39258d32021-04-17 11:36:35 +02004589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4590$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4591if ${ac_cv_path_SED+:} false; then :
4592 $as_echo_n "(cached) " >&6
4593else
Łukasz Langaa785c872016-09-09 17:37:37 -07004594 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4595 for ac_i in 1 2 3 4 5 6 7; do
4596 ac_script="$ac_script$as_nl$ac_script"
4597 done
4598 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4599 { ac_script=; unset ac_script;}
4600 if test -z "$SED"; then
4601 ac_path_SED_found=false
4602 # Loop through the user's path and test for each of PROGNAME-LIST
4603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604for as_dir in $PATH
4605do
4606 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004607 test -z "$as_dir" && as_dir=.
4608 for ac_prog in sed gsed; do
Łukasz Langaa785c872016-09-09 17:37:37 -07004609 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004610 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
Łukasz Langaa785c872016-09-09 17:37:37 -07004611 as_fn_executable_p "$ac_path_SED" || continue
4612# Check for GNU ac_path_SED and select it if it is found.
4613 # Check for GNU $ac_path_SED
4614case `"$ac_path_SED" --version 2>&1` in
4615*GNU*)
4616 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4617*)
4618 ac_count=0
Christian Heimes39258d32021-04-17 11:36:35 +02004619 $as_echo_n 0123456789 >"conftest.in"
Łukasz Langaa785c872016-09-09 17:37:37 -07004620 while :
4621 do
4622 cat "conftest.in" "conftest.in" >"conftest.tmp"
4623 mv "conftest.tmp" "conftest.in"
4624 cp "conftest.in" "conftest.nl"
Christian Heimes39258d32021-04-17 11:36:35 +02004625 $as_echo '' >> "conftest.nl"
Łukasz Langaa785c872016-09-09 17:37:37 -07004626 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4627 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4628 as_fn_arith $ac_count + 1 && ac_count=$as_val
4629 if test $ac_count -gt ${ac_path_SED_max-0}; then
4630 # Best one so far, save it but keep looking for a better one
4631 ac_cv_path_SED="$ac_path_SED"
4632 ac_path_SED_max=$ac_count
4633 fi
4634 # 10*(2^10) chars as input seems more than enough
4635 test $ac_count -gt 10 && break
4636 done
4637 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4638esac
4639
4640 $ac_path_SED_found && break 3
4641 done
4642 done
4643 done
4644IFS=$as_save_IFS
4645 if test -z "$ac_cv_path_SED"; then
4646 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4647 fi
4648else
4649 ac_cv_path_SED=$SED
4650fi
4651
4652fi
Christian Heimes39258d32021-04-17 11:36:35 +02004653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4654$as_echo "$ac_cv_path_SED" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -07004655 SED="$ac_cv_path_SED"
4656 rm -f conftest.sed
4657
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004658
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660
Christian Heimes39258d32021-04-17 11:36:35 +02004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4662$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004664# Check whether --with-cxx_main was given.
Christian Heimes39258d32021-04-17 11:36:35 +02004665if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004666 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
4668 case $withval in
4669 no) with_cxx_main=no
4670 MAINCC='$(CC)';;
4671 yes) with_cxx_main=yes
4672 MAINCC='$(CXX)';;
4673 *) with_cxx_main=yes
4674 MAINCC=$withval
4675 if test -z "$CXX"
4676 then
4677 CXX=$withval
4678 fi;;
4679 esac
Christian Heimes39258d32021-04-17 11:36:35 +02004680else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681
4682 with_cxx_main=no
4683 MAINCC='$(CC)'
4684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004685fi
4686
Christian Heimes39258d32021-04-17 11:36:35 +02004687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4688$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689
4690preset_cxx="$CXX"
4691if test -z "$CXX"
4692then
4693 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004694 gcc) if test -n "$ac_tool_prefix"; then
4695 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4696set dummy ${ac_tool_prefix}g++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if ${ac_cv_path_CXX+:} false; then :
4700 $as_echo_n "(cached) " >&6
4701else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004702 case $CXX in
4703 [\\/]* | ?:[\\/]*)
4704 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4705 ;;
4706 *)
4707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in notfound
4709do
4710 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004711 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004712 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4714 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004716 break 2
4717 fi
4718done
4719 done
4720IFS=$as_save_IFS
4721
4722 ;;
4723esac
4724fi
4725CXX=$ac_cv_path_CXX
4726if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4728$as_echo "$CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004729else
Christian Heimes39258d32021-04-17 11:36:35 +02004730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004732fi
4733
4734
4735fi
4736if test -z "$ac_cv_path_CXX"; then
4737 ac_pt_CXX=$CXX
4738 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739set dummy g++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if ${ac_cv_path_ac_pt_CXX+:} false; then :
4743 $as_echo_n "(cached) " >&6
4744else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745 case $ac_pt_CXX in
4746 [\\/]* | ?:[\\/]*)
4747 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4748 ;;
4749 *)
4750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in notfound
4752do
4753 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004754 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004755 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4757 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004759 break 2
4760 fi
4761done
4762 done
4763IFS=$as_save_IFS
4764
4765 ;;
4766esac
4767fi
4768ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4769if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4771$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004772else
Christian Heimes39258d32021-04-17 11:36:35 +02004773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775fi
4776
4777 if test "x$ac_pt_CXX" = x; then
4778 CXX="g++"
4779 else
4780 case $cross_compiling:$ac_tool_warned in
4781yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784ac_tool_warned=yes ;;
4785esac
4786 CXX=$ac_pt_CXX
4787 fi
4788else
4789 CXX="$ac_cv_path_CXX"
4790fi
4791 ;;
4792 cc) if test -n "$ac_tool_prefix"; then
4793 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4794set dummy ${ac_tool_prefix}c++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796$as_echo_n "checking for $ac_word... " >&6; }
4797if ${ac_cv_path_CXX+:} false; then :
4798 $as_echo_n "(cached) " >&6
4799else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 case $CXX in
4801 [\\/]* | ?:[\\/]*)
4802 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4803 ;;
4804 *)
4805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in notfound
4807do
4808 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004809 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4812 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 break 2
4815 fi
4816done
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004818IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820 ;;
4821esac
4822fi
4823CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004824if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4826$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827else
Christian Heimes39258d32021-04-17 11:36:35 +02004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004831
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832
4833fi
4834if test -z "$ac_cv_path_CXX"; then
4835 ac_pt_CXX=$CXX
4836 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837set dummy c++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4839$as_echo_n "checking for $ac_word... " >&6; }
4840if ${ac_cv_path_ac_pt_CXX+:} false; then :
4841 $as_echo_n "(cached) " >&6
4842else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846 ;;
4847 *)
4848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4849for as_dir in notfound
4850do
4851 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004852 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4855 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 break 2
4858 fi
4859done
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004861IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
4864esac
4865fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004866ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4867if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4869$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004870else
Christian Heimes39258d32021-04-17 11:36:35 +02004871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004874
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 if test "x$ac_pt_CXX" = x; then
4876 CXX="c++"
4877 else
4878 case $cross_compiling:$ac_tool_warned in
4879yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882ac_tool_warned=yes ;;
4883esac
4884 CXX=$ac_pt_CXX
4885 fi
4886else
4887 CXX="$ac_cv_path_CXX"
4888fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004889 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004890 clang|*/clang) if test -n "$ac_tool_prefix"; then
4891 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4892set dummy ${ac_tool_prefix}clang++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if ${ac_cv_path_CXX+:} false; then :
4896 $as_echo_n "(cached) " >&6
4897else
Ned Deilycbfb9a52012-06-23 16:02:19 -07004898 case $CXX in
4899 [\\/]* | ?:[\\/]*)
4900 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4901 ;;
4902 *)
4903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in notfound
4905do
4906 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004907 test -z "$as_dir" && as_dir=.
Ned Deilycbfb9a52012-06-23 16:02:19 -07004908 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4910 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Ned Deilycbfb9a52012-06-23 16:02:19 -07004912 break 2
4913 fi
4914done
4915 done
4916IFS=$as_save_IFS
4917
Ned Deilycbfb9a52012-06-23 16:02:19 -07004918 ;;
4919esac
4920fi
4921CXX=$ac_cv_path_CXX
4922if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4924$as_echo "$CXX" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004925else
Christian Heimes39258d32021-04-17 11:36:35 +02004926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004928fi
4929
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004930
4931fi
4932if test -z "$ac_cv_path_CXX"; then
4933 ac_pt_CXX=$CXX
4934 # Extract the first word of "clang++", so it can be a program name with args.
4935set dummy clang++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if ${ac_cv_path_ac_pt_CXX+:} false; then :
4939 $as_echo_n "(cached) " >&6
4940else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004941 case $ac_pt_CXX in
4942 [\\/]* | ?:[\\/]*)
4943 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4944 ;;
4945 *)
4946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947for as_dir in notfound
4948do
4949 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004950 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004951 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4953 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004955 break 2
4956 fi
4957done
4958 done
4959IFS=$as_save_IFS
4960
4961 ;;
4962esac
4963fi
4964ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4965if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4967$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004968else
Christian Heimes39258d32021-04-17 11:36:35 +02004969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004971fi
4972
4973 if test "x$ac_pt_CXX" = x; then
4974 CXX="clang++"
4975 else
4976 case $cross_compiling:$ac_tool_warned in
4977yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004980ac_tool_warned=yes ;;
4981esac
4982 CXX=$ac_pt_CXX
4983 fi
4984else
4985 CXX="$ac_cv_path_CXX"
4986fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004987 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004988 icc|*/icc) if test -n "$ac_tool_prefix"; then
4989 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4990set dummy ${ac_tool_prefix}icpc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_CXX+:} false; then :
4994 $as_echo_n "(cached) " >&6
4995else
Zachary Ware5af85642015-12-21 12:09:17 -06004996 case $CXX in
4997 [\\/]* | ?:[\\/]*)
4998 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4999 ;;
5000 *)
5001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in notfound
5003do
5004 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005005 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005006 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005010 break 2
5011 fi
5012done
5013 done
5014IFS=$as_save_IFS
5015
5016 ;;
5017esac
5018fi
5019CXX=$ac_cv_path_CXX
5020if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5022$as_echo "$CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005023else
Christian Heimes39258d32021-04-17 11:36:35 +02005024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005026fi
5027
5028
5029fi
5030if test -z "$ac_cv_path_CXX"; then
5031 ac_pt_CXX=$CXX
5032 # Extract the first word of "icpc", so it can be a program name with args.
5033set dummy icpc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if ${ac_cv_path_ac_pt_CXX+:} false; then :
5037 $as_echo_n "(cached) " >&6
5038else
Zachary Ware5af85642015-12-21 12:09:17 -06005039 case $ac_pt_CXX in
5040 [\\/]* | ?:[\\/]*)
5041 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5042 ;;
5043 *)
5044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in notfound
5046do
5047 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005048 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005049 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5051 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005053 break 2
5054 fi
5055done
5056 done
5057IFS=$as_save_IFS
5058
5059 ;;
5060esac
5061fi
5062ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5063if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5065$as_echo "$ac_pt_CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005066else
Christian Heimes39258d32021-04-17 11:36:35 +02005067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005069fi
5070
5071 if test "x$ac_pt_CXX" = x; then
5072 CXX="icpc"
5073 else
5074 case $cross_compiling:$ac_tool_warned in
5075yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02005076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Zachary Ware5af85642015-12-21 12:09:17 -06005078ac_tool_warned=yes ;;
5079esac
5080 CXX=$ac_pt_CXX
5081 fi
5082else
5083 CXX="$ac_cv_path_CXX"
5084fi
5085 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086 esac
5087 if test "$CXX" = "notfound"
5088 then
5089 CXX=""
5090 fi
5091fi
5092if test -z "$CXX"
5093then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005094 if test -n "$ac_tool_prefix"; then
5095 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5096 do
5097 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100$as_echo_n "checking for $ac_word... " >&6; }
5101if ${ac_cv_prog_CXX+:} false; then :
5102 $as_echo_n "(cached) " >&6
5103else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104 if test -n "$CXX"; then
5105 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5106else
5107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005111 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005114 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02005115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116 break 2
5117 fi
5118done
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122fi
5123fi
5124CXX=$ac_cv_prog_CXX
5125if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5127$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128else
Christian Heimes39258d32021-04-17 11:36:35 +02005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131fi
5132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 test -n "$CXX" && break
5135 done
5136fi
5137if test -z "$CXX"; then
5138 ac_ct_CXX=$CXX
5139 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5140do
5141 # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5146 $as_echo_n "(cached) " >&6
5147else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005148 if test -n "$ac_ct_CXX"; then
5149 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5150else
5151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005155 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005156 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005158 ac_cv_prog_ac_ct_CXX="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02005159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005160 break 2
5161 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005162done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005163 done
5164IFS=$as_save_IFS
5165
5166fi
5167fi
5168ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5169if test -n "$ac_ct_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5171$as_echo "$ac_ct_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005172else
Christian Heimes39258d32021-04-17 11:36:35 +02005173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005175fi
5176
5177
5178 test -n "$ac_ct_CXX" && break
5179done
5180
5181 if test "x$ac_ct_CXX" = x; then
5182 CXX="notfound"
5183 else
5184 case $cross_compiling:$ac_tool_warned in
5185yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02005186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005188ac_tool_warned=yes ;;
5189esac
5190 CXX=$ac_ct_CXX
5191 fi
5192fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193
5194 if test "$CXX" = "notfound"
5195 then
5196 CXX=""
5197 fi
5198fi
5199if test "$preset_cxx" != "$CXX"
5200then
Christian Heimes39258d32021-04-17 11:36:35 +02005201 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005202
5203 By default, distutils will build C++ extension modules with \"$CXX\".
5204 If this is not intended, then set CXX on the configure command line.
5205 " >&5
Christian Heimes39258d32021-04-17 11:36:35 +02005206$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005207
5208 By default, distutils will build C++ extension modules with \"$CXX\".
5209 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005210 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005211fi
5212
5213
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5215
5216
Christian Heimes39258d32021-04-17 11:36:35 +02005217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5218$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005219cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005220#undef bfin
5221#undef cris
5222#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005223#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005224#undef hppa
5225#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005228#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005229#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005231#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005232 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005233#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005234# if defined(__x86_64__) && defined(__LP64__)
5235 x86_64-linux-gnu
5236# elif defined(__x86_64__) && defined(__ILP32__)
5237 x86_64-linux-gnux32
5238# elif defined(__i386__)
5239 i386-linux-gnu
5240# elif defined(__aarch64__) && defined(__AARCH64EL__)
5241# if defined(__ILP32__)
5242 aarch64_ilp32-linux-gnu
5243# else
5244 aarch64-linux-gnu
5245# endif
5246# elif defined(__aarch64__) && defined(__AARCH64EB__)
5247# if defined(__ILP32__)
5248 aarch64_be_ilp32-linux-gnu
5249# else
5250 aarch64_be-linux-gnu
5251# endif
5252# elif defined(__alpha__)
5253 alpha-linux-gnu
5254# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5255# if defined(__ARMEL__)
5256 arm-linux-gnueabihf
5257# else
5258 armeb-linux-gnueabihf
5259# endif
5260# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5261# if defined(__ARMEL__)
5262 arm-linux-gnueabi
5263# else
5264 armeb-linux-gnueabi
5265# endif
5266# elif defined(__hppa__)
5267 hppa-linux-gnu
5268# elif defined(__ia64__)
5269 ia64-linux-gnu
5270# elif defined(__m68k__) && !defined(__mcoldfire__)
5271 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005272# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5273# if _MIPS_SIM == _ABIO32
5274 mipsisa32r6el-linux-gnu
5275# elif _MIPS_SIM == _ABIN32
5276 mipsisa64r6el-linux-gnuabin32
5277# elif _MIPS_SIM == _ABI64
5278 mipsisa64r6el-linux-gnuabi64
5279# else
5280# error unknown platform triplet
5281# endif
5282# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5283# if _MIPS_SIM == _ABIO32
5284 mipsisa32r6-linux-gnu
5285# elif _MIPS_SIM == _ABIN32
5286 mipsisa64r6-linux-gnuabin32
5287# elif _MIPS_SIM == _ABI64
5288 mipsisa64r6-linux-gnuabi64
5289# else
5290# error unknown platform triplet
5291# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005292# elif defined(__mips_hard_float) && defined(_MIPSEL)
5293# if _MIPS_SIM == _ABIO32
5294 mipsel-linux-gnu
5295# elif _MIPS_SIM == _ABIN32
5296 mips64el-linux-gnuabin32
5297# elif _MIPS_SIM == _ABI64
5298 mips64el-linux-gnuabi64
5299# else
5300# error unknown platform triplet
5301# endif
5302# elif defined(__mips_hard_float)
5303# if _MIPS_SIM == _ABIO32
5304 mips-linux-gnu
5305# elif _MIPS_SIM == _ABIN32
5306 mips64-linux-gnuabin32
5307# elif _MIPS_SIM == _ABI64
5308 mips64-linux-gnuabi64
5309# else
5310# error unknown platform triplet
5311# endif
5312# elif defined(__or1k__)
5313 or1k-linux-gnu
5314# elif defined(__powerpc__) && defined(__SPE__)
5315 powerpc-linux-gnuspe
5316# elif defined(__powerpc64__)
5317# if defined(__LITTLE_ENDIAN__)
5318 powerpc64le-linux-gnu
5319# else
5320 powerpc64-linux-gnu
5321# endif
5322# elif defined(__powerpc__)
5323 powerpc-linux-gnu
5324# elif defined(__s390x__)
5325 s390x-linux-gnu
5326# elif defined(__s390__)
5327 s390-linux-gnu
5328# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5329 sh4-linux-gnu
5330# elif defined(__sparc__) && defined(__arch64__)
5331 sparc64-linux-gnu
5332# elif defined(__sparc__)
5333 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005334# elif defined(__riscv)
5335# if __riscv_xlen == 32
5336 riscv32-linux-gnu
5337# elif __riscv_xlen == 64
5338 riscv64-linux-gnu
5339# else
5340# error unknown platform triplet
5341# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005342# else
5343# error unknown platform triplet
5344# endif
5345#elif defined(__FreeBSD_kernel__)
5346# if defined(__LP64__)
5347 x86_64-kfreebsd-gnu
5348# elif defined(__i386__)
5349 i386-kfreebsd-gnu
5350# else
5351# error unknown platform triplet
5352# endif
5353#elif defined(__gnu_hurd__)
5354 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005355#elif defined(__APPLE__)
5356 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005357#elif defined(__VXWORKS__)
5358 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359#else
5360# error unknown platform triplet
5361#endif
5362
5363EOF
5364
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005365if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005366 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
Christian Heimes39258d32021-04-17 11:36:35 +02005367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5368$as_echo "$PLATFORM_TRIPLET" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005369else
Christian Heimes39258d32021-04-17 11:36:35 +02005370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5371$as_echo "none" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005372fi
5373rm -f conftest.c conftest.out
5374
5375if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5376 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5377 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5378 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005379elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5380 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005381fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005382
doko@ubuntu.com55532312016-06-14 08:55:19 +02005383if test x$MULTIARCH != x; then
5384 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5385fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005386
5387
Christian Heimes39258d32021-04-17 11:36:35 +02005388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5389$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005390save_LDFLAGS="$LDFLAGS"
5391LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005392
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5394/* end confdefs.h. */
5395
5396int
Christian Heimes39258d32021-04-17 11:36:35 +02005397main ()
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005398{
5399
5400 ;
5401 return 0;
5402}
5403_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005405 NO_AS_NEEDED="-Wl,--no-as-needed"
Christian Heimes39258d32021-04-17 11:36:35 +02005406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5407$as_echo "yes" >&6; }
5408else
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005409 NO_AS_NEEDED=""
Christian Heimes39258d32021-04-17 11:36:35 +02005410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005412fi
Christian Heimes39258d32021-04-17 11:36:35 +02005413rm -f core conftest.err conftest.$ac_objext \
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005414 conftest$ac_exeext conftest.$ac_ext
5415LDFLAGS="$save_LDFLAGS"
5416
5417
5418
5419# checks for UNIX variants that set C preprocessor variables
Christian Heimes39258d32021-04-17 11:36:35 +02005420
5421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5422$as_echo_n "checking for egrep... " >&6; }
5423if ${ac_cv_path_EGREP+:} false; then :
5424 $as_echo_n "(cached) " >&6
5425else
5426 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5427 then ac_cv_path_EGREP="$GREP -E"
5428 else
5429 if test -z "$EGREP"; then
5430 ac_path_EGREP_found=false
5431 # Loop through the user's path and test for each of PROGNAME-LIST
5432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434do
Christian Heimes39258d32021-04-17 11:36:35 +02005435 IFS=$as_save_IFS
5436 test -z "$as_dir" && as_dir=.
5437 for ac_prog in egrep; do
5438 for ac_exec_ext in '' $ac_executable_extensions; do
5439 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5440 as_fn_executable_p "$ac_path_EGREP" || continue
5441# Check for GNU ac_path_EGREP and select it if it is found.
5442 # Check for GNU $ac_path_EGREP
5443case `"$ac_path_EGREP" --version 2>&1` in
5444*GNU*)
5445 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5446*)
5447 ac_count=0
5448 $as_echo_n 0123456789 >"conftest.in"
5449 while :
5450 do
5451 cat "conftest.in" "conftest.in" >"conftest.tmp"
5452 mv "conftest.tmp" "conftest.in"
5453 cp "conftest.in" "conftest.nl"
5454 $as_echo 'EGREP' >> "conftest.nl"
5455 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5456 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5457 as_fn_arith $ac_count + 1 && ac_count=$as_val
5458 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5459 # Best one so far, save it but keep looking for a better one
5460 ac_cv_path_EGREP="$ac_path_EGREP"
5461 ac_path_EGREP_max=$ac_count
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005462 fi
Christian Heimes39258d32021-04-17 11:36:35 +02005463 # 10*(2^10) chars as input seems more than enough
5464 test $ac_count -gt 10 && break
5465 done
5466 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5467esac
5468
5469 $ac_path_EGREP_found && break 3
5470 done
5471 done
5472 done
5473IFS=$as_save_IFS
5474 if test -z "$ac_cv_path_EGREP"; then
5475 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005476 fi
Christian Heimes39258d32021-04-17 11:36:35 +02005477else
5478 ac_cv_path_EGREP=$EGREP
5479fi
5480
5481 fi
5482fi
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5484$as_echo "$ac_cv_path_EGREP" >&6; }
5485 EGREP="$ac_cv_path_EGREP"
5486
5487
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5489$as_echo_n "checking for ANSI C header files... " >&6; }
5490if ${ac_cv_header_stdc+:} false; then :
5491 $as_echo_n "(cached) " >&6
5492else
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h. */
5495#include <stdlib.h>
5496#include <stdarg.h>
5497#include <string.h>
5498#include <float.h>
5499
5500int
5501main ()
5502{
5503
5504 ;
5505 return 0;
5506}
5507_ACEOF
5508if ac_fn_c_try_compile "$LINENO"; then :
5509 ac_cv_header_stdc=yes
5510else
5511 ac_cv_header_stdc=no
5512fi
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514
5515if test $ac_cv_header_stdc = yes; then
5516 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518/* end confdefs.h. */
5519#include <string.h>
5520
5521_ACEOF
5522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5523 $EGREP "memchr" >/dev/null 2>&1; then :
5524
5525else
5526 ac_cv_header_stdc=no
5527fi
5528rm -f conftest*
5529
5530fi
5531
5532if test $ac_cv_header_stdc = yes; then
5533 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5535/* end confdefs.h. */
5536#include <stdlib.h>
5537
5538_ACEOF
5539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5540 $EGREP "free" >/dev/null 2>&1; then :
5541
5542else
5543 ac_cv_header_stdc=no
5544fi
5545rm -f conftest*
5546
5547fi
5548
5549if test $ac_cv_header_stdc = yes; then
5550 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5551 if test "$cross_compiling" = yes; then :
5552 :
5553else
5554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5555/* end confdefs.h. */
5556#include <ctype.h>
5557#include <stdlib.h>
5558#if ((' ' & 0x0FF) == 0x020)
5559# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5560# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5561#else
5562# define ISLOWER(c) \
5563 (('a' <= (c) && (c) <= 'i') \
5564 || ('j' <= (c) && (c) <= 'r') \
5565 || ('s' <= (c) && (c) <= 'z'))
5566# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5567#endif
5568
5569#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5570int
5571main ()
5572{
5573 int i;
5574 for (i = 0; i < 256; i++)
5575 if (XOR (islower (i), ISLOWER (i))
5576 || toupper (i) != TOUPPER (i))
5577 return 2;
5578 return 0;
5579}
5580_ACEOF
5581if ac_fn_c_try_run "$LINENO"; then :
5582
5583else
5584 ac_cv_header_stdc=no
5585fi
5586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5587 conftest.$ac_objext conftest.beam conftest.$ac_ext
5588fi
5589
5590fi
5591fi
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5593$as_echo "$ac_cv_header_stdc" >&6; }
5594if test $ac_cv_header_stdc = yes; then
5595
5596$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5597
5598fi
5599
5600# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5601for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5602 inttypes.h stdint.h unistd.h
5603do :
5604 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5605ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5606"
5607if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5608 cat >>confdefs.h <<_ACEOF
5609#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5610_ACEOF
5611
5612fi
5613
Matthias Kloseb9621712010-04-24 17:59:49 +00005614done
5615
5616
5617
Christian Heimes39258d32021-04-17 11:36:35 +02005618 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5619if test "x$ac_cv_header_minix_config_h" = xyes; then :
5620 MINIX=yes
5621else
5622 MINIX=
Matthias Kloseb9621712010-04-24 17:59:49 +00005623fi
5624
5625
Christian Heimes39258d32021-04-17 11:36:35 +02005626 if test "$MINIX" = yes; then
5627
5628$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005629
5630
Christian Heimes39258d32021-04-17 11:36:35 +02005631$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005632
5633
Christian Heimes39258d32021-04-17 11:36:35 +02005634$as_echo "#define _MINIX 1" >>confdefs.h
5635
5636 fi
5637
5638
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5640$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5641if ${ac_cv_safe_to_define___extensions__+:} false; then :
5642 $as_echo_n "(cached) " >&6
5643else
Matthias Kloseb9621712010-04-24 17:59:49 +00005644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645/* end confdefs.h. */
5646
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005647# define __EXTENSIONS__ 1
5648 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005649int
Christian Heimes39258d32021-04-17 11:36:35 +02005650main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{
5652
5653 ;
5654 return 0;
5655}
5656_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005657if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 ac_cv_safe_to_define___extensions__=yes
Christian Heimes39258d32021-04-17 11:36:35 +02005659else
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 ac_cv_safe_to_define___extensions__=no
5661fi
Christian Heimes39258d32021-04-17 11:36:35 +02005662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005663fi
Christian Heimes39258d32021-04-17 11:36:35 +02005664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5665$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5666 test $ac_cv_safe_to_define___extensions__ = yes &&
5667 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005668
Christian Heimes39258d32021-04-17 11:36:35 +02005669 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005670
Christian Heimes39258d32021-04-17 11:36:35 +02005671 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005672
Christian Heimes39258d32021-04-17 11:36:35 +02005673 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005674
Christian Heimes39258d32021-04-17 11:36:35 +02005675 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005676
5677
Christian Heimes39258d32021-04-17 11:36:35 +02005678
5679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5680$as_echo_n "checking for the Android API level... " >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005681cat >> conftest.c <<EOF
5682#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005683android_api = __ANDROID_API__
5684arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005685#else
5686#error not Android
5687#endif
5688EOF
5689
5690if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005691 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5692 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Christian Heimes39258d32021-04-17 11:36:35 +02005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5694$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005695 if test -z "$ANDROID_API_LEVEL"; then
5696 echo 'Fatal: you must define __ANDROID_API__'
5697 exit 1
5698 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005699
Christian Heimes39258d32021-04-17 11:36:35 +02005700cat >>confdefs.h <<_ACEOF
5701#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5702_ACEOF
Xavier de Gaye95750b12016-07-09 11:05:42 +02005703
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005704
Christian Heimes39258d32021-04-17 11:36:35 +02005705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5706$as_echo_n "checking for the Android arm ABI... " >&6; }
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5708$as_echo "$_arm_arch" >&6; }
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005709 if test "$_arm_arch" = 7; then
5710 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5711 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5712 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005713else
Christian Heimes39258d32021-04-17 11:36:35 +02005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5715$as_echo "not Android" >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005716fi
5717rm -f conftest.c conftest.out
5718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719# Check for unsupported systems
5720case $ac_sys_system/$ac_sys_release in
5721atheos*|Linux*/1*)
5722 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5723 echo See README for details.
5724 exit 1;;
5725esac
5726
5727
Christian Heimes39258d32021-04-17 11:36:35 +02005728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5729$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731# Check whether --with-suffix was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005732if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 withval=$with_suffix;
5734 case $withval in
5735 no) EXEEXT=;;
5736 yes) EXEEXT=.exe;;
5737 *) EXEEXT=$withval;;
5738 esac
5739fi
5740
Christian Heimes39258d32021-04-17 11:36:35 +02005741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5742$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743
5744# Test whether we're running on a non-case-sensitive system, in which
5745# case we give a warning if no ext is given
5746
Christian Heimes39258d32021-04-17 11:36:35 +02005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5748$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749if test ! -d CaseSensitiveTestDir; then
5750mkdir CaseSensitiveTestDir
5751fi
5752
5753if test -d casesensitivetestdir
5754then
Christian Heimes39258d32021-04-17 11:36:35 +02005755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5756$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 BUILDEXEEXT=.exe
5758else
Christian Heimes39258d32021-04-17 11:36:35 +02005759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5760$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761 BUILDEXEEXT=$EXEEXT
5762fi
5763rmdir CaseSensitiveTestDir
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765case $ac_sys_system in
5766hp*|HP*)
5767 case $CC in
5768 cc|*/cc) CC="$CC -Ae";;
5769 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770esac
5771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772
Christian Heimes39258d32021-04-17 11:36:35 +02005773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5774$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775if test -z "$LIBRARY"
5776then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005777 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778fi
Christian Heimes39258d32021-04-17 11:36:35 +02005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5780$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# LDLIBRARY is the name of the library to link against (as opposed to the
5783# name of the library into which to insert object files). BLDLIBRARY is also
5784# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5785# is blank as the main program is not linked directly against LDLIBRARY.
5786# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5787# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5788# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5789# DLLLIBRARY is the shared (i.e., DLL) library.
5790#
5791# RUNSHARED is used to run shared python without installed libraries
5792#
5793# INSTSONAME is the name of the shared library that will be use to install
5794# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005795#
5796# LDVERSION is the shared library version number, normally the Python version
5797# with the ABI build flags appended.
5798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799
5800
5801
5802
5803
5804
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005805
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806LDLIBRARY="$LIBRARY"
5807BLDLIBRARY='$(LDLIBRARY)'
5808INSTSONAME='$(LDLIBRARY)'
5809DLLLIBRARY=''
5810LDLIBRARYDIR=''
5811RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005812LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813
5814# LINKCC is the command that links the python executable -- default is $(CC).
5815# If CXX is set, and if it is needed to link a main function that was
5816# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5817# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818
Christian Heimes39258d32021-04-17 11:36:35 +02005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5820$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821if test -z "$LINKCC"
5822then
5823 LINKCC='$(PURIFY) $(MAINCC)'
5824 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825 QNX*)
5826 # qcc must be used because the other compilers do not
5827 # support -N.
5828 LINKCC=qcc;;
5829 esac
5830fi
Christian Heimes39258d32021-04-17 11:36:35 +02005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5832$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
Stefan Krahe6dcd372020-08-29 17:00:08 +02005834# EXPORTSYMS holds the list of exported symbols for AIX.
5835# EXPORTSFROM holds the module name exporting symbols on AIX.
5836EXPORTSYMS=
5837EXPORTSFROM=
5838
5839
Christian Heimes39258d32021-04-17 11:36:35 +02005840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5841$as_echo_n "checking EXPORTSYMS... " >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005842case $ac_sys_system in
5843AIX*)
5844 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005845 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005846 ;;
5847esac
Christian Heimes39258d32021-04-17 11:36:35 +02005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5849$as_echo "$EXPORTSYMS" >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5852# make sure we default having it set to "no": this is used by
5853# distutils.unixccompiler to know if it should add --enable-new-dtags
5854# to linker command lines, and failing to detect GNU ld simply results
5855# in the same bahaviour as before.
5856
Christian Heimes39258d32021-04-17 11:36:35 +02005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5858$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859ac_prog=ld
5860if test "$GCC" = yes; then
5861 ac_prog=`$CC -print-prog-name=ld`
5862fi
5863case `"$ac_prog" -V 2>&1 < /dev/null` in
5864 *GNU*)
5865 GNULD=yes;;
5866 *)
5867 GNULD=no;;
5868esac
Christian Heimes39258d32021-04-17 11:36:35 +02005869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5870$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871
Christian Heimes39258d32021-04-17 11:36:35 +02005872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5873$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874# Check whether --enable-shared was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005875if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 enableval=$enable_shared;
5877fi
5878
5879
5880if test -z "$enable_shared"
5881then
5882 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005883 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 enable_shared="yes";;
5885 *)
5886 enable_shared="no";;
5887 esac
5888fi
Christian Heimes39258d32021-04-17 11:36:35 +02005889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5890$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891
Christian Heimes39258d32021-04-17 11:36:35 +02005892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5893$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894# Check whether --enable-profiling was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005895if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896 enableval=$enable_profiling;
5897fi
5898
5899if test "x$enable_profiling" = xyes; then
5900 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005901 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903/* end confdefs.h. */
5904int main() { return 0; }
5905_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005906if ac_fn_c_try_link "$LINENO"; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005907
Christian Heimes39258d32021-04-17 11:36:35 +02005908else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005909 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
Christian Heimes39258d32021-04-17 11:36:35 +02005911rm -f core conftest.err conftest.$ac_objext \
doko@ubuntu.comba015832012-06-30 16:52:05 +02005912 conftest$ac_exeext conftest.$ac_ext
5913 CC="$ac_save_cc"
5914else
5915 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916fi
Christian Heimes39258d32021-04-17 11:36:35 +02005917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5918$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
doko@ubuntu.comba015832012-06-30 16:52:05 +02005920if test "x$enable_profiling" = xyes; then
5921 BASECFLAGS="-pg $BASECFLAGS"
5922 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923fi
5924
Christian Heimes39258d32021-04-17 11:36:35 +02005925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5926$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
5928# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5929# library that we build, but we do not want to link against it (we
5930# will find it with a -framework option). For this reason there is an
5931# extra variable BLDLIBRARY against which Python and the extension
5932# modules are linked, BLDLIBRARY. This is normally the same as
5933# LDLIBRARY, but empty for MacOSX framework builds.
5934if test "$enable_framework"
5935then
5936 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005937 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 BLDLIBRARY=''
5939else
5940 BLDLIBRARY='$(LDLIBRARY)'
5941fi
5942
5943# Other platforms follow
5944if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005945 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946
Christian Heimes39258d32021-04-17 11:36:35 +02005947$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948
5949 case $ac_sys_system in
5950 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).dll.a'
5952 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 ;;
5954 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005955 LDLIBRARY='libpython$(LDVERSION).so'
5956 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005957 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005959 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005960 then
5961 PY3LIBRARY=libpython3.so
5962 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
pxinwrc1174262020-12-15 06:14:43 +08005964 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005965 LDLIBRARY='libpython$(LDVERSION).so'
5966 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005967 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005969 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005970 then
5971 PY3LIBRARY=libpython3.so
5972 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 ;;
5974 hp*|HP*)
5975 case `uname -m` in
5976 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005977 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978 ;;
5979 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005980 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ;;
5982 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005983 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005984 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005987 LDLIBRARY='libpython$(LDVERSION).dylib'
5988 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005989 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005991 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005992 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005993 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005994 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995
5996 esac
5997else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005998 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999 case $ac_sys_system in
6000 CYGWIN*)
6001 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006002 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 ;;
6004 esac
6005fi
6006
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006007if test "$cross_compiling" = yes; then
6008 RUNSHARED=
6009fi
6010
Christian Heimes39258d32021-04-17 11:36:35 +02006011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6012$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006015if test -n "$ac_tool_prefix"; then
6016 for ac_prog in ar aal
6017 do
6018 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6021$as_echo_n "checking for $ac_word... " >&6; }
6022if ${ac_cv_prog_AR+:} false; then :
6023 $as_echo_n "(cached) " >&6
6024else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025 if test -n "$AR"; then
6026 ac_cv_prog_AR="$AR" # Let the user override the test.
6027else
6028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6029for as_dir in $PATH
6030do
6031 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006035 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 break 2
6038 fi
6039done
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041IFS=$as_save_IFS
6042
6043fi
6044fi
6045AR=$ac_cv_prog_AR
6046if test -n "$AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6048$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049else
Christian Heimes39258d32021-04-17 11:36:35 +02006050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6051$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
6053
6054
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006055 test -n "$AR" && break
6056 done
6057fi
6058if test -z "$AR"; then
6059 ac_ct_AR=$AR
6060 for ac_prog in ar aal
6061do
6062 # Extract the first word of "$ac_prog", so it can be a program name with args.
6063set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6065$as_echo_n "checking for $ac_word... " >&6; }
6066if ${ac_cv_prog_ac_ct_AR+:} false; then :
6067 $as_echo_n "(cached) " >&6
6068else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006069 if test -n "$ac_ct_AR"; then
6070 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6071else
6072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6073for as_dir in $PATH
6074do
6075 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006076 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006077 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006079 ac_cv_prog_ac_ct_AR="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006081 break 2
6082 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006084 done
6085IFS=$as_save_IFS
6086
6087fi
6088fi
6089ac_ct_AR=$ac_cv_prog_ac_ct_AR
6090if test -n "$ac_ct_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6092$as_echo "$ac_ct_AR" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006093else
Christian Heimes39258d32021-04-17 11:36:35 +02006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006096fi
6097
6098
6099 test -n "$ac_ct_AR" && break
6100done
6101
6102 if test "x$ac_ct_AR" = x; then
6103 AR="ar"
6104 else
6105 case $cross_compiling:$ac_tool_warned in
6106yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006109ac_tool_warned=yes ;;
6110esac
6111 AR=$ac_ct_AR
6112 fi
6113fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114
6115
6116# tweak ARFLAGS only if the user didn't set it on the command line
6117
6118if test -z "$ARFLAGS"
6119then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006120 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121fi
6122
doko@ubuntu.com58844492012-06-30 18:25:32 +02006123if test -n "$ac_tool_prefix"; then
6124 for ac_prog in readelf
6125 do
6126 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6127set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6129$as_echo_n "checking for $ac_word... " >&6; }
6130if ${ac_cv_prog_READELF+:} false; then :
6131 $as_echo_n "(cached) " >&6
6132else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006133 if test -n "$READELF"; then
6134 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6135else
6136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6137for as_dir in $PATH
6138do
6139 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006140 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006141 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006143 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006145 break 2
6146 fi
6147done
6148 done
6149IFS=$as_save_IFS
6150
6151fi
6152fi
6153READELF=$ac_cv_prog_READELF
6154if test -n "$READELF"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6156$as_echo "$READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006157else
Christian Heimes39258d32021-04-17 11:36:35 +02006158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6159$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006160fi
6161
6162
6163 test -n "$READELF" && break
6164 done
6165fi
6166if test -z "$READELF"; then
6167 ac_ct_READELF=$READELF
6168 for ac_prog in readelf
6169do
6170 # Extract the first word of "$ac_prog", so it can be a program name with args.
6171set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6173$as_echo_n "checking for $ac_word... " >&6; }
6174if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6175 $as_echo_n "(cached) " >&6
6176else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006177 if test -n "$ac_ct_READELF"; then
6178 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6179else
6180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6181for as_dir in $PATH
6182do
6183 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006184 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006185 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006187 ac_cv_prog_ac_ct_READELF="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006189 break 2
6190 fi
6191done
6192 done
6193IFS=$as_save_IFS
6194
6195fi
6196fi
6197ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6198if test -n "$ac_ct_READELF"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6200$as_echo "$ac_ct_READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006201else
Christian Heimes39258d32021-04-17 11:36:35 +02006202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006204fi
6205
6206
6207 test -n "$ac_ct_READELF" && break
6208done
6209
6210 if test "x$ac_ct_READELF" = x; then
6211 READELF=":"
6212 else
6213 case $cross_compiling:$ac_tool_warned in
6214yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006215{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6216$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com58844492012-06-30 18:25:32 +02006217ac_tool_warned=yes ;;
6218esac
6219 READELF=$ac_ct_READELF
6220 fi
6221fi
6222
6223if test "$cross_compiling" = yes; then
6224 case "$READELF" in
6225 readelf|:)
6226 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6227 ;;
6228 esac
6229fi
6230
6231
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006234hp*|HP*)
6235 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236 if test -z "$INSTALL"
6237 then
6238 INSTALL="${srcdir}/install-sh -c"
6239 fi
6240esac
Christian Heimes39258d32021-04-17 11:36:35 +02006241# Find a good install program. We prefer a C program (faster),
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242# so one script is as good as another. But avoid the broken or
6243# incompatible versions:
6244# SysV /etc/install, /usr/sbin/install
6245# SunOS /usr/etc/install
6246# IRIX /sbin/install
6247# AIX /bin/install
6248# AmigaOS /C/install, which installs bootblocks on floppy discs
6249# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6250# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6251# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6252# OS/2's system install, which has a completely different semantic
6253# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006254# Reject install programs that cannot install multiple files.
Christian Heimes39258d32021-04-17 11:36:35 +02006255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6256$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006257if test -z "$INSTALL"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006258if ${ac_cv_path_install+:} false; then :
6259 $as_echo_n "(cached) " >&6
6260else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6262for as_dir in $PATH
6263do
6264 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006265 test -z "$as_dir" && as_dir=.
6266 # Account for people who put trailing slashes in PATH elements.
6267case $as_dir/ in #((
6268 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271 /usr/ucb/* ) ;;
6272 *)
6273 # OSF1 and SCO ODT 3.0 have their own names for install.
6274 # Don't use installbsd from OSF since it installs stuff as root
6275 # by default.
6276 for ac_prog in ginstall scoinst install; do
6277 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006278 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279 if test $ac_prog = install &&
Christian Heimes39258d32021-04-17 11:36:35 +02006280 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 # AIX install. It has an incompatible calling convention.
6282 :
6283 elif test $ac_prog = install &&
Christian Heimes39258d32021-04-17 11:36:35 +02006284 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285 # program-specific install script used by HP pwplus--don't use.
6286 :
6287 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 rm -rf conftest.one conftest.two conftest.dir
6289 echo one > conftest.one
6290 echo two > conftest.two
6291 mkdir conftest.dir
Christian Heimes39258d32021-04-17 11:36:35 +02006292 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
Matthias Kloseb9621712010-04-24 17:59:49 +00006293 test -s conftest.one && test -s conftest.two &&
6294 test -s conftest.dir/conftest.one &&
6295 test -s conftest.dir/conftest.two
6296 then
Christian Heimes39258d32021-04-17 11:36:35 +02006297 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 break 3
6299 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300 fi
6301 fi
6302 done
6303 done
6304 ;;
6305esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006306
6307 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308IFS=$as_save_IFS
6309
Matthias Kloseb9621712010-04-24 17:59:49 +00006310rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311
6312fi
Christian Heimes39258d32021-04-17 11:36:35 +02006313 if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314 INSTALL=$ac_cv_path_install
6315 else
6316 # As a last resort, use the slow shell script. Don't cache a
6317 # value for INSTALL within a source directory, because that will
6318 # break other packages using the cache if that directory is
6319 # removed, or if the value is a relative name.
6320 INSTALL=$ac_install_sh
6321 fi
6322fi
Christian Heimes39258d32021-04-17 11:36:35 +02006323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6324$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
6326# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6327# It thinks the first close brace ends the variable substitution.
6328test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6329
6330test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6331
6332test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6333
Christian Heimes39258d32021-04-17 11:36:35 +02006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6335$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006336if test -z "$MKDIR_P"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006337 if ${ac_cv_path_mkdir+:} false; then :
6338 $as_echo_n "(cached) " >&6
6339else
Matthias Klose93a0ef12012-03-15 18:08:34 +01006340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6342do
6343 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006344 test -z "$as_dir" && as_dir=.
Matthias Klose93a0ef12012-03-15 18:08:34 +01006345 for ac_prog in mkdir gmkdir; do
6346 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006347 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6348 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6349 'mkdir (GNU coreutils) '* | \
6350 'mkdir (coreutils) '* | \
Matthias Klose93a0ef12012-03-15 18:08:34 +01006351 'mkdir (fileutils) '4.1*)
Christian Heimes39258d32021-04-17 11:36:35 +02006352 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
Matthias Klose93a0ef12012-03-15 18:08:34 +01006353 break 3;;
6354 esac
6355 done
6356 done
6357 done
6358IFS=$as_save_IFS
6359
6360fi
6361
6362 test -d ./--version && rmdir ./--version
Christian Heimes39258d32021-04-17 11:36:35 +02006363 if test "${ac_cv_path_mkdir+set}" = set; then
Matthias Klose93a0ef12012-03-15 18:08:34 +01006364 MKDIR_P="$ac_cv_path_mkdir -p"
6365 else
6366 # As a last resort, use the slow shell script. Don't cache a
6367 # value for MKDIR_P within a source directory, because that will
6368 # break other packages using the cache if that directory is
6369 # removed, or if the value is a relative name.
6370 MKDIR_P="$ac_install_sh -d"
6371 fi
6372fi
Christian Heimes39258d32021-04-17 11:36:35 +02006373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6374$as_echo "$MKDIR_P" >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006375
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
6377# Not every filesystem supports hard links
6378
6379if test -z "$LN" ; then
6380 case $ac_sys_system in
6381 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382 *) LN=ln;;
6383 esac
6384fi
6385
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006386# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006387
6388ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006389
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006390# Check for --with-pydebug
Christian Heimes39258d32021-04-17 11:36:35 +02006391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6392$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393
6394# Check whether --with-pydebug was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006395if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396 withval=$with_pydebug;
6397if test "$withval" != no
6398then
6399
Christian Heimes39258d32021-04-17 11:36:35 +02006400$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401
Christian Heimes39258d32021-04-17 11:36:35 +02006402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006404 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006405 ABIFLAGS="${ABIFLAGS}d"
Christian Heimes39258d32021-04-17 11:36:35 +02006406else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408fi
Christian Heimes39258d32021-04-17 11:36:35 +02006409else
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412fi
6413
6414
Victor Stinnerf4e47032019-04-25 00:56:28 +02006415# Check for --with-trace-refs
6416# --with-trace-refs
Christian Heimes39258d32021-04-17 11:36:35 +02006417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6418$as_echo_n "checking for --with-trace-refs... " >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006419
6420# Check whether --with-trace-refs was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006421if test "${with_trace_refs+set}" = set; then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02006422 withval=$with_trace_refs;
Christian Heimes39258d32021-04-17 11:36:35 +02006423else
Victor Stinnerf4e47032019-04-25 00:56:28 +02006424 with_trace_refs=no
6425fi
6426
Christian Heimes39258d32021-04-17 11:36:35 +02006427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6428$as_echo "$with_trace_refs" >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006429
6430if test "$with_trace_refs" = "yes"
6431then
6432
Christian Heimes39258d32021-04-17 11:36:35 +02006433$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
Victor Stinnerf4e47032019-04-25 00:56:28 +02006434
6435fi
6436
6437# Check for --with-assertions.
6438# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006439assertions='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6441$as_echo_n "checking for --with-assertions... " >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006442
6443# Check whether --with-assertions was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006444if test "${with_assertions+set}" = set; then :
T. Woutersddbfa2c2017-05-23 01:30:49 +02006445 withval=$with_assertions;
6446if test "$withval" != no
6447then
6448 assertions='true'
6449fi
6450fi
6451
6452if test "$assertions" = 'true'; then
Christian Heimes39258d32021-04-17 11:36:35 +02006453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6454$as_echo "yes" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006455elif test "$Py_DEBUG" = 'true'; then
6456 assertions='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6458$as_echo "implied by --with-pydebug" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006459else
Christian Heimes39258d32021-04-17 11:36:35 +02006460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006462fi
6463
Brett Cannon63d98bc2016-09-06 17:12:40 -07006464# Enable optimization flags
6465
6466
6467Py_OPT='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6469$as_echo_n "checking for --enable-optimizations... " >&6; }
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006470# Check whether --enable-optimizations was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006471if test "${enable_optimizations+set}" = set; then :
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006472 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006473if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006474then
6475 Py_OPT='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6477$as_echo "yes" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006478else
6479 Py_OPT='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006482fi
Christian Heimes39258d32021-04-17 11:36:35 +02006483else
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; }
Brett Cannon63d98bc2016-09-06 17:12:40 -07006486fi
6487
6488if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006489 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6490 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006491 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006492 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006493 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006494 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006495 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006496 case $CC in
6497 *gcc*)
Christian Heimes39258d32021-04-17 11:36:35 +02006498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6499$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6500if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6501 $as_echo_n "(cached) " >&6
6502else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006503
6504 ax_check_save_flags=$CFLAGS
6505 CFLAGS="$CFLAGS -fno-semantic-interposition"
6506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6507/* end confdefs.h. */
6508
6509int
Christian Heimes39258d32021-04-17 11:36:35 +02006510main ()
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006511{
6512
6513 ;
6514 return 0;
6515}
6516_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02006517if ac_fn_c_try_compile "$LINENO"; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006518 ax_cv_check_cflags___fno_semantic_interposition=yes
Christian Heimes39258d32021-04-17 11:36:35 +02006519else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006520 ax_cv_check_cflags___fno_semantic_interposition=no
6521fi
Christian Heimes39258d32021-04-17 11:36:35 +02006522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006523 CFLAGS=$ax_check_save_flags
6524fi
Christian Heimes39258d32021-04-17 11:36:35 +02006525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6526$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6527if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006528
Pablo Galindob451b0e2020-10-21 22:46:52 +01006529 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6530 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006531
Christian Heimes39258d32021-04-17 11:36:35 +02006532else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006533 :
6534fi
6535
Pablo Galindob451b0e2020-10-21 22:46:52 +01006536 ;;
6537 esac
6538
6539
Brett Cannon63d98bc2016-09-06 17:12:40 -07006540else
6541 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006542 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006543 DEF_MAKE_RULE="all"
6544fi
6545
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006546
Christian Heimes39258d32021-04-17 11:36:35 +02006547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6548$as_echo_n "checking PROFILE_TASK... " >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006549if test -z "$PROFILE_TASK"
6550then
Victor Stinner67900052021-01-27 11:16:15 +01006551 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006552fi
Christian Heimes39258d32021-04-17 11:36:35 +02006553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6554$as_echo "$PROFILE_TASK" >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006555
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006556# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6557# normal names in the default $PATH (ie: Ubuntu). They exist under the
6558# non-suffixed name in their versioned llvm directory.
6559
6560llvm_bin_dir=''
6561llvm_path="${PATH}"
6562if test "${CC}" = "clang"
6563then
6564 clang_bin=`which clang`
6565 # Some systems install clang elsewhere as a symlink to the real path
6566 # which is where the related llvm tools are located.
6567 if test -L "${clang_bin}"
6568 then
6569 clang_dir=`dirname "${clang_bin}"`
6570 clang_bin=`readlink "${clang_bin}"`
6571 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6572 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6573 fi
6574fi
6575
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006576# Enable LTO flags
Christian Heimes39258d32021-04-17 11:36:35 +02006577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6578$as_echo_n "checking for --with-lto... " >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006579
6580# Check whether --with-lto was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006581if test "${with_lto+set}" = set; then :
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006582 withval=$with_lto;
6583if test "$withval" != no
6584then
6585 Py_LTO='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6587$as_echo "yes" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006588else
6589 Py_LTO='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006592fi
Christian Heimes39258d32021-04-17 11:36:35 +02006593else
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6595$as_echo "no" >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006596fi
6597
6598if test "$Py_LTO" = 'true' ; then
6599 case $CC in
6600 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006601
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006602 if test -n "$ac_tool_prefix"; then
6603 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6604set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6606$as_echo_n "checking for $ac_word... " >&6; }
6607if ${ac_cv_path_LLVM_AR+:} false; then :
6608 $as_echo_n "(cached) " >&6
6609else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006610 case $LLVM_AR in
6611 [\\/]* | ?:[\\/]*)
6612 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6613 ;;
6614 *)
6615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6616for as_dir in ${llvm_path}
6617do
6618 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006619 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006620 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6622 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006624 break 2
6625 fi
6626done
6627 done
6628IFS=$as_save_IFS
6629
6630 ;;
6631esac
6632fi
6633LLVM_AR=$ac_cv_path_LLVM_AR
6634if test -n "$LLVM_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6636$as_echo "$LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006637else
Christian Heimes39258d32021-04-17 11:36:35 +02006638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6639$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006640fi
6641
6642
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006643fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006644if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006645 ac_pt_LLVM_AR=$LLVM_AR
6646 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006647set dummy llvm-ar; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6649$as_echo_n "checking for $ac_word... " >&6; }
6650if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6651 $as_echo_n "(cached) " >&6
6652else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006653 case $ac_pt_LLVM_AR in
6654 [\\/]* | ?:[\\/]*)
6655 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6656 ;;
6657 *)
6658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6659for as_dir in ${llvm_path}
6660do
6661 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006662 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006663 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6665 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006667 break 2
6668 fi
6669done
6670 done
6671IFS=$as_save_IFS
6672
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006673 ;;
6674esac
6675fi
6676ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6677if test -n "$ac_pt_LLVM_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6679$as_echo "$ac_pt_LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006680else
Christian Heimes39258d32021-04-17 11:36:35 +02006681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6682$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006683fi
6684
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006685 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006686 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006687 else
6688 case $cross_compiling:$ac_tool_warned in
6689yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006692ac_tool_warned=yes ;;
6693esac
6694 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006695 fi
6696else
6697 LLVM_AR="$ac_cv_path_LLVM_AR"
6698fi
6699
6700
6701 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6702 then
6703 LLVM_AR_FOUND="found"
6704 else
6705 LLVM_AR_FOUND="not-found"
6706 fi
6707 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6708 then
6709 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6710 if test -n "${found_llvm_ar}"
6711 then
6712 LLVM_AR='/usr/bin/xcrun llvm-ar'
6713 LLVM_AR_FOUND=found
Christian Heimes39258d32021-04-17 11:36:35 +02006714 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6715$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006716 fi
6717 fi
6718 if test $LLVM_AR_FOUND = not-found
6719 then
6720 LLVM_PROFR_ERR=yes
6721 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6722 else
6723 LLVM_AR_ERR=no
6724 fi
6725 AR="${LLVM_AR}"
6726 case $ac_sys_system in
6727 Darwin*)
6728 # Any changes made here should be reflected in the GCC+Darwin case below
6729 LTOFLAGS="-flto -Wl,-export_dynamic"
6730 ;;
6731 *)
6732 LTOFLAGS="-flto"
6733 ;;
6734 esac
6735 ;;
6736 *gcc*)
6737 case $ac_sys_system in
6738 Darwin*)
6739 LTOFLAGS="-flto -Wl,-export_dynamic"
6740 ;;
6741 *)
6742 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6743 ;;
6744 esac
6745 ;;
6746 esac
6747
6748 if test "$ac_cv_prog_cc_g" = "yes"
6749 then
6750 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6751 # to get debug symbols.
6752 LTOFLAGS="$LTOFLAGS -g"
6753 fi
6754
stratakisf92c7aa2018-12-04 15:54:01 +01006755 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006756 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006757fi
6758
6759# Enable PGO flags.
6760
6761
6762
6763
6764
6765
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006766if test -n "$ac_tool_prefix"; then
6767 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6768set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6770$as_echo_n "checking for $ac_word... " >&6; }
6771if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6772 $as_echo_n "(cached) " >&6
6773else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006774 case $LLVM_PROFDATA in
6775 [\\/]* | ?:[\\/]*)
6776 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6777 ;;
6778 *)
6779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6780for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006781do
6782 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006783 test -z "$as_dir" && as_dir=.
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6786 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07006788 break 2
6789 fi
6790done
6791 done
6792IFS=$as_save_IFS
6793
Gregory P. Smith799520c2016-09-07 16:10:00 -07006794 ;;
6795esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006796fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006797LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6798if test -n "$LLVM_PROFDATA"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6800$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801else
Christian Heimes39258d32021-04-17 11:36:35 +02006802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6803$as_echo "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006804fi
6805
6806
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006807fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006808if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006809 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6810 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006811set dummy llvm-profdata; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6813$as_echo_n "checking for $ac_word... " >&6; }
6814if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6815 $as_echo_n "(cached) " >&6
6816else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006817 case $ac_pt_LLVM_PROFDATA in
6818 [\\/]* | ?:[\\/]*)
6819 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6820 ;;
6821 *)
6822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6823for as_dir in ${llvm_path}
6824do
6825 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006826 test -z "$as_dir" && as_dir=.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006827 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6829 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006831 break 2
6832 fi
6833done
6834 done
6835IFS=$as_save_IFS
6836
Gregory P. Smith799520c2016-09-07 16:10:00 -07006837 ;;
6838esac
6839fi
6840ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6841if test -n "$ac_pt_LLVM_PROFDATA"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6843$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006844else
Christian Heimes39258d32021-04-17 11:36:35 +02006845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6846$as_echo "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006847fi
6848
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006849 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006850 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006851 else
6852 case $cross_compiling:$ac_tool_warned in
6853yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006856ac_tool_warned=yes ;;
6857esac
6858 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006859 fi
6860else
6861 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6862fi
6863
6864
6865if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6866then
6867 LLVM_PROF_FOUND="found"
6868else
6869 LLVM_PROF_FOUND="not-found"
6870fi
6871if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6872then
6873 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6874 if test -n "${found_llvm_profdata}"
6875 then
6876 # llvm-profdata isn't directly in $PATH in some cases.
6877 # https://apple.stackexchange.com/questions/197053/
6878 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6879 LLVM_PROF_FOUND=found
Christian Heimes39258d32021-04-17 11:36:35 +02006880 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6881$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07006882 fi
6883fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006884LLVM_PROF_ERR=no
6885case $CC in
6886 *clang*)
6887 # Any changes made here should be reflected in the GCC+Darwin case below
6888 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6889 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006890 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006891 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6892 if test $LLVM_PROF_FOUND = not-found
6893 then
6894 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006895 if test "${REQUIRE_PGO}" = "yes"
6896 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006897 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006898 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006899 fi
6900 ;;
6901 *gcc*)
6902 case $ac_sys_system in
6903 Darwin*)
6904 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6905 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006906 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006907 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006908 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006909 then
6910 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006911 if test "${REQUIRE_PGO}" = "yes"
6912 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006913 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006914 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006915 fi
6916 ;;
6917 *)
6918 PGO_PROF_GEN_FLAG="-fprofile-generate"
6919 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6920 LLVM_PROF_MERGER="true"
6921 LLVM_PROF_FILE=""
6922 ;;
6923 esac
6924 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006925 *icc*)
6926 PGO_PROF_GEN_FLAG="-prof-gen"
6927 PGO_PROF_USE_FLAG="-prof-use"
6928 LLVM_PROF_MERGER="true"
6929 LLVM_PROF_FILE=""
6930 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006931esac
6932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6934# merged with this chunk of code?
6935
6936# Optimizer/debugger flags
6937# ------------------------
6938# (The following bit of code is complicated enough - please keep things
6939# indented properly. Just pretend you're editing Python code. ;-)
6940
6941# There are two parallel sets of case statements below, one that checks to
6942# see if OPT was set and one that does BASECFLAGS setting based upon
6943# compiler and platform. BASECFLAGS tweaks need to be made even if the
6944# user set OPT.
6945
Victor Stinner23a683a2019-04-12 21:27:37 +02006946case $CC in
6947 *clang*)
6948 cc_is_clang=1
6949 ;;
6950 *)
6951 if $CC --version 2>&1 | grep -q clang
6952 then
6953 cc_is_clang=1
6954 else
6955 cc_is_clang=
6956 fi
6957esac
6958
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959# tweak OPT based on compiler and platform, only if the user didn't set
6960# it on the command line
6961
Victor Stinner9ed34a82017-05-02 22:35:58 +02006962
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006963if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964then
6965 case $GCC in
6966 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6968 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6969 WRAP="-fwrapv"
6970 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006971
Victor Stinner35f3d242017-04-21 12:35:24 +02006972 if test -n "${cc_is_clang}"
6973 then
6974 # Clang also needs -fwrapv
6975 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006976 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6977 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006978 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006979 fi
6980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981 case $ac_cv_prog_cc_g in
6982 yes)
6983 if test "$Py_DEBUG" = 'true' ; then
6984 # Optimization messes up debuggers, so turn it off for
6985 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006986 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006987 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006988 else
Victor Stinner28205b22017-04-21 11:24:34 +02006989 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006990 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991 else
Victor Stinner28205b22017-04-21 11:24:34 +02006992 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993 fi
6994 ;;
6995 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006996 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997 ;;
6998 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 case $ac_sys_system in
7001 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7002 ;;
7003 esac
7004 ;;
7005
7006 *)
7007 OPT="-O"
7008 ;;
7009 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010fi
7011
7012
7013
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007014
stratakiscf10a752018-12-19 18:19:01 +01007015
Ronald Oussoren41761932020-11-08 10:05:27 +01007016# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017UNIVERSAL_ARCH_FLAGS=
7018
7019
7020# tweak BASECFLAGS based on compiler and platform
7021case $GCC in
7022yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007023 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007024
Christian Heimes39258d32021-04-17 11:36:35 +02007025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7026$as_echo_n "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007027 ac_save_cc="$CC"
7028 CC="$CC -Wextra -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007029 if ${ac_cv_extra_warnings+:} false; then :
7030 $as_echo_n "(cached) " >&6
7031else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033/* end confdefs.h. */
7034
7035
7036int
Christian Heimes39258d32021-04-17 11:36:35 +02007037main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007038{
7039
7040 ;
7041 return 0;
7042}
7043
7044_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007045if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007046
7047 ac_cv_extra_warnings=yes
7048
Christian Heimes39258d32021-04-17 11:36:35 +02007049else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007050
7051 ac_cv_extra_warnings=no
7052
7053fi
Christian Heimes39258d32021-04-17 11:36:35 +02007054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007055fi
7056
7057 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7059$as_echo "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007060
7061 if test $ac_cv_extra_warnings = yes
7062 then
7063 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7064 fi
7065
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007066 # Python doesn't violate C99 aliasing rules, but older versions of
7067 # GCC produce warnings for legal Python code. Enable
7068 # -fno-strict-aliasing on versions of GCC that support but produce
7069 # warnings. See Issue3326
Christian Heimes39258d32021-04-17 11:36:35 +02007070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7071$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007072 ac_save_cc="$CC"
7073 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007074 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007075 if ${ac_cv_no_strict_aliasing+:} false; then :
7076 $as_echo_n "(cached) " >&6
7077else
Matthias Kloseb9621712010-04-24 17:59:49 +00007078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007079/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007080
Matthias Kloseb159a552010-04-25 21:00:44 +00007081
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007082int
Christian Heimes39258d32021-04-17 11:36:35 +02007083main ()
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007084{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007085
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007086 ;
7087 return 0;
7088}
Matthias Kloseb159a552010-04-25 21:00:44 +00007089
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007090_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007091if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007092
7093 CC="$ac_save_cc -fstrict-aliasing"
7094 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007096/* end confdefs.h. */
7097
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007098 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007099int
Christian Heimes39258d32021-04-17 11:36:35 +02007100main ()
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007101{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007102double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007103 ;
7104 return 0;
7105}
Matthias Kloseb159a552010-04-25 21:00:44 +00007106
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007107_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007108if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007109
7110 ac_cv_no_strict_aliasing=no
7111
Christian Heimes39258d32021-04-17 11:36:35 +02007112else
Matthias Kloseb159a552010-04-25 21:00:44 +00007113
7114 ac_cv_no_strict_aliasing=yes
7115
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007116fi
Christian Heimes39258d32021-04-17 11:36:35 +02007117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007118
Christian Heimes39258d32021-04-17 11:36:35 +02007119else
Matthias Kloseb159a552010-04-25 21:00:44 +00007120
7121 ac_cv_no_strict_aliasing=no
7122
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123fi
Christian Heimes39258d32021-04-17 11:36:35 +02007124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007125fi
7126
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007127 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007128 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7130$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007131 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007132 then
7133 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7134 fi
7135
Zachary Ware5af85642015-12-21 12:09:17 -06007136 # ICC doesn't recognize the option, but only emits a warning
7137 ## XXX does it emit an unused result warning and can it be disabled?
7138 case "$CC" in
7139 *icc*)
7140 ac_cv_disable_unused_result_warning=no
7141 ;;
7142 *)
Christian Heimes39258d32021-04-17 11:36:35 +02007143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7144$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007145 ac_save_cc="$CC"
7146 CC="$CC -Wunused-result -Werror"
7147 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007148 if ${ac_cv_disable_unused_result_warning+:} false; then :
7149 $as_echo_n "(cached) " >&6
7150else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152/* end confdefs.h. */
7153
7154
7155int
Christian Heimes39258d32021-04-17 11:36:35 +02007156main ()
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007157{
7158
7159 ;
7160 return 0;
7161}
7162
7163_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007164if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007165
7166 ac_cv_disable_unused_result_warning=yes
7167
Christian Heimes39258d32021-04-17 11:36:35 +02007168else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007169
7170 ac_cv_disable_unused_result_warning=no
7171
7172fi
Christian Heimes39258d32021-04-17 11:36:35 +02007173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007174fi
7175
7176 CFLAGS="$save_CFLAGS"
7177 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7179$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007180 ;;
7181 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007182
7183 if test $ac_cv_disable_unused_result_warning = yes
7184 then
7185 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007186 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7187 fi
7188
Christian Heimes39258d32021-04-17 11:36:35 +02007189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7190$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007191 ac_save_cc="$CC"
7192 CC="$CC -Wunused-parameter -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007193 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7194 $as_echo_n "(cached) " >&6
7195else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7197/* end confdefs.h. */
7198
7199
7200int
Christian Heimes39258d32021-04-17 11:36:35 +02007201main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007202{
7203
7204 ;
7205 return 0;
7206}
7207
7208_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007209if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007210
7211 ac_cv_disable_unused_parameter_warning=yes
7212
Christian Heimes39258d32021-04-17 11:36:35 +02007213else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007214
7215 ac_cv_disable_unused_parameter_warning=no
7216
7217fi
Christian Heimes39258d32021-04-17 11:36:35 +02007218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007219fi
7220
7221 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7223$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007224
7225 if test $ac_cv_disable_unused_parameter_warning = yes
7226 then
7227 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7228 fi
7229
Christian Heimes39258d32021-04-17 11:36:35 +02007230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7231$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007232 ac_save_cc="$CC"
7233 CC="$CC -Wmissing-field-initializers -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007234 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7235 $as_echo_n "(cached) " >&6
7236else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7238/* end confdefs.h. */
7239
7240
7241int
Christian Heimes39258d32021-04-17 11:36:35 +02007242main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007243{
7244
7245 ;
7246 return 0;
7247}
7248
7249_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007250if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007251
7252 ac_cv_disable_missing_field_initializers=yes
7253
Christian Heimes39258d32021-04-17 11:36:35 +02007254else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007255
7256 ac_cv_disable_missing_field_initializers=no
7257
7258fi
Christian Heimes39258d32021-04-17 11:36:35 +02007259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007260fi
7261
7262 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7264$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007265
7266 if test $ac_cv_disable_missing_field_initializers = yes
7267 then
7268 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007269 fi
7270
Christian Heimes39258d32021-04-17 11:36:35 +02007271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7272$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007273 ac_save_cc="$CC"
7274 CC="$CC -Wsign-compare"
7275 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007276 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7277 $as_echo_n "(cached) " >&6
7278else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7280/* end confdefs.h. */
7281
7282
7283int
Christian Heimes39258d32021-04-17 11:36:35 +02007284main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007285{
7286
7287 ;
7288 return 0;
7289}
7290
7291_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007292if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007293
7294 ac_cv_enable_sign_compare_warning=yes
7295
Christian Heimes39258d32021-04-17 11:36:35 +02007296else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007297
7298 ac_cv_enable_sign_compare_warning=no
7299
7300fi
Christian Heimes39258d32021-04-17 11:36:35 +02007301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007302fi
7303
7304 CFLAGS="$save_CFLAGS"
7305 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7307$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007308
7309 if test $ac_cv_enable_sign_compare_warning = yes
7310 then
7311 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7312 fi
7313
Christian Heimes39258d32021-04-17 11:36:35 +02007314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7315$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007316 ac_save_cc="$CC"
7317 CC="$CC -Wunreachable-code"
7318 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007319 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7320 $as_echo_n "(cached) " >&6
7321else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323/* end confdefs.h. */
7324
7325
7326int
Christian Heimes39258d32021-04-17 11:36:35 +02007327main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007328{
7329
7330 ;
7331 return 0;
7332}
7333
7334_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007335if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007336
7337 ac_cv_enable_unreachable_code_warning=yes
7338
Christian Heimes39258d32021-04-17 11:36:35 +02007339else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007340
7341 ac_cv_enable_unreachable_code_warning=no
7342
7343fi
Christian Heimes39258d32021-04-17 11:36:35 +02007344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007345fi
7346
7347 CFLAGS="$save_CFLAGS"
7348 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007349
7350 # Don't enable unreachable code warning in debug mode, since it usually
7351 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007352 # Issue #24324: Unfortunately, the unreachable code warning does not work
7353 # correctly on gcc and has been silently removed from the compiler.
7354 # It is supported on clang but on OS X systems gcc may be an alias
7355 # for clang. Try to determine if the compiler is not really gcc and,
7356 # if so, only then enable the warning.
7357 if test $ac_cv_enable_unreachable_code_warning = yes && \
7358 test "$Py_DEBUG" != "true" && \
7359 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007360 then
7361 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007362 else
7363 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007364 fi
Christian Heimes39258d32021-04-17 11:36:35 +02007365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7366$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007367
Christian Heimes39258d32021-04-17 11:36:35 +02007368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7369$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007370 ac_save_cc="$CC"
7371 CC="$CC -Werror -Wstrict-prototypes"
Christian Heimes39258d32021-04-17 11:36:35 +02007372 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7373 $as_echo_n "(cached) " >&6
7374else
INADA Naokie3364842018-06-05 20:40:53 +09007375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376/* end confdefs.h. */
7377
7378
7379int
Christian Heimes39258d32021-04-17 11:36:35 +02007380main ()
INADA Naokie3364842018-06-05 20:40:53 +09007381{
7382
7383 ;
7384 return 0;
7385}
7386
7387_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007388if ac_fn_c_try_compile "$LINENO"; then :
INADA Naokie3364842018-06-05 20:40:53 +09007389
7390 ac_cv_enable_strict_prototypes_warning=yes
7391
Christian Heimes39258d32021-04-17 11:36:35 +02007392else
INADA Naokie3364842018-06-05 20:40:53 +09007393
7394 ac_cv_enable_strict_prototypes_warning=no
7395
7396fi
Christian Heimes39258d32021-04-17 11:36:35 +02007397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09007398fi
7399
7400 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7402$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007403
7404 if test $ac_cv_enable_strict_prototypes_warning = yes
7405 then
7406 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7407 fi
7408
Christian Heimes39258d32021-04-17 11:36:35 +02007409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7410$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007411 ac_save_cc="$CC"
7412 CC="$CC -Werror=implicit-function-declaration"
Christian Heimes39258d32021-04-17 11:36:35 +02007413 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7414 $as_echo_n "(cached) " >&6
7415else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417/* end confdefs.h. */
7418
7419
7420int
Christian Heimes39258d32021-04-17 11:36:35 +02007421main ()
Victor Stinner193ee0a2017-02-06 14:24:00 +01007422{
7423
7424 ;
7425 return 0;
7426}
7427
7428_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007429if ac_fn_c_try_compile "$LINENO"; then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01007430
7431 ac_cv_enable_implicit_function_declaration_error=yes
7432
Christian Heimes39258d32021-04-17 11:36:35 +02007433else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007434
7435 ac_cv_enable_implicit_function_declaration_error=no
7436
7437fi
Christian Heimes39258d32021-04-17 11:36:35 +02007438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01007439fi
7440
7441 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7443$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007444
7445 if test $ac_cv_enable_implicit_function_declaration_error = yes
7446 then
7447 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7448 fi
7449
Christian Heimes39258d32021-04-17 11:36:35 +02007450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7451$as_echo_n "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007452 ac_save_cc="$CC"
7453 CC="$CC -fvisibility=hidden"
Christian Heimes39258d32021-04-17 11:36:35 +02007454 if ${ac_cv_enable_visibility+:} false; then :
7455 $as_echo_n "(cached) " >&6
7456else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7458/* end confdefs.h. */
7459
7460
7461int
Christian Heimes39258d32021-04-17 11:36:35 +02007462main ()
Vinay Sajip0b60f642019-10-15 08:26:12 +01007463{
7464
7465 ;
7466 return 0;
7467}
7468
7469_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007470if ac_fn_c_try_compile "$LINENO"; then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01007471
7472 ac_cv_enable_visibility=yes
7473
Christian Heimes39258d32021-04-17 11:36:35 +02007474else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007475
7476 ac_cv_enable_visibility=no
7477
7478fi
Christian Heimes39258d32021-04-17 11:36:35 +02007479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01007480fi
7481
7482 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7484$as_echo "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007485
7486 if test $ac_cv_enable_visibility = yes
7487 then
7488 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7489 fi
7490
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7492 # support. Without this, treatment of subnormals doesn't follow
7493 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007494 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495 alpha*)
7496 BASECFLAGS="$BASECFLAGS -mieee"
7497 ;;
7498 esac
7499
7500 case $ac_sys_system in
7501 SCO_SV*)
7502 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7503 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007504
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 Darwin*)
7506 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7507 # used to be here, but non-Apple gcc doesn't accept them.
7508 if test "${CC}" = gcc
7509 then
Christian Heimes39258d32021-04-17 11:36:35 +02007510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
7511$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007512 case "${UNIVERSALSDK}" in
7513 */MacOSX10.4u.sdk)
7514 # Build using 10.4 SDK, force usage of gcc when the
7515 # compiler is gcc, otherwise the user will get very
7516 # confusing error messages when building on OSX 10.6
7517 CC=gcc-4.0
7518 CPP=cpp-4.0
7519 ;;
7520 esac
Christian Heimes39258d32021-04-17 11:36:35 +02007521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7522$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007523 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524
Ned Deily87adb6e2013-10-18 21:09:56 -07007525 if test "${enable_universalsdk}"
7526 then
7527 case "$UNIVERSAL_ARCHS" in
7528 32-bit)
7529 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7530 LIPO_32BIT_FLAGS=""
7531 ARCH_RUN_32BIT=""
7532 ;;
7533 64-bit)
7534 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7535 LIPO_32BIT_FLAGS=""
7536 ARCH_RUN_32BIT="true"
7537 ;;
7538 all)
7539 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7540 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7541 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7542 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007543 universal2)
7544 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7545 LIPO_32BIT_FLAGS=""
7546 ARCH_RUN_32BIT="true"
7547 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007548 intel)
7549 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7550 LIPO_32BIT_FLAGS="-extract i386"
7551 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7552 ;;
7553 intel-32)
7554 UNIVERSAL_ARCH_FLAGS="-arch i386"
7555 LIPO_32BIT_FLAGS=""
7556 ARCH_RUN_32BIT=""
7557 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007558 intel-64)
7559 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7560 LIPO_32BIT_FLAGS=""
7561 ARCH_RUN_32BIT="true"
7562 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007563 3-way)
7564 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7565 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7566 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7567 ;;
7568 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007569 as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007570 ;;
7571 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572
Ned Deily87adb6e2013-10-18 21:09:56 -07007573 if test "${UNIVERSALSDK}" != "/"
7574 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007575 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7576 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007577 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007578 else
7579 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7580 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007581 fi
7582 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583
Ned Deily87adb6e2013-10-18 21:09:56 -07007584 # Calculate an appropriate deployment target for this build:
7585 # The deployment target value is used explicitly to enable certain
7586 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007587 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007588 # component of the string returned by distutils.get_platform().
7589 #
7590 # Use the value from:
7591 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7592 # 2. the operating system version of the build machine if >= 10.6
7593 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7594 # below to pick either 10.3, 10.4, or 10.5 as the target.
7595 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596
Christian Heimes39258d32021-04-17 11:36:35 +02007597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7598$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007599 cur_target_major=`sw_vers -productVersion | \
7600 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7601 cur_target_minor=`sw_vers -productVersion | \
7602 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7603 cur_target="${cur_target_major}.${cur_target_minor}"
7604 if test ${cur_target_major} -eq 10 && \
7605 test ${cur_target_minor} -ge 3 && \
7606 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007607 then
Ned Deily36820b62014-06-25 13:44:22 -07007608 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007609 cur_target=10.3
7610 if test ${enable_universalsdk}
7611 then
7612 case "$UNIVERSAL_ARCHS" in
7613 all|3-way|intel|64-bit)
7614 # These configurations were first supported in 10.5
7615 cur_target='10.5'
7616 ;;
7617 esac
7618 else
7619 if test `/usr/bin/arch` = "i386"
7620 then
7621 # 10.4 was the first release to support Intel archs
7622 cur_target="10.4"
7623 fi
7624 fi
7625 fi
7626 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007627
Ned Deily87adb6e2013-10-18 21:09:56 -07007628 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7629 # environment with a value that is the same as what we'll use
7630 # in the Makefile to ensure that we'll get the same compiler
7631 # environment during configure and build time.
7632 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7633 export MACOSX_DEPLOYMENT_TARGET
7634 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Christian Heimes39258d32021-04-17 11:36:35 +02007635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7636$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007637
Christian Heimes39258d32021-04-17 11:36:35 +02007638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7639$as_echo_n "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7641/* end confdefs.h. */
7642#include <stdio.h>
7643int
Christian Heimes39258d32021-04-17 11:36:35 +02007644main ()
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007645{
7646printf("%d", 42);
7647 ;
7648 return 0;
7649}
7650_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007651if ac_fn_c_try_link "$LINENO"; then :
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7653$as_echo "yes" >&6; }
7654else
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7656$as_echo "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007657 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7658
7659fi
Christian Heimes39258d32021-04-17 11:36:35 +02007660rm -f core conftest.err conftest.$ac_objext \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007661 conftest$ac_exeext conftest.$ac_ext
7662
Ned Deily87adb6e2013-10-18 21:09:56 -07007663 # end of Darwin* tests
7664 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665 esac
7666 ;;
7667
7668*)
7669 case $ac_sys_system in
7670 OpenUNIX*|UnixWare*)
7671 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7672 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673 SCO_SV*)
7674 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7675 ;;
7676 esac
7677 ;;
7678esac
7679
Zachary Ware5af85642015-12-21 12:09:17 -06007680case "$CC" in
7681*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007682 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007683 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7684 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007685*xlc*)
7686 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7687 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007688esac
7689
T. Woutersddbfa2c2017-05-23 01:30:49 +02007690if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691 :
7692else
7693 OPT="-DNDEBUG $OPT"
7694fi
7695
7696if test "$ac_arch_flags"
7697then
7698 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7699fi
7700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701# On some compilers, pthreads are available without further options
7702# (e.g. MacOS X). On some of these systems, the compiler will not
7703# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7704# So we have to see first whether pthreads are available without
7705# options before we can check whether -Kpthread improves anything.
Christian Heimes39258d32021-04-17 11:36:35 +02007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7707$as_echo_n "checking whether pthreads are available without options... " >&6; }
7708if ${ac_cv_pthread_is_default+:} false; then :
7709 $as_echo_n "(cached) " >&6
7710else
7711 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712 ac_cv_pthread_is_default=no
Christian Heimes39258d32021-04-17 11:36:35 +02007713else
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715/* end confdefs.h. */
7716
Stefan Krah7dba5942012-11-22 22:49:11 +01007717#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718#include <pthread.h>
7719
7720void* routine(void* p){return NULL;}
7721
7722int main(){
7723 pthread_t p;
7724 if(pthread_create(&p,NULL,routine,NULL)!=0)
7725 return 1;
7726 (void)pthread_detach(p);
7727 return 0;
7728}
7729
7730_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007731if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732
7733 ac_cv_pthread_is_default=yes
7734 ac_cv_kthread=no
7735 ac_cv_pthread=no
7736
Christian Heimes39258d32021-04-17 11:36:35 +02007737else
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742fi
7743
7744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745fi
7746
Christian Heimes39258d32021-04-17 11:36:35 +02007747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7748$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749
7750
7751if test $ac_cv_pthread_is_default = yes
7752then
7753 ac_cv_kpthread=no
7754else
7755# -Kpthread, if available, provides the right #defines
7756# and linker options to make pthread_create available
7757# Some compilers won't report that they do not support -Kpthread,
7758# so we need to run a program to see whether it really made the
7759# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7761$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
7762if ${ac_cv_kpthread+:} false; then :
7763 $as_echo_n "(cached) " >&6
7764else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765 ac_save_cc="$CC"
7766CC="$CC -Kpthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007767if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768 ac_cv_kpthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007769else
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771/* end confdefs.h. */
7772
Stefan Krah7dba5942012-11-22 22:49:11 +01007773#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774#include <pthread.h>
7775
7776void* routine(void* p){return NULL;}
7777
7778int main(){
7779 pthread_t p;
7780 if(pthread_create(&p,NULL,routine,NULL)!=0)
7781 return 1;
7782 (void)pthread_detach(p);
7783 return 0;
7784}
7785
7786_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007788 ac_cv_kpthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794fi
7795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796CC="$ac_save_cc"
7797fi
7798
Christian Heimes39258d32021-04-17 11:36:35 +02007799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7800$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801fi
7802
7803if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7804then
7805# -Kthread, if available, provides the right #defines
7806# and linker options to make pthread_create available
7807# Some compilers won't report that they do not support -Kthread,
7808# so we need to run a program to see whether it really made the
7809# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7811$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
7812if ${ac_cv_kthread+:} false; then :
7813 $as_echo_n "(cached) " >&6
7814else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007815 ac_save_cc="$CC"
7816CC="$CC -Kthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007817if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818 ac_cv_kthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821/* end confdefs.h. */
7822
Stefan Krah7dba5942012-11-22 22:49:11 +01007823#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824#include <pthread.h>
7825
7826void* routine(void* p){return NULL;}
7827
7828int main(){
7829 pthread_t p;
7830 if(pthread_create(&p,NULL,routine,NULL)!=0)
7831 return 1;
7832 (void)pthread_detach(p);
7833 return 0;
7834}
7835
7836_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007837if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007838 ac_cv_kthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844fi
7845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846CC="$ac_save_cc"
7847fi
7848
Christian Heimes39258d32021-04-17 11:36:35 +02007849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7850$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851fi
7852
7853if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7854then
7855# -pthread, if available, provides the right #defines
7856# and linker options to make pthread_create available
7857# Some compilers won't report that they do not support -pthread,
7858# so we need to run a program to see whether it really made the
7859# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7861$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
7862if ${ac_cv_pthread+:} false; then :
7863 $as_echo_n "(cached) " >&6
7864else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865 ac_save_cc="$CC"
7866CC="$CC -pthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007867if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868 ac_cv_pthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007869else
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007871/* end confdefs.h. */
7872
Stefan Krah7dba5942012-11-22 22:49:11 +01007873#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007874#include <pthread.h>
7875
7876void* routine(void* p){return NULL;}
7877
7878int main(){
7879 pthread_t p;
7880 if(pthread_create(&p,NULL,routine,NULL)!=0)
7881 return 1;
7882 (void)pthread_detach(p);
7883 return 0;
7884}
7885
7886_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007887if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007888 ac_cv_pthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007889else
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007894fi
7895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007896CC="$ac_save_cc"
7897fi
7898
Christian Heimes39258d32021-04-17 11:36:35 +02007899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7900$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007901fi
7902
7903# If we have set a CC compiler flag for thread support then
7904# check if it works for CXX, too.
7905ac_cv_cxx_thread=no
7906if test ! -z "$CXX"
7907then
Christian Heimes39258d32021-04-17 11:36:35 +02007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7909$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007910ac_save_cxx="$CXX"
7911
7912if test "$ac_cv_kpthread" = "yes"
7913then
7914 CXX="$CXX -Kpthread"
7915 ac_cv_cxx_thread=yes
7916elif test "$ac_cv_kthread" = "yes"
7917then
7918 CXX="$CXX -Kthread"
7919 ac_cv_cxx_thread=yes
7920elif test "$ac_cv_pthread" = "yes"
7921then
7922 CXX="$CXX -pthread"
7923 ac_cv_cxx_thread=yes
7924fi
7925
7926if test $ac_cv_cxx_thread = yes
7927then
7928 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7929 $CXX -c conftest.$ac_ext 2>&5
7930 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7931 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7932 then
7933 ac_cv_cxx_thread=yes
7934 else
7935 ac_cv_cxx_thread=no
7936 fi
7937 rm -fr conftest*
7938fi
Christian Heimes39258d32021-04-17 11:36:35 +02007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7940$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941fi
7942CXX="$ac_save_cxx"
7943
7944
7945# checks for header files
Christian Heimes39258d32021-04-17 11:36:35 +02007946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7947$as_echo_n "checking for ANSI C header files... " >&6; }
7948if ${ac_cv_header_stdc+:} false; then :
7949 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007950else
Christian Heimes39258d32021-04-17 11:36:35 +02007951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7952/* end confdefs.h. */
7953#include <stdlib.h>
7954#include <stdarg.h>
7955#include <string.h>
7956#include <float.h>
Pablo Galindocc128882021-03-01 16:47:53 +00007957
Christian Heimes39258d32021-04-17 11:36:35 +02007958int
7959main ()
7960{
Pablo Galindo53e55292021-04-05 17:38:40 +01007961
Christian Heimes39258d32021-04-17 11:36:35 +02007962 ;
7963 return 0;
7964}
7965_ACEOF
7966if ac_fn_c_try_compile "$LINENO"; then :
7967 ac_cv_header_stdc=yes
7968else
7969 ac_cv_header_stdc=no
Pablo Galindocc128882021-03-01 16:47:53 +00007970fi
Christian Heimes39258d32021-04-17 11:36:35 +02007971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +00007972
Christian Heimes39258d32021-04-17 11:36:35 +02007973if test $ac_cv_header_stdc = yes; then
7974 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7976/* end confdefs.h. */
7977#include <string.h>
Pablo Galindocc128882021-03-01 16:47:53 +00007978
Christian Heimes39258d32021-04-17 11:36:35 +02007979_ACEOF
7980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7981 $EGREP "memchr" >/dev/null 2>&1; then :
Pablo Galindocc128882021-03-01 16:47:53 +00007982
Christian Heimes39258d32021-04-17 11:36:35 +02007983else
7984 ac_cv_header_stdc=no
Pablo Galindocc128882021-03-01 16:47:53 +00007985fi
Christian Heimes39258d32021-04-17 11:36:35 +02007986rm -f conftest*
Pablo Galindocc128882021-03-01 16:47:53 +00007987
Pablo Galindo53e55292021-04-05 17:38:40 +01007988fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007989
Christian Heimes39258d32021-04-17 11:36:35 +02007990if test $ac_cv_header_stdc = yes; then
7991 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7993/* end confdefs.h. */
7994#include <stdlib.h>
Pablo Galindo53e55292021-04-05 17:38:40 +01007995
Christian Heimes39258d32021-04-17 11:36:35 +02007996_ACEOF
7997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7998 $EGREP "free" >/dev/null 2>&1; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01007999
Christian Heimes39258d32021-04-17 11:36:35 +02008000else
8001 ac_cv_header_stdc=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008002fi
Christian Heimes39258d32021-04-17 11:36:35 +02008003rm -f conftest*
Pablo Galindo53e55292021-04-05 17:38:40 +01008004
8005fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008006
Christian Heimes39258d32021-04-17 11:36:35 +02008007if test $ac_cv_header_stdc = yes; then
8008 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8009 if test "$cross_compiling" = yes; then :
8010 :
8011else
8012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8013/* end confdefs.h. */
8014#include <ctype.h>
8015#include <stdlib.h>
8016#if ((' ' & 0x0FF) == 0x020)
8017# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8018# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8019#else
8020# define ISLOWER(c) \
8021 (('a' <= (c) && (c) <= 'i') \
8022 || ('j' <= (c) && (c) <= 'r') \
8023 || ('s' <= (c) && (c) <= 'z'))
8024# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8025#endif
Pablo Galindo53e55292021-04-05 17:38:40 +01008026
Christian Heimes39258d32021-04-17 11:36:35 +02008027#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8028int
8029main ()
8030{
8031 int i;
8032 for (i = 0; i < 256; i++)
8033 if (XOR (islower (i), ISLOWER (i))
8034 || toupper (i) != TOUPPER (i))
8035 return 2;
8036 return 0;
8037}
8038_ACEOF
8039if ac_fn_c_try_run "$LINENO"; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01008040
Christian Heimes39258d32021-04-17 11:36:35 +02008041else
8042 ac_cv_header_stdc=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008043fi
Christian Heimes39258d32021-04-17 11:36:35 +02008044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +01008046fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008047
8048fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008049fi
Christian Heimes39258d32021-04-17 11:36:35 +02008050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8051$as_echo "$ac_cv_header_stdc" >&6; }
8052if test $ac_cv_header_stdc = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01008053
Christian Heimes39258d32021-04-17 11:36:35 +02008054$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01008055
8056fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008057
Christian Heimes39258d32021-04-17 11:36:35 +02008058for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
8059fcntl.h grp.h \
8060ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
8061sched.h shadow.h signal.h stropts.h termios.h \
8062utime.h \
8063poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
8064sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
8065sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
8066sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
8067sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
8068sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
8069libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
8070linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
8071sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8072sys/mman.h sys/eventfd.h
8073do :
8074 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8075ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8076if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8077 cat >>confdefs.h <<_ACEOF
8078#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8079_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008080
8081fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008082
Christian Heimes39258d32021-04-17 11:36:35 +02008083done
Guido van Rossum627b2d71993-12-24 10:39:16 +00008084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008085ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008086for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Christian Heimes39258d32021-04-17 11:36:35 +02008087 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8089$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8090if eval \${$as_ac_Header+:} false; then :
8091 $as_echo_n "(cached) " >&6
8092else
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008095#include <sys/types.h>
8096#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008097
Martin v. Löwis11437992002-04-12 09:54:03 +00008098int
Christian Heimes39258d32021-04-17 11:36:35 +02008099main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008100{
8101if ((DIR *) 0)
8102return 0;
8103 ;
8104 return 0;
8105}
8106_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 eval "$as_ac_Header=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02008109else
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008111fi
Christian Heimes39258d32021-04-17 11:36:35 +02008112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008114eval ac_res=\$$as_ac_Header
Christian Heimes39258d32021-04-17 11:36:35 +02008115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8116$as_echo "$ac_res" >&6; }
8117if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 cat >>confdefs.h <<_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008119#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008120_ACEOF
8121
8122ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008124
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008125done
8126# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8127if test $ac_header_dirent = dirent.h; then
Christian Heimes39258d32021-04-17 11:36:35 +02008128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8129$as_echo_n "checking for library containing opendir... " >&6; }
8130if ${ac_cv_search_opendir+:} false; then :
8131 $as_echo_n "(cached) " >&6
8132else
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137/* Override any GCC internal prototype to avoid an error.
8138 Use char because int might match the return type of a GCC
8139 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02008140#ifdef __cplusplus
8141extern "C"
8142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008143char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008144int
Christian Heimes39258d32021-04-17 11:36:35 +02008145main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ;
8149 return 0;
8150}
8151_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008152for ac_lib in '' dir; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 if test -z "$ac_lib"; then
8154 ac_res="none required"
8155 else
8156 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008157 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 fi
Christian Heimes39258d32021-04-17 11:36:35 +02008159 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008161fi
Christian Heimes39258d32021-04-17 11:36:35 +02008162rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02008164 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167done
Christian Heimes39258d32021-04-17 11:36:35 +02008168if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008169
Christian Heimes39258d32021-04-17 11:36:35 +02008170else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171 ac_cv_search_opendir=no
8172fi
8173rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174LIBS=$ac_func_search_save_LIBS
8175fi
Christian Heimes39258d32021-04-17 11:36:35 +02008176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8177$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178ac_res=$ac_cv_search_opendir
Christian Heimes39258d32021-04-17 11:36:35 +02008179if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008183
Michael W. Hudson54241132001-12-07 15:38:26 +00008184else
Christian Heimes39258d32021-04-17 11:36:35 +02008185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8186$as_echo_n "checking for library containing opendir... " >&6; }
8187if ${ac_cv_search_opendir+:} false; then :
8188 $as_echo_n "(cached) " >&6
8189else
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194/* Override any GCC internal prototype to avoid an error.
8195 Use char because int might match the return type of a GCC
8196 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02008197#ifdef __cplusplus
8198extern "C"
8199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008200char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008201int
Christian Heimes39258d32021-04-17 11:36:35 +02008202main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 ;
8206 return 0;
8207}
8208_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008209for ac_lib in '' x; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 if test -z "$ac_lib"; then
8211 ac_res="none required"
8212 else
8213 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008214 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 fi
Christian Heimes39258d32021-04-17 11:36:35 +02008216 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008218fi
Christian Heimes39258d32021-04-17 11:36:35 +02008219rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02008221 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224done
Christian Heimes39258d32021-04-17 11:36:35 +02008225if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008226
Christian Heimes39258d32021-04-17 11:36:35 +02008227else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 ac_cv_search_opendir=no
8229fi
8230rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008231LIBS=$ac_func_search_save_LIBS
8232fi
Christian Heimes39258d32021-04-17 11:36:35 +02008233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8234$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235ac_res=$ac_cv_search_opendir
Christian Heimes39258d32021-04-17 11:36:35 +02008236if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008239fi
8240
8241fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008242
Christian Heimes39258d32021-04-17 11:36:35 +02008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8244$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
8245if ${ac_cv_header_sys_types_h_makedev+:} false; then :
8246 $as_echo_n "(cached) " >&6
8247else
8248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8249/* end confdefs.h. */
8250#include <sys/types.h>
8251int
8252main ()
8253{
8254return makedev(0, 0);
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259if ac_fn_c_try_link "$LINENO"; then :
8260 ac_cv_header_sys_types_h_makedev=yes
8261else
8262 ac_cv_header_sys_types_h_makedev=no
8263fi
8264rm -f core conftest.err conftest.$ac_objext \
8265 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008266
Christian Heimes39258d32021-04-17 11:36:35 +02008267fi
8268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8269$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008270
Christian Heimes39258d32021-04-17 11:36:35 +02008271if test $ac_cv_header_sys_types_h_makedev = no; then
8272ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8273if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
8274
8275$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008276
8277fi
8278
8279
Christian Heimes39258d32021-04-17 11:36:35 +02008280
8281 if test $ac_cv_header_sys_mkdev_h = no; then
8282 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
8283if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
8284
8285$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008286
8287fi
8288
Christian Heimes39258d32021-04-17 11:36:35 +02008289
8290 fi
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008291fi
8292
Michael W. Hudson54241132001-12-07 15:38:26 +00008293
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008294# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8295# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8296SAVE_CFLAGS=$CFLAGS
8297CFLAGS="-std=c99 $CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02008298for ac_header in bluetooth/bluetooth.h
8299do :
8300 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8301if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8302 cat >>confdefs.h <<_ACEOF
8303#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8304_ACEOF
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008305
8306fi
8307
Christian Heimes39258d32021-04-17 11:36:35 +02008308done
8309
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008310CFLAGS=$SAVE_CFLAGS
8311
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008312# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Christian Heimes39258d32021-04-17 11:36:35 +02008313for ac_header in net/if.h
8314do :
8315 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008316#ifdef STDC_HEADERS
8317# include <stdlib.h>
8318# include <stddef.h>
8319#else
8320# ifdef HAVE_STDLIB_H
8321# include <stdlib.h>
8322# endif
8323#endif
8324#ifdef HAVE_SYS_SOCKET_H
8325# include <sys/socket.h>
8326#endif
8327
8328"
Christian Heimes39258d32021-04-17 11:36:35 +02008329if test "x$ac_cv_header_net_if_h" = xyes; then :
8330 cat >>confdefs.h <<_ACEOF
8331#define HAVE_NET_IF_H 1
8332_ACEOF
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008333
8334fi
8335
Christian Heimes39258d32021-04-17 11:36:35 +02008336done
8337
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008338
Martin v. Löwis11017b12006-01-14 18:12:57 +00008339# On Linux, netlink.h requires asm/types.h
Christian Heimes39258d32021-04-17 11:36:35 +02008340for ac_header in linux/netlink.h
8341do :
8342 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00008343#ifdef HAVE_ASM_TYPES_H
8344#include <asm/types.h>
8345#endif
8346#ifdef HAVE_SYS_SOCKET_H
8347#include <sys/socket.h>
8348#endif
8349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350"
Christian Heimes39258d32021-04-17 11:36:35 +02008351if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
8352 cat >>confdefs.h <<_ACEOF
8353#define HAVE_LINUX_NETLINK_H 1
8354_ACEOF
Martin v. Löwis11017b12006-01-14 18:12:57 +00008355
8356fi
8357
Christian Heimes39258d32021-04-17 11:36:35 +02008358done
8359
Martin v. Löwis11017b12006-01-14 18:12:57 +00008360
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008361# On Linux, qrtr.h requires asm/types.h
Christian Heimes39258d32021-04-17 11:36:35 +02008362for ac_header in linux/qrtr.h
8363do :
8364 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008365#ifdef HAVE_ASM_TYPES_H
8366#include <asm/types.h>
8367#endif
8368#ifdef HAVE_SYS_SOCKET_H
8369#include <sys/socket.h>
8370#endif
8371
8372"
Christian Heimes39258d32021-04-17 11:36:35 +02008373if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8374 cat >>confdefs.h <<_ACEOF
8375#define HAVE_LINUX_QRTR_H 1
8376_ACEOF
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008377
8378fi
8379
Christian Heimes39258d32021-04-17 11:36:35 +02008380done
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008381
Christian Heimes39258d32021-04-17 11:36:35 +02008382
8383for ac_header in linux/vm_sockets.h
8384do :
8385 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04008386#ifdef HAVE_SYS_SOCKET_H
8387#include <sys/socket.h>
8388#endif
8389
8390"
Christian Heimes39258d32021-04-17 11:36:35 +02008391if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8392 cat >>confdefs.h <<_ACEOF
8393#define HAVE_LINUX_VM_SOCKETS_H 1
8394_ACEOF
caaveryeffc12f2017-09-06 18:18:10 -04008395
8396fi
8397
Christian Heimes39258d32021-04-17 11:36:35 +02008398done
8399
caaveryeffc12f2017-09-06 18:18:10 -04008400
karl ding360371f2020-04-29 15:31:19 -07008401# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Christian Heimes39258d32021-04-17 11:36:35 +02008402for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
8403do :
8404 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8405ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
Charles-François Natali47413c12011-10-06 19:47:44 +02008406#ifdef HAVE_SYS_SOCKET_H
8407#include <sys/socket.h>
8408#endif
8409
8410"
Christian Heimes39258d32021-04-17 11:36:35 +02008411if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8412 cat >>confdefs.h <<_ACEOF
8413#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8414_ACEOF
Charles-François Natali47413c12011-10-06 19:47:44 +02008415
8416fi
8417
Christian Heimes39258d32021-04-17 11:36:35 +02008418done
Charles-François Natali47413c12011-10-06 19:47:44 +02008419
8420
Guido van Rossum627b2d71993-12-24 10:39:16 +00008421# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008422was_it_defined=no
Christian Heimes39258d32021-04-17 11:36:35 +02008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8424$as_echo_n "checking for clock_t in time.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008427#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
8429_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +02008431 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008432 was_it_defined=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008433else
Martin v. Löwis11437992002-04-12 09:54:03 +00008434
8435
Christian Heimes39258d32021-04-17 11:36:35 +02008436$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008437
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008438
Guido van Rossum627b2d71993-12-24 10:39:16 +00008439fi
Christian Heimes39258d32021-04-17 11:36:35 +02008440rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008441
Christian Heimes39258d32021-04-17 11:36:35 +02008442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8443$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008444
Christian Heimes39258d32021-04-17 11:36:35 +02008445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8446$as_echo_n "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008448/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008449
Jesus Cea740f53a2010-04-28 11:35:30 +00008450#if defined(MAJOR_IN_MKDEV)
8451#include <sys/mkdev.h>
8452#elif defined(MAJOR_IN_SYSMACROS)
8453#include <sys/sysmacros.h>
8454#else
8455#include <sys/types.h>
8456#endif
8457
Neal Norwitz11690112002-07-30 01:08:28 +00008458int
Christian Heimes39258d32021-04-17 11:36:35 +02008459main ()
Neal Norwitz11690112002-07-30 01:08:28 +00008460{
Jesus Cea740f53a2010-04-28 11:35:30 +00008461
8462 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008463 ;
8464 return 0;
8465}
Matthias Kloseb159a552010-04-25 21:00:44 +00008466
Neal Norwitz11690112002-07-30 01:08:28 +00008467_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008468if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008469 ac_cv_has_makedev=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008470else
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008472fi
Christian Heimes39258d32021-04-17 11:36:35 +02008473rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02008475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8476$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008477if test "$ac_cv_has_makedev" = "yes"; then
8478
Christian Heimes39258d32021-04-17 11:36:35 +02008479$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008480
8481fi
8482
Christian Heimes985ecdc2013-11-20 11:46:18 +01008483# byte swapping
Christian Heimes39258d32021-04-17 11:36:35 +02008484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8485$as_echo_n "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8487/* end confdefs.h. */
8488
8489#ifdef HAVE_ENDIAN_H
8490#include <endian.h>
8491#elif defined(HAVE_SYS_ENDIAN_H)
8492#include <sys/endian.h>
8493#endif
8494
8495int
Christian Heimes39258d32021-04-17 11:36:35 +02008496main ()
Christian Heimes985ecdc2013-11-20 11:46:18 +01008497{
8498
8499 le64toh(1)
8500 ;
8501 return 0;
8502}
8503
8504_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008505if ac_fn_c_try_link "$LINENO"; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01008506 ac_cv_has_le64toh=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008507else
Christian Heimes985ecdc2013-11-20 11:46:18 +01008508 ac_cv_has_le64toh=no
8509fi
Christian Heimes39258d32021-04-17 11:36:35 +02008510rm -f core conftest.err conftest.$ac_objext \
Christian Heimes985ecdc2013-11-20 11:46:18 +01008511 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02008512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8513$as_echo "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008514if test "$ac_cv_has_le64toh" = "yes"; then
8515
Christian Heimes39258d32021-04-17 11:36:35 +02008516$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01008517
8518fi
8519
Martin v. Löwis399a6892002-10-04 10:22:02 +00008520use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008521# Don't use largefile support for GNU/Hurd
8522case $ac_sys_system in GNU*)
8523 use_lfs=no
8524esac
8525
Martin v. Löwis399a6892002-10-04 10:22:02 +00008526if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008527# Two defines needed to enable largefile support on various platforms
8528# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008529case $ac_sys_system/$ac_sys_release in
8530AIX*)
8531
Christian Heimes39258d32021-04-17 11:36:35 +02008532$as_echo "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00008533
8534 ;;
8535esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008536
Christian Heimes39258d32021-04-17 11:36:35 +02008537$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008538
8539
Christian Heimes39258d32021-04-17 11:36:35 +02008540$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008541
Martin v. Löwis399a6892002-10-04 10:22:02 +00008542fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008543
Guido van Rossum84e7b241996-08-19 21:59:00 +00008544# Add some code to confdefs.h so that the test for off_t works on SCO
8545cat >> confdefs.h <<\EOF
8546#if defined(SCO_DS)
8547#undef _OFF_T
8548#endif
8549EOF
8550
Guido van Rossumef2255b2000-03-10 22:30:29 +00008551# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008552ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008553if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008554
Christian Heimes39258d32021-04-17 11:36:35 +02008555else
Martin v. Löwis11437992002-04-12 09:54:03 +00008556
Christian Heimes39258d32021-04-17 11:36:35 +02008557cat >>confdefs.h <<_ACEOF
8558#define mode_t int
8559_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008560
8561fi
8562
Matthias Kloseb9621712010-04-24 17:59:49 +00008563ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008564if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008565
Christian Heimes39258d32021-04-17 11:36:35 +02008566else
Martin v. Löwis11437992002-04-12 09:54:03 +00008567
Christian Heimes39258d32021-04-17 11:36:35 +02008568cat >>confdefs.h <<_ACEOF
8569#define off_t long int
Christian Heimes32eba612021-03-19 10:29:25 +01008570_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008571
Pablo Galindo53e55292021-04-05 17:38:40 +01008572fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008573
Christian Heimes39258d32021-04-17 11:36:35 +02008574ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8575if test "x$ac_cv_type_pid_t" = xyes; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01008576
Christian Heimes39258d32021-04-17 11:36:35 +02008577else
8578
8579cat >>confdefs.h <<_ACEOF
8580#define pid_t int
8581_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008582
8583fi
8584
8585
Christian Heimes39258d32021-04-17 11:36:35 +02008586cat >>confdefs.h <<_ACEOF
8587#define RETSIGTYPE void
8588_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008589
Matthias Kloseb9621712010-04-24 17:59:49 +00008590ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008591if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008592
Christian Heimes39258d32021-04-17 11:36:35 +02008593else
Martin v. Löwis11437992002-04-12 09:54:03 +00008594
Christian Heimes39258d32021-04-17 11:36:35 +02008595cat >>confdefs.h <<_ACEOF
8596#define size_t unsigned int
8597_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
8599fi
8600
Christian Heimes39258d32021-04-17 11:36:35 +02008601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8602$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8603if ${ac_cv_type_uid_t+:} false; then :
8604 $as_echo_n "(cached) " >&6
8605else
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008607/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008608#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
8610_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +02008612 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008613 ac_cv_type_uid_t=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008614else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008615 ac_cv_type_uid_t=no
8616fi
Christian Heimes39258d32021-04-17 11:36:35 +02008617rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008618
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008619fi
Christian Heimes39258d32021-04-17 11:36:35 +02008620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8621$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008622if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008623
Christian Heimes39258d32021-04-17 11:36:35 +02008624$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008625
8626
Christian Heimes39258d32021-04-17 11:36:35 +02008627$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008628
8629fi
8630
Mark Dickinson983bc162012-12-02 12:11:38 +00008631
Matthias Kloseb9621712010-04-24 17:59:49 +00008632ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008633if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634
Christian Heimes39258d32021-04-17 11:36:35 +02008635$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008636
8637fi
8638
Stefan Krah1919b7e2012-03-21 18:25:23 +01008639ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008640if test "x$ac_cv_type___uint128_t" = xyes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01008641
Christian Heimes39258d32021-04-17 11:36:35 +02008642$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01008643
8644fi
8645
Jack Jansendd19cf82001-12-06 22:36:17 +00008646
Jessica Clarkedec07572021-03-31 11:12:39 +01008647# Sizes and alignments of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008648# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649# The cast to long int works around a bug in the HP C Compiler
8650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8652# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8654$as_echo_n "checking size of int... " >&6; }
8655if ${ac_cv_sizeof_int+:} false; then :
8656 $as_echo_n "(cached) " >&6
8657else
8658 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008659
Christian Heimes39258d32021-04-17 11:36:35 +02008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 if test "$ac_cv_type_int" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008664as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008665See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 else
8667 ac_cv_sizeof_int=0
8668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671fi
Christian Heimes39258d32021-04-17 11:36:35 +02008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8673$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674
8675
8676
Christian Heimes39258d32021-04-17 11:36:35 +02008677cat >>confdefs.h <<_ACEOF
8678#define SIZEOF_INT $ac_cv_sizeof_int
8679_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008680
8681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682# The cast to long int works around a bug in the HP C Compiler
8683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8685# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8687$as_echo_n "checking size of long... " >&6; }
8688if ${ac_cv_sizeof_long+:} false; then :
8689 $as_echo_n "(cached) " >&6
8690else
8691 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008692
Christian Heimes39258d32021-04-17 11:36:35 +02008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 if test "$ac_cv_type_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008697as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008698See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699 else
8700 ac_cv_sizeof_long=0
8701 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008703
Martin v. Löwis11437992002-04-12 09:54:03 +00008704fi
Christian Heimes39258d32021-04-17 11:36:35 +02008705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8706$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707
8708
8709
Christian Heimes39258d32021-04-17 11:36:35 +02008710cat >>confdefs.h <<_ACEOF
8711#define SIZEOF_LONG $ac_cv_sizeof_long
8712_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008713
8714
Jessica Clarkedec07572021-03-31 11:12:39 +01008715# The cast to long int works around a bug in the HP C Compiler,
8716# see AC_CHECK_SIZEOF for more information.
Christian Heimes39258d32021-04-17 11:36:35 +02008717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
8718$as_echo_n "checking alignment of long... " >&6; }
8719if ${ac_cv_alignof_long+:} false; then :
8720 $as_echo_n "(cached) " >&6
8721else
Jessica Clarkedec07572021-03-31 11:12:39 +01008722 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 +02008723#ifndef offsetof
8724# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
8725#endif
8726typedef struct { char x; long y; } ac__type_alignof_;"; then :
Jessica Clarkedec07572021-03-31 11:12:39 +01008727
Christian Heimes39258d32021-04-17 11:36:35 +02008728else
Jessica Clarkedec07572021-03-31 11:12:39 +01008729 if test "$ac_cv_type_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01008732as_fn_error 77 "cannot compute alignment of long
8733See \`config.log' for more details" "$LINENO" 5; }
8734 else
8735 ac_cv_alignof_long=0
8736 fi
8737fi
8738
8739fi
Christian Heimes39258d32021-04-17 11:36:35 +02008740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
8741$as_echo "$ac_cv_alignof_long" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01008742
8743
8744
Christian Heimes39258d32021-04-17 11:36:35 +02008745cat >>confdefs.h <<_ACEOF
8746#define ALIGNOF_LONG $ac_cv_alignof_long
8747_ACEOF
Jessica Clarkedec07572021-03-31 11:12:39 +01008748
8749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750# The cast to long int works around a bug in the HP C Compiler
8751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8753# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8755$as_echo_n "checking size of long long... " >&6; }
8756if ${ac_cv_sizeof_long_long+:} false; then :
8757 $as_echo_n "(cached) " >&6
8758else
8759 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 -07008760
Christian Heimes39258d32021-04-17 11:36:35 +02008761else
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008762 if test "$ac_cv_type_long_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008765as_fn_error 77 "cannot compute sizeof (long long)
8766See \`config.log' for more details" "$LINENO" 5; }
8767 else
8768 ac_cv_sizeof_long_long=0
8769 fi
8770fi
8771
8772fi
Christian Heimes39258d32021-04-17 11:36:35 +02008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8774$as_echo "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008775
8776
8777
Christian Heimes39258d32021-04-17 11:36:35 +02008778cat >>confdefs.h <<_ACEOF
8779#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8780_ACEOF
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008781
8782
8783# The cast to long int works around a bug in the HP C Compiler
8784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8786# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8788$as_echo_n "checking size of void *... " >&6; }
8789if ${ac_cv_sizeof_void_p+:} false; then :
8790 $as_echo_n "(cached) " >&6
8791else
8792 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 +00008793
Christian Heimes39258d32021-04-17 11:36:35 +02008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 if test "$ac_cv_type_void_p" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008798as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008799See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 else
8801 ac_cv_sizeof_void_p=0
8802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804
Martin v. Löwis11437992002-04-12 09:54:03 +00008805fi
Christian Heimes39258d32021-04-17 11:36:35 +02008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8807$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808
8809
8810
Christian Heimes39258d32021-04-17 11:36:35 +02008811cat >>confdefs.h <<_ACEOF
8812#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
8813_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008814
8815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816# The cast to long int works around a bug in the HP C Compiler
8817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8819# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8821$as_echo_n "checking size of short... " >&6; }
8822if ${ac_cv_sizeof_short+:} false; then :
8823 $as_echo_n "(cached) " >&6
8824else
8825 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 +00008826
Christian Heimes39258d32021-04-17 11:36:35 +02008827else
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 if test "$ac_cv_type_short" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008829 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008831as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008832See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 else
8834 ac_cv_sizeof_short=0
8835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837
Martin v. Löwis11437992002-04-12 09:54:03 +00008838fi
Christian Heimes39258d32021-04-17 11:36:35 +02008839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8840$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841
8842
8843
Christian Heimes39258d32021-04-17 11:36:35 +02008844cat >>confdefs.h <<_ACEOF
8845#define SIZEOF_SHORT $ac_cv_sizeof_short
8846_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008847
8848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849# The cast to long int works around a bug in the HP C Compiler
8850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8852# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8854$as_echo_n "checking size of float... " >&6; }
8855if ${ac_cv_sizeof_float+:} false; then :
8856 $as_echo_n "(cached) " >&6
8857else
8858 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 +00008859
Christian Heimes39258d32021-04-17 11:36:35 +02008860else
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 if test "$ac_cv_type_float" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008864as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008865See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 else
8867 ac_cv_sizeof_float=0
8868 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871fi
Christian Heimes39258d32021-04-17 11:36:35 +02008872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8873$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008874
8875
8876
Christian Heimes39258d32021-04-17 11:36:35 +02008877cat >>confdefs.h <<_ACEOF
8878#define SIZEOF_FLOAT $ac_cv_sizeof_float
8879_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008880
8881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882# The cast to long int works around a bug in the HP C Compiler
8883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8885# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8887$as_echo_n "checking size of double... " >&6; }
8888if ${ac_cv_sizeof_double+:} false; then :
8889 $as_echo_n "(cached) " >&6
8890else
8891 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 +00008892
Christian Heimes39258d32021-04-17 11:36:35 +02008893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 if test "$ac_cv_type_double" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008897as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008898See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899 else
8900 ac_cv_sizeof_double=0
8901 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903
Martin v. Löwis11437992002-04-12 09:54:03 +00008904fi
Christian Heimes39258d32021-04-17 11:36:35 +02008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8906$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907
8908
8909
Christian Heimes39258d32021-04-17 11:36:35 +02008910cat >>confdefs.h <<_ACEOF
8911#define SIZEOF_DOUBLE $ac_cv_sizeof_double
8912_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008913
8914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915# The cast to long int works around a bug in the HP C Compiler
8916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8918# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8920$as_echo_n "checking size of fpos_t... " >&6; }
8921if ${ac_cv_sizeof_fpos_t+:} false; then :
8922 $as_echo_n "(cached) " >&6
8923else
8924 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 +00008925
Christian Heimes39258d32021-04-17 11:36:35 +02008926else
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 if test "$ac_cv_type_fpos_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008930as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008931See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932 else
8933 ac_cv_sizeof_fpos_t=0
8934 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937fi
Christian Heimes39258d32021-04-17 11:36:35 +02008938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8939$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008940
8941
8942
Christian Heimes39258d32021-04-17 11:36:35 +02008943cat >>confdefs.h <<_ACEOF
8944#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
8945_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008946
Michael W. Hudson54241132001-12-07 15:38:26 +00008947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948# The cast to long int works around a bug in the HP C Compiler
8949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8951# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8953$as_echo_n "checking size of size_t... " >&6; }
8954if ${ac_cv_sizeof_size_t+:} false; then :
8955 $as_echo_n "(cached) " >&6
8956else
8957 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 +00008958
Christian Heimes39258d32021-04-17 11:36:35 +02008959else
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 if test "$ac_cv_type_size_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008963as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008964See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965 else
8966 ac_cv_sizeof_size_t=0
8967 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008969
Martin v. Löwis18e16552006-02-15 17:27:45 +00008970fi
Christian Heimes39258d32021-04-17 11:36:35 +02008971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8972$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973
8974
8975
Christian Heimes39258d32021-04-17 11:36:35 +02008976cat >>confdefs.h <<_ACEOF
8977#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8978_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00008979
8980
Jessica Clarkedec07572021-03-31 11:12:39 +01008981# The cast to long int works around a bug in the HP C Compiler,
8982# see AC_CHECK_SIZEOF for more information.
Christian Heimes39258d32021-04-17 11:36:35 +02008983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5
8984$as_echo_n "checking alignment of size_t... " >&6; }
8985if ${ac_cv_alignof_size_t+:} false; then :
8986 $as_echo_n "(cached) " >&6
8987else
Jessica Clarkedec07572021-03-31 11:12:39 +01008988 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 +02008989#ifndef offsetof
8990# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
8991#endif
8992typedef struct { char x; size_t y; } ac__type_alignof_;"; then :
Jessica Clarkedec07572021-03-31 11:12:39 +01008993
Christian Heimes39258d32021-04-17 11:36:35 +02008994else
Jessica Clarkedec07572021-03-31 11:12:39 +01008995 if test "$ac_cv_type_size_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01008998as_fn_error 77 "cannot compute alignment of size_t
8999See \`config.log' for more details" "$LINENO" 5; }
9000 else
9001 ac_cv_alignof_size_t=0
9002 fi
9003fi
9004
9005fi
Christian Heimes39258d32021-04-17 11:36:35 +02009006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5
9007$as_echo "$ac_cv_alignof_size_t" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01009008
9009
9010
Christian Heimes39258d32021-04-17 11:36:35 +02009011cat >>confdefs.h <<_ACEOF
9012#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t
9013_ACEOF
Jessica Clarkedec07572021-03-31 11:12:39 +01009014
9015
Christian Heimes400adb02008-02-01 08:12:03 +00009016# The cast to long int works around a bug in the HP C Compiler
9017# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9018# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9019# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
9021$as_echo_n "checking size of pid_t... " >&6; }
9022if ${ac_cv_sizeof_pid_t+:} false; then :
9023 $as_echo_n "(cached) " >&6
9024else
9025 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 +00009026
Christian Heimes39258d32021-04-17 11:36:35 +02009027else
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 if test "$ac_cv_type_pid_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009031as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009032See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00009033 else
9034 ac_cv_sizeof_pid_t=0
9035 fi
9036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037
Christian Heimes400adb02008-02-01 08:12:03 +00009038fi
Christian Heimes39258d32021-04-17 11:36:35 +02009039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
9040$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00009041
9042
9043
Christian Heimes39258d32021-04-17 11:36:35 +02009044cat >>confdefs.h <<_ACEOF
9045#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
9046_ACEOF
Christian Heimes400adb02008-02-01 08:12:03 +00009047
9048
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009049# The cast to long int works around a bug in the HP C Compiler
9050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9052# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
9054$as_echo_n "checking size of uintptr_t... " >&6; }
9055if ${ac_cv_sizeof_uintptr_t+:} false; then :
9056 $as_echo_n "(cached) " >&6
9057else
9058 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 -07009059
Christian Heimes39258d32021-04-17 11:36:35 +02009060else
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009061 if test "$ac_cv_type_uintptr_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009064as_fn_error 77 "cannot compute sizeof (uintptr_t)
9065See \`config.log' for more details" "$LINENO" 5; }
9066 else
9067 ac_cv_sizeof_uintptr_t=0
9068 fi
9069fi
9070
9071fi
Christian Heimes39258d32021-04-17 11:36:35 +02009072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
9073$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009074
9075
9076
Christian Heimes39258d32021-04-17 11:36:35 +02009077cat >>confdefs.h <<_ACEOF
9078#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
9079_ACEOF
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009080
9081
Michael W. Hudson54241132001-12-07 15:38:26 +00009082
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009083
Christian Heimes39258d32021-04-17 11:36:35 +02009084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
9085$as_echo_n "checking for long double... " >&6; }
9086if ${ac_cv_type_long_double+:} false; then :
9087 $as_echo_n "(cached) " >&6
9088else
Eitan Adler3055c942018-05-15 22:58:09 -07009089 if test "$GCC" = yes; then
9090 ac_cv_type_long_double=yes
9091 else
9092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9093/* end confdefs.h. */
9094/* The Stardent Vistra knows sizeof (long double), but does
9095 not support it. */
9096 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009097int
Christian Heimes39258d32021-04-17 11:36:35 +02009098main ()
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009099{
Eitan Adler3055c942018-05-15 22:58:09 -07009100static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9101 sizeof (double) <= sizeof (long double))];
9102test_array [0] = 0;
9103return test_array [0];
9104
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009105 ;
9106 return 0;
9107}
9108_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009109if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009110 ac_cv_type_long_double=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009111else
Eitan Adler3055c942018-05-15 22:58:09 -07009112 ac_cv_type_long_double=no
9113fi
Christian Heimes39258d32021-04-17 11:36:35 +02009114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -07009115 fi
9116fi
Christian Heimes39258d32021-04-17 11:36:35 +02009117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9118$as_echo "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -07009119 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009120
Christian Heimes39258d32021-04-17 11:36:35 +02009121$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009122
Eitan Adler3055c942018-05-15 22:58:09 -07009123 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009124
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009125# The cast to long int works around a bug in the HP C Compiler
9126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9128# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9130$as_echo_n "checking size of long double... " >&6; }
9131if ${ac_cv_sizeof_long_double+:} false; then :
9132 $as_echo_n "(cached) " >&6
9133else
9134 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 +00009135
Christian Heimes39258d32021-04-17 11:36:35 +02009136else
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 if test "$ac_cv_type_long_double" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009140as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009141See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009142 else
9143 ac_cv_sizeof_long_double=0
9144 fi
9145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009146
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009147fi
Christian Heimes39258d32021-04-17 11:36:35 +02009148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9149$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009150
9151
9152
Christian Heimes39258d32021-04-17 11:36:35 +02009153cat >>confdefs.h <<_ACEOF
9154#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9155_ACEOF
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009156
9157
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159# The cast to long int works around a bug in the HP C Compiler
9160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9162# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9164$as_echo_n "checking size of _Bool... " >&6; }
9165if ${ac_cv_sizeof__Bool+:} false; then :
9166 $as_echo_n "(cached) " >&6
9167else
9168 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 +00009169
Christian Heimes39258d32021-04-17 11:36:35 +02009170else
Matthias Kloseb9621712010-04-24 17:59:49 +00009171 if test "$ac_cv_type__Bool" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009174as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009175See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009176 else
9177 ac_cv_sizeof__Bool=0
9178 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009180
Thomas Woutersb2137042007-02-01 18:02:27 +00009181fi
Christian Heimes39258d32021-04-17 11:36:35 +02009182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9183$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184
9185
9186
Christian Heimes39258d32021-04-17 11:36:35 +02009187cat >>confdefs.h <<_ACEOF
9188#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9189_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +00009190
9191
Thomas Woutersb2137042007-02-01 18:02:27 +00009192
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009193# The cast to long int works around a bug in the HP C Compiler
9194# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9195# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9196# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9198$as_echo_n "checking size of off_t... " >&6; }
9199if ${ac_cv_sizeof_off_t+:} false; then :
9200 $as_echo_n "(cached) " >&6
9201else
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009203#ifdef HAVE_SYS_TYPES_H
9204#include <sys/types.h>
9205#endif
9206
Christian Heimes39258d32021-04-17 11:36:35 +02009207"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009208
Christian Heimes39258d32021-04-17 11:36:35 +02009209else
Matthias Kloseb9621712010-04-24 17:59:49 +00009210 if test "$ac_cv_type_off_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009211 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9212$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009213as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009214See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009215 else
9216 ac_cv_sizeof_off_t=0
9217 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009219
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009220fi
Christian Heimes39258d32021-04-17 11:36:35 +02009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9222$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009223
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009224
9225
Christian Heimes39258d32021-04-17 11:36:35 +02009226cat >>confdefs.h <<_ACEOF
9227#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
9228_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009229
Michael W. Hudson54241132001-12-07 15:38:26 +00009230
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009231
Christian Heimes39258d32021-04-17 11:36:35 +02009232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9233$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009234if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009235 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009236
Christian Heimes39258d32021-04-17 11:36:35 +02009237$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009238
Christian Heimes39258d32021-04-17 11:36:35 +02009239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9240$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009241else
Christian Heimes39258d32021-04-17 11:36:35 +02009242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009244fi
9245
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009246# The cast to long int works around a bug in the HP C Compiler
9247# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9248# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9249# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9251$as_echo_n "checking size of time_t... " >&6; }
9252if ${ac_cv_sizeof_time_t+:} false; then :
9253 $as_echo_n "(cached) " >&6
9254else
Matthias Kloseb9621712010-04-24 17:59:49 +00009255 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009256#ifdef HAVE_SYS_TYPES_H
9257#include <sys/types.h>
9258#endif
9259#ifdef HAVE_TIME_H
9260#include <time.h>
9261#endif
9262
Christian Heimes39258d32021-04-17 11:36:35 +02009263"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009264
Christian Heimes39258d32021-04-17 11:36:35 +02009265else
Matthias Kloseb9621712010-04-24 17:59:49 +00009266 if test "$ac_cv_type_time_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009267 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009269as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009270See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009271 else
9272 ac_cv_sizeof_time_t=0
9273 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009275
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009276fi
Christian Heimes39258d32021-04-17 11:36:35 +02009277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9278$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009280
9281
Christian Heimes39258d32021-04-17 11:36:35 +02009282cat >>confdefs.h <<_ACEOF
9283#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
9284_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009285
Michael W. Hudson54241132001-12-07 15:38:26 +00009286
9287
Trent Mick635f6fb2000-08-23 21:33:05 +00009288# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009289ac_save_cc="$CC"
9290if test "$ac_cv_kpthread" = "yes"
9291then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009292elif test "$ac_cv_kthread" = "yes"
9293then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009294elif test "$ac_cv_pthread" = "yes"
9295then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009296fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009297
Christian Heimes39258d32021-04-17 11:36:35 +02009298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9299$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009300have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009302/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009303
9304 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009305int
Christian Heimes39258d32021-04-17 11:36:35 +02009306main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009307{
Guido van Rossum12580492000-09-24 16:47:19 +00009308pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 ;
9310 return 0;
9311}
Matthias Kloseb159a552010-04-25 21:00:44 +00009312
Martin v. Löwis11437992002-04-12 09:54:03 +00009313_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009314if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009315 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009316fi
Christian Heimes39258d32021-04-17 11:36:35 +02009317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9319$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009320if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009322# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9323# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9324# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9326$as_echo_n "checking size of pthread_t... " >&6; }
9327if ${ac_cv_sizeof_pthread_t+:} false; then :
9328 $as_echo_n "(cached) " >&6
9329else
Matthias Kloseb9621712010-04-24 17:59:49 +00009330 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009331#ifdef HAVE_PTHREAD_H
9332#include <pthread.h>
9333#endif
9334
Christian Heimes39258d32021-04-17 11:36:35 +02009335"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009336
Christian Heimes39258d32021-04-17 11:36:35 +02009337else
Matthias Kloseb9621712010-04-24 17:59:49 +00009338 if test "$ac_cv_type_pthread_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009341as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009342See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009343 else
9344 ac_cv_sizeof_pthread_t=0
9345 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009347
Trent Mick635f6fb2000-08-23 21:33:05 +00009348fi
Christian Heimes39258d32021-04-17 11:36:35 +02009349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9350$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009351
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009352
9353
Christian Heimes39258d32021-04-17 11:36:35 +02009354cat >>confdefs.h <<_ACEOF
9355#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
9356_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009357
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009358
Trent Mick635f6fb2000-08-23 21:33:05 +00009359fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009360
9361# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9362# This checking will be unnecessary after removing deprecated TLS API.
9363# The cast to long int works around a bug in the HP C Compiler
9364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9366# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9368$as_echo_n "checking size of pthread_key_t... " >&6; }
9369if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9370 $as_echo_n "(cached) " >&6
9371else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009372 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 +02009373"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009374
Christian Heimes39258d32021-04-17 11:36:35 +02009375else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009376 if test "$ac_cv_type_pthread_key_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009377 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009379as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9380See \`config.log' for more details" "$LINENO" 5; }
9381 else
9382 ac_cv_sizeof_pthread_key_t=0
9383 fi
9384fi
9385
9386fi
Christian Heimes39258d32021-04-17 11:36:35 +02009387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9388$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009389
9390
9391
Christian Heimes39258d32021-04-17 11:36:35 +02009392cat >>confdefs.h <<_ACEOF
9393#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9394_ACEOF
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009395
9396
Christian Heimes39258d32021-04-17 11:36:35 +02009397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9398$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009399if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9401/* end confdefs.h. */
9402#include <pthread.h>
9403int
Christian Heimes39258d32021-04-17 11:36:35 +02009404main ()
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009405{
9406pthread_key_t k; k * 1;
9407 ;
9408 return 0;
9409}
9410_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009411if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009412 ac_pthread_key_t_is_arithmetic_type=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009413else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009414 ac_pthread_key_t_is_arithmetic_type=no
9415
9416fi
Christian Heimes39258d32021-04-17 11:36:35 +02009417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9419$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009420 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9421
Christian Heimes39258d32021-04-17 11:36:35 +02009422$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009423
9424 fi
9425else
Christian Heimes39258d32021-04-17 11:36:35 +02009426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9427$as_echo "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009428fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009429CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009430
Michael W. Hudson54241132001-12-07 15:38:26 +00009431
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009432case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009433 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009434 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9435 ;;
9436 Darwin/*)
9437 OTHER_LIBTOOL_OPT=""
9438 ;;
9439esac
9440
9441
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009442
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009443case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009444 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009445 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9446 if test "${enable_universalsdk}"; then
9447 :
9448 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009449 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009450 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009451 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009453 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009454 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009455 if test ${gcc_version} '<' 4.0
9456 then
9457 LIBTOOL_CRUFT="-lcc_dynamic"
9458 else
9459 LIBTOOL_CRUFT=""
9460 fi
Christian Heimes39258d32021-04-17 11:36:35 +02009461 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009462 ac_osx_32bit=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009463else
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009465/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009466
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009467 #include <unistd.h>
9468 int main(int argc, char*argv[])
9469 {
9470 if (sizeof(long) == 4) {
9471 return 0;
9472 } else {
9473 return 1;
9474 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009475 }
9476
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009477_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009478if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009479 ac_osx_32bit=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009480else
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9484 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009485fi
9486
9487
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009488 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009489 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009490 i386)
9491 MACOSX_DEFAULT_ARCH="i386"
9492 ;;
9493 ppc)
9494 MACOSX_DEFAULT_ARCH="ppc"
9495 ;;
9496 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009497 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009498 ;;
9499 esac
9500 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009501 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009502 i386)
9503 MACOSX_DEFAULT_ARCH="x86_64"
9504 ;;
9505 ppc)
9506 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009507 ;;
9508 arm64)
9509 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009510 ;;
9511 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009512 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009513 ;;
9514 esac
9515
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009516 fi
9517
9518 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009519 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009520 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009521esac
Christian Heimes39258d32021-04-17 11:36:35 +02009522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9523$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009524if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009525then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009526 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009528 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009529
Christian Heimes39258d32021-04-17 11:36:35 +02009530$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009531
Christian Heimes39258d32021-04-17 11:36:35 +02009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9533$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009534 if test $enable_shared = "yes"
9535 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009536 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 +00009537 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009538else
Christian Heimes39258d32021-04-17 11:36:35 +02009539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009541fi
9542
Christian Heimes39258d32021-04-17 11:36:35 +02009543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9544$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009545case $ac_sys_system/$ac_sys_release in
9546 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009547
Christian Heimes39258d32021-04-17 11:36:35 +02009548$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009549
Christian Heimes39258d32021-04-17 11:36:35 +02009550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9551$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009552 ;;
9553 *)
Christian Heimes39258d32021-04-17 11:36:35 +02009554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009556 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009557esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009558
Guido van Rossum0a516c91994-09-12 10:58:40 +00009559# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009560
Michael W. Hudson54241132001-12-07 15:38:26 +00009561
9562
9563
9564
Benjamin Peterson99f03762010-04-11 22:15:28 +00009565
Thomas Wouters477c8d52006-05-27 19:21:47 +00009566
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009567# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9568# -- usually .so, .sl on HP-UX, .dll on Cygwin
Christian Heimes39258d32021-04-17 11:36:35 +02009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9570$as_echo_n "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009571if test -z "$SHLIB_SUFFIX"; then
9572 case $ac_sys_system in
9573 hp*|HP*)
9574 case `uname -m` in
9575 ia64) SHLIB_SUFFIX=.so;;
9576 *) SHLIB_SUFFIX=.sl;;
9577 esac
9578 ;;
9579 CYGWIN*) SHLIB_SUFFIX=.dll;;
9580 *) SHLIB_SUFFIX=.so;;
9581 esac
9582fi
Christian Heimes39258d32021-04-17 11:36:35 +02009583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9584$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009585
Guido van Rossum0a516c91994-09-12 10:58:40 +00009586# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009587# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009588# (Shared libraries in this instance are shared modules to be loaded into
9589# Python, as opposed to building Python itself as a shared library.)
Christian Heimes39258d32021-04-17 11:36:35 +02009590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9591$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009592if test -z "$LDSHARED"
9593then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009594 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009595 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009596 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009597 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009598 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009600 if test "$GCC" = "yes" ; then
9601 LDSHARED='$(CC) -shared'
9602 LDCXXSHARED='$(CXX) -shared'
9603 else
9604 LDSHARED='$(CC) -G'
9605 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009606 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009607 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009608 if test "$GCC" = "yes" ; then
9609 LDSHARED='$(CC) -shared'
9610 LDCXXSHARED='$(CXX) -shared'
9611 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009612 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009613 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009614 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009615 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009616 LDSHARED='$(CC) -bundle'
9617 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009618 if test "$enable_framework" ; then
9619 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009620 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9621 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009622 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009623 else
9624 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009625 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009626 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009627 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009628 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009629 LDSHARED='$(CC) -bundle'
9630 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009631 if test "$enable_framework" ; then
9632 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009633 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9634 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009635 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009636 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009637 # No framework, use the Python app as bundle-loader
9638 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009639 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009640 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009641 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009642 Darwin/*)
9643 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9644 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009645
Ned Deily36820b62014-06-25 13:44:22 -07009646 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9647 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9648 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9649 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9650 if test ${dep_target_major} -eq 10 && \
9651 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009652 then
Ned Deily36820b62014-06-25 13:44:22 -07009653 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009654 LDSHARED='$(CC) -bundle'
9655 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009656 if test "$enable_framework" ; then
9657 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009658 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9659 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009660 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009661 else
9662 # No framework, use the Python app as bundle-loader
9663 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9664 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009665 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009666 fi
Ned Deily36820b62014-06-25 13:44:22 -07009667 else
9668 # building for OS X 10.3 and later
9669 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9670 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9671 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009672 fi
9673 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009674 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009675 LDSHARED='$(CC) -shared'
9676 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009677 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009678 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009679 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009680 LDSHARED='$(CC) -shared'
9681 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009682 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009683 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009684 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009685 OpenBSD*)
9686 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9687 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009688 LDSHARED='$(CC) -shared $(CCSHARED)'
9689 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009690 else
9691 case `uname -r` in
9692 [01].* | 2.[0-7] | 2.[0-7].*)
9693 LDSHARED="ld -Bshareable ${LDFLAGS}"
9694 ;;
9695 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009696 LDSHARED='$(CC) -shared $(CCSHARED)'
9697 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009698 ;;
9699 esac
9700 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009701 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009702 LDSHARED='$(CC) -shared'
9703 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009704 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009705 if test "$GCC" = "yes" ; then
9706 LDSHARED='$(CC) -shared'
9707 LDCXXSHARED='$(CXX) -shared'
9708 else
9709 LDSHARED='$(CC) -G'
9710 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009711 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009712 SCO_SV*)
9713 LDSHARED='$(CC) -Wl,-G,-Bexport'
9714 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9715 CYGWIN*)
9716 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9717 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009718 *) LDSHARED="ld";;
9719 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009720fi
Christian Heimes39258d32021-04-17 11:36:35 +02009721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9722$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009723LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009724BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009725# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009726# library (module) -- this is only needed for a few systems
Christian Heimes39258d32021-04-17 11:36:35 +02009727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9728$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009729if test -z "$CCSHARED"
9730then
Guido van Rossum07397971997-04-29 21:49:50 +00009731 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009732 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009733 then CCSHARED="-fPIC";
9734 elif test `uname -p` = sparc;
9735 then CCSHARED="-xcode=pic32";
9736 else CCSHARED="-Kpic";
9737 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009738 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009739 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009740 else CCSHARED="+z";
9741 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009742 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009743 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009744 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009745 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009746 if test "$GCC" = "yes"
9747 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009748 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009749 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009750 SCO_SV*)
9751 if test "$GCC" = "yes"
9752 then CCSHARED="-fPIC"
9753 else CCSHARED="-Kpic -belf"
9754 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009755 VxWorks*)
9756 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009757 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009758fi
Christian Heimes39258d32021-04-17 11:36:35 +02009759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9760$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009761# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009762# the python executable -- this is only needed for a few systems
Christian Heimes39258d32021-04-17 11:36:35 +02009763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9764$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009765if test -z "$LINKFORSHARED"
9766then
Guido van Rossum07397971997-04-29 21:49:50 +00009767 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009768 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009769 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009770 LINKFORSHARED="-Wl,-E -Wl,+s";;
9771# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009772 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009773 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009774 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009776 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009777
9778 # Issue #18075: the default maximum stack size (8MBytes) is too
9779 # small for the default recursion limit. Increase the stack size
9780 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009781 # Note: This matches the value of THREAD_STACK_SIZE in
9782 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009783 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9784
Jack Jansene578a632001-08-15 01:27:14 +00009785 if test "$enable_framework"
9786 then
Jack Jansenda49e192005-01-07 13:08:22 +00009787 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009788 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009789 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009790 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009791 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009792 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009793 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009794 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9795 then
9796 LINKFORSHARED="-Wl,--export-dynamic"
9797 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009798 SunOS/5*) case $CC in
9799 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009800 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009801 then
9802 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009803 fi;;
9804 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009805 CYGWIN*)
9806 if test $enable_shared = "no"
9807 then
9808 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9809 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009810 QNX*)
9811 # -Wl,-E causes the symbols to be added to the dynamic
9812 # symbol table so that they can be found when a module
9813 # is loaded. -N 2048K causes the stack size to be set
9814 # to 2048 kilobytes so that the stack doesn't overflow
9815 # when running test_compile.py.
9816 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009817 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009818 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009819 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009820fi
Christian Heimes39258d32021-04-17 11:36:35 +02009821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9822$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009823
Michael W. Hudson54241132001-12-07 15:38:26 +00009824
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009825
Christian Heimes39258d32021-04-17 11:36:35 +02009826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9827$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009828if test ! "$LIBRARY" = "$LDLIBRARY"
9829then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009830 case $ac_sys_system in
9831 CYGWIN*)
9832 # Cygwin needs CCSHARED when building extension DLLs
9833 # but not when building the interpreter DLL.
9834 CFLAGSFORSHARED='';;
9835 *)
9836 CFLAGSFORSHARED='$(CCSHARED)'
9837 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009838fi
Christian Heimes39258d32021-04-17 11:36:35 +02009839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9840$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009841
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009842# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9843# library (with --enable-shared).
9844# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009845# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9846# if it is not required, since it creates a dependency of the shared library
9847# to LIBS. This, in turn, means that applications linking the shared libpython
9848# don't need to link LIBS explicitly. The default should be only changed
9849# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009850
Christian Heimes39258d32021-04-17 11:36:35 +02009851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9852$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009853case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009854 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009855 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009856esac
Christian Heimes39258d32021-04-17 11:36:35 +02009857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9858$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009859
9860
Guido van Rossum627b2d71993-12-24 10:39:16 +00009861# checks for libraries
Christian Heimes39258d32021-04-17 11:36:35 +02009862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9863$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
9864if ${ac_cv_lib_sendfile_sendfile+:} false; then :
9865 $as_echo_n "(cached) " >&6
9866else
Georg Brandl941f9562011-02-25 15:21:47 +00009867 ac_check_lib_save_LIBS=$LIBS
9868LIBS="-lsendfile $LIBS"
9869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9870/* end confdefs.h. */
9871
9872/* Override any GCC internal prototype to avoid an error.
9873 Use char because int might match the return type of a GCC
9874 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009875#ifdef __cplusplus
9876extern "C"
9877#endif
Georg Brandl941f9562011-02-25 15:21:47 +00009878char sendfile ();
9879int
Christian Heimes39258d32021-04-17 11:36:35 +02009880main ()
Georg Brandl941f9562011-02-25 15:21:47 +00009881{
9882return sendfile ();
9883 ;
9884 return 0;
9885}
9886_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009887if ac_fn_c_try_link "$LINENO"; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009888 ac_cv_lib_sendfile_sendfile=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009889else
Georg Brandl941f9562011-02-25 15:21:47 +00009890 ac_cv_lib_sendfile_sendfile=no
9891fi
Christian Heimes39258d32021-04-17 11:36:35 +02009892rm -f core conftest.err conftest.$ac_objext \
Georg Brandl941f9562011-02-25 15:21:47 +00009893 conftest$ac_exeext conftest.$ac_ext
9894LIBS=$ac_check_lib_save_LIBS
9895fi
Christian Heimes39258d32021-04-17 11:36:35 +02009896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9897$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
9898if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
9899 cat >>confdefs.h <<_ACEOF
9900#define HAVE_LIBSENDFILE 1
9901_ACEOF
Georg Brandl941f9562011-02-25 15:21:47 +00009902
9903 LIBS="-lsendfile $LIBS"
9904
9905fi
9906
Christian Heimes39258d32021-04-17 11:36:35 +02009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9908$as_echo_n "checking for dlopen in -ldl... " >&6; }
9909if ${ac_cv_lib_dl_dlopen+:} false; then :
9910 $as_echo_n "(cached) " >&6
9911else
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009913LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917/* Override any GCC internal prototype to avoid an error.
9918 Use char because int might match the return type of a GCC
9919 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009920#ifdef __cplusplus
9921extern "C"
9922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009923char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009924int
Christian Heimes39258d32021-04-17 11:36:35 +02009925main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ;
9929 return 0;
9930}
9931_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 ac_cv_lib_dl_dlopen=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009934else
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009936fi
Christian Heimes39258d32021-04-17 11:36:35 +02009937rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009939LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009940fi
Christian Heimes39258d32021-04-17 11:36:35 +02009941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9942$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9943if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
9944 cat >>confdefs.h <<_ACEOF
9945#define HAVE_LIBDL 1
9946_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009948 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009949
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009950fi
9951 # Dynamic linking for SunOS/Solaris and SYSV
Christian Heimes39258d32021-04-17 11:36:35 +02009952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9953$as_echo_n "checking for shl_load in -ldld... " >&6; }
9954if ${ac_cv_lib_dld_shl_load+:} false; then :
9955 $as_echo_n "(cached) " >&6
9956else
Martin v. Löwis11437992002-04-12 09:54:03 +00009957 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009958LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009962/* Override any GCC internal prototype to avoid an error.
9963 Use char because int might match the return type of a GCC
9964 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009965#ifdef __cplusplus
9966extern "C"
9967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009968char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009969int
Christian Heimes39258d32021-04-17 11:36:35 +02009970main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009972return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ;
9974 return 0;
9975}
9976_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009977if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 ac_cv_lib_dld_shl_load=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009979else
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009981fi
Christian Heimes39258d32021-04-17 11:36:35 +02009982rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009984LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009985fi
Christian Heimes39258d32021-04-17 11:36:35 +02009986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9987$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9988if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
9989 cat >>confdefs.h <<_ACEOF
9990#define HAVE_LIBDLD 1
9991_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009992
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009993 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009995fi
9996 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009997
Michael Felt0d3ccb42017-12-30 22:39:20 +01009998# checks for uuid.h location
Christian Heimes39258d32021-04-17 11:36:35 +02009999for ac_header in uuid/uuid.h uuid.h
10000do :
10001 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10002ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10003if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10004 cat >>confdefs.h <<_ACEOF
10005#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10006_ACEOF
Michael Felt0d3ccb42017-12-30 22:39:20 +010010007
10008fi
10009
Christian Heimes39258d32021-04-17 11:36:35 +020010010done
Michael Felt0d3ccb42017-12-30 22:39:20 +010010011
Christian Heimes39258d32021-04-17 11:36:35 +020010012
10013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
10014$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10016/* end confdefs.h. */
10017#include <uuid/uuid.h>
10018int
Christian Heimes39258d32021-04-17 11:36:35 +020010019main ()
Berker Peksag9a10ff42017-11-08 23:09:16 +030010020{
10021
10022#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +030010023void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +030010024#endif
10025
10026 ;
10027 return 0;
10028}
10029_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010030if ac_fn_c_try_compile "$LINENO"; then :
Berker Peksag9a10ff42017-11-08 23:09:16 +030010031
Christian Heimes39258d32021-04-17 11:36:35 +020010032$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +030010033
Christian Heimes39258d32021-04-17 11:36:35 +020010034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10035$as_echo "yes" >&6; }
10036else
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10038$as_echo "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010039
10040fi
Christian Heimes39258d32021-04-17 11:36:35 +020010041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +030010042
Michael Felt0d3ccb42017-12-30 22:39:20 +010010043# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +000010044# FreeBSD and OpenBSD provides support as well
Christian Heimes39258d32021-04-17 11:36:35 +020010045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
10046$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10048/* end confdefs.h. */
10049#include <uuid.h>
10050int
Christian Heimes39258d32021-04-17 11:36:35 +020010051main ()
Michael Felt0d3ccb42017-12-30 22:39:20 +010010052{
10053
10054#ifndef uuid_create
10055void *x = uuid_create
10056#endif
10057
10058 ;
10059 return 0;
10060}
10061_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010062if ac_fn_c_try_compile "$LINENO"; then :
Michael Felt0d3ccb42017-12-30 22:39:20 +010010063
Christian Heimes39258d32021-04-17 11:36:35 +020010064$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010010065
Christian Heimes39258d32021-04-17 11:36:35 +020010066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10067$as_echo "yes" >&6; }
10068else
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10070$as_echo "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010071
10072fi
Christian Heimes39258d32021-04-17 11:36:35 +020010073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010010074
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010075# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
10076# stream in big-endian byte-order
Christian Heimes39258d32021-04-17 11:36:35 +020010077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
10078$as_echo_n "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10080/* end confdefs.h. */
10081#include <uuid.h>
10082int
Christian Heimes39258d32021-04-17 11:36:35 +020010083main ()
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010084{
10085
10086#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040010087void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010088#endif
10089
10090 ;
10091 return 0;
10092}
10093_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010094if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010095
Christian Heimes39258d32021-04-17 11:36:35 +020010096$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010097
Christian Heimes39258d32021-04-17 11:36:35 +020010098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10099$as_echo "yes" >&6; }
10100else
10101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10102$as_echo "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010103
10104fi
Christian Heimes39258d32021-04-17 11:36:35 +020010105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010106
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010107# 'Real Time' functions on Solaris
10108# posix4 on Solaris 2.6
10109# pthread (first!) on Linux
Christian Heimes39258d32021-04-17 11:36:35 +020010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
10111$as_echo_n "checking for library containing sem_init... " >&6; }
10112if ${ac_cv_search_sem_init+:} false; then :
10113 $as_echo_n "(cached) " >&6
10114else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010115 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119/* Override any GCC internal prototype to avoid an error.
10120 Use char because int might match the return type of a GCC
10121 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010122#ifdef __cplusplus
10123extern "C"
10124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010125char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010126int
Christian Heimes39258d32021-04-17 11:36:35 +020010127main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 ;
10131 return 0;
10132}
10133_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010134for ac_lib in '' pthread rt posix4; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135 if test -z "$ac_lib"; then
10136 ac_res="none required"
10137 else
10138 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010139 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140 fi
Christian Heimes39258d32021-04-17 11:36:35 +020010141 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010143fi
Christian Heimes39258d32021-04-17 11:36:35 +020010144rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020010146 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149done
Christian Heimes39258d32021-04-17 11:36:35 +020010150if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010151
Christian Heimes39258d32021-04-17 11:36:35 +020010152else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153 ac_cv_search_sem_init=no
10154fi
10155rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010156LIBS=$ac_func_search_save_LIBS
10157fi
Christian Heimes39258d32021-04-17 11:36:35 +020010158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10159$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160ac_res=$ac_cv_search_sem_init
Christian Heimes39258d32021-04-17 11:36:35 +020010161if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010163
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010164fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010165
Martin v. Löwis519adae2003-09-20 10:47:47 +000010166
Martin v. Löwis19d17342003-06-14 21:03:05 +000010167# check if we need libintl for locale functions
Christian Heimes39258d32021-04-17 11:36:35 +020010168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10169$as_echo_n "checking for textdomain in -lintl... " >&6; }
10170if ${ac_cv_lib_intl_textdomain+:} false; then :
10171 $as_echo_n "(cached) " >&6
10172else
Martin v. Löwis19d17342003-06-14 21:03:05 +000010173 ac_check_lib_save_LIBS=$LIBS
10174LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010176/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178/* Override any GCC internal prototype to avoid an error.
10179 Use char because int might match the return type of a GCC
10180 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010181#ifdef __cplusplus
10182extern "C"
10183#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010184char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010185int
Christian Heimes39258d32021-04-17 11:36:35 +020010186main ()
Martin v. Löwis19d17342003-06-14 21:03:05 +000010187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010189 ;
10190 return 0;
10191}
10192_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010193if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010194 ac_cv_lib_intl_textdomain=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010195else
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010197fi
Christian Heimes39258d32021-04-17 11:36:35 +020010198rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010200LIBS=$ac_check_lib_save_LIBS
10201fi
Christian Heimes39258d32021-04-17 11:36:35 +020010202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10203$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
10204if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010205
Christian Heimes39258d32021-04-17 11:36:35 +020010206$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010207
Brett Cannonc6d936e2009-06-07 20:09:53 +000010208 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010209fi
10210
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010211
10212# checks for system dependent C++ extensions support
10213case "$ac_sys_system" in
Christian Heimes39258d32021-04-17 11:36:35 +020010214 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10215$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010218
Georg Brandl59e87bd2011-02-15 19:48:59 +000010219 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010220int
Christian Heimes39258d32021-04-17 11:36:35 +020010221main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010222{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010223loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 ;
10225 return 0;
10226}
Matthias Kloseb159a552010-04-25 21:00:44 +000010227
Martin v. Löwis11437992002-04-12 09:54:03 +000010228_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010229if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010230
Matthias Kloseb159a552010-04-25 21:00:44 +000010231
Christian Heimes39258d32021-04-17 11:36:35 +020010232$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010233
Christian Heimes39258d32021-04-17 11:36:35 +020010234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10235$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010236
Christian Heimes39258d32021-04-17 11:36:35 +020010237else
Matthias Kloseb159a552010-04-25 21:00:44 +000010238
Christian Heimes39258d32021-04-17 11:36:35 +020010239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10240$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010241
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010242fi
Christian Heimes39258d32021-04-17 11:36:35 +020010243rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010244 conftest$ac_exeext conftest.$ac_ext
10245# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10246# of the AIX system used to build/package Python executable. This tag serves
10247# as a baseline for bdist module packages
Christian Heimes39258d32021-04-17 11:36:35 +020010248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10249$as_echo_n "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010250 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10251
Christian Heimes39258d32021-04-17 11:36:35 +020010252cat >>confdefs.h <<_ACEOF
10253#define AIX_BUILDDATE $AIX_BUILDDATE
10254_ACEOF
Michael Felt39afa2d2019-12-15 15:17:53 +010010255
Christian Heimes39258d32021-04-17 11:36:35 +020010256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10257$as_echo "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010258 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010259 *) ;;
10260esac
10261
Christian Heimes985ecdc2013-11-20 11:46:18 +010010262# check for systems that require aligned memory access
Christian Heimes39258d32021-04-17 11:36:35 +020010263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10264$as_echo_n "checking aligned memory access is required... " >&6; }
10265if ${ac_cv_aligned_required+:} false; then :
10266 $as_echo_n "(cached) " >&6
10267else
10268 if test "$cross_compiling" = yes; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010269 ac_cv_aligned_required=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010270else
Christian Heimes985ecdc2013-11-20 11:46:18 +010010271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10272/* end confdefs.h. */
10273
10274int main()
10275{
10276 char s[16];
10277 int i, *p1, *p2;
10278 for (i=0; i < 16; i++)
10279 s[i] = i;
10280 p1 = (int*)(s+1);
10281 p2 = (int*)(s+2);
10282 if (*p1 == *p2)
10283 return 1;
10284 return 0;
10285}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010286_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010287if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010288 ac_cv_aligned_required=no
Christian Heimes39258d32021-04-17 11:36:35 +020010289else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010290 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010291fi
10292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10293 conftest.$ac_objext conftest.beam conftest.$ac_ext
10294fi
10295
10296
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010297fi
10298
Christian Heimes39258d32021-04-17 11:36:35 +020010299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10300$as_echo "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010301if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010302
Christian Heimes39258d32021-04-17 11:36:35 +020010303$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010304
10305fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010306
10307# str, bytes and memoryview hash algorithm
10308
10309
Christian Heimes39258d32021-04-17 11:36:35 +020010310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10311$as_echo_n "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010312
10313# Check whether --with-hash_algorithm was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010314if test "${with_hash_algorithm+set}" = set; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010010315 withval=$with_hash_algorithm;
Christian Heimes39258d32021-04-17 11:36:35 +020010316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10317$as_echo "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010318case "$withval" in
10319 siphash24)
Christian Heimes39258d32021-04-17 11:36:35 +020010320 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010321
10322 ;;
10323 fnv)
Christian Heimes39258d32021-04-17 11:36:35 +020010324 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010325
10326 ;;
10327 *)
10328 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10329 ;;
10330esac
10331
Christian Heimes39258d32021-04-17 11:36:35 +020010332else
10333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10334$as_echo "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010335fi
10336
10337
Paul Ganssle62972d92020-05-16 04:20:06 -040010338validate_tzpath() {
10339 # Checks that each element of hte path is an absolute path
10340 if test -z "$1"; then
10341 # Empty string is allowed: it indicates no system TZPATH
10342 return 0
10343 fi
10344
10345 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050010346 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040010347 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10348 return 1;
10349 fi
10350}
10351
10352TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Christian Heimes39258d32021-04-17 11:36:35 +020010353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10354$as_echo_n "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010355
10356# Check whether --with-tzpath was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010357if test "${with_tzpath+set}" = set; then :
Paul Ganssle62972d92020-05-16 04:20:06 -040010358 withval=$with_tzpath;
10359case "$withval" in
10360 yes)
10361 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10362 ;;
10363 *)
10364 validate_tzpath "$withval"
10365 TZPATH="$withval"
Christian Heimes39258d32021-04-17 11:36:35 +020010366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10367$as_echo "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010368 ;;
10369esac
10370
Christian Heimes39258d32021-04-17 11:36:35 +020010371else
Paul Ganssle62972d92020-05-16 04:20:06 -040010372 validate_tzpath "$TZPATH"
Christian Heimes39258d32021-04-17 11:36:35 +020010373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10374$as_echo "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010375fi
10376
10377
10378
Christian Heimes39258d32021-04-17 11:36:35 +020010379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10380$as_echo_n "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010381
10382# Check whether --with-address_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010383if test "${with_address_sanitizer+set}" = set; then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010010384 withval=$with_address_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10386$as_echo "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010387BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10388LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010389# ASan works by controlling memory allocation, our own malloc interferes.
10390with_pymalloc="no"
10391
Christian Heimes39258d32021-04-17 11:36:35 +020010392else
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010395fi
10396
10397
Christian Heimes39258d32021-04-17 11:36:35 +020010398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10399$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010400
10401# Check whether --with-memory_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010402if test "${with_memory_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010403 withval=$with_memory_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10405$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010406BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10407LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10408# MSan works by controlling memory allocation, our own malloc interferes.
10409with_pymalloc="no"
10410
Christian Heimes39258d32021-04-17 11:36:35 +020010411else
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010414fi
10415
10416
Christian Heimes39258d32021-04-17 11:36:35 +020010417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10418$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010419
10420# Check whether --with-undefined_behavior_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010421if test "${with_undefined_behavior_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010422 withval=$with_undefined_behavior_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10424$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010425BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10426LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010427
Christian Heimes39258d32021-04-17 11:36:35 +020010428else
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10430$as_echo "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010431fi
10432
10433
Guido van Rossum70c7f481998-03-26 18:44:10 +000010434# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Christian Heimes39258d32021-04-17 11:36:35 +020010435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10436$as_echo_n "checking for t_open in -lnsl... " >&6; }
10437if ${ac_cv_lib_nsl_t_open+:} false; then :
10438 $as_echo_n "(cached) " >&6
10439else
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010441LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445/* Override any GCC internal prototype to avoid an error.
10446 Use char because int might match the return type of a GCC
10447 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010448#ifdef __cplusplus
10449extern "C"
10450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010451char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010452int
Christian Heimes39258d32021-04-17 11:36:35 +020010453main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ;
10457 return 0;
10458}
10459_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010460if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ac_cv_lib_nsl_t_open=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010462else
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010464fi
Christian Heimes39258d32021-04-17 11:36:35 +020010465rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010467LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010468fi
Christian Heimes39258d32021-04-17 11:36:35 +020010469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10470$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
10471if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010472 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010473fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010474 # SVR4
Christian Heimes39258d32021-04-17 11:36:35 +020010475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10476$as_echo_n "checking for socket in -lsocket... " >&6; }
10477if ${ac_cv_lib_socket_socket+:} false; then :
10478 $as_echo_n "(cached) " >&6
10479else
Martin v. Löwis11437992002-04-12 09:54:03 +000010480 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010481LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010485/* Override any GCC internal prototype to avoid an error.
10486 Use char because int might match the return type of a GCC
10487 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010488#ifdef __cplusplus
10489extern "C"
10490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010491char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010492int
Christian Heimes39258d32021-04-17 11:36:35 +020010493main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 ;
10497 return 0;
10498}
10499_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010500if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 ac_cv_lib_socket_socket=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010502else
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010504fi
Christian Heimes39258d32021-04-17 11:36:35 +020010505rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010507LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010508fi
Christian Heimes39258d32021-04-17 11:36:35 +020010509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10510$as_echo "$ac_cv_lib_socket_socket" >&6; }
10511if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010512 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010513fi
10514 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010515
Christian Heimes39258d32021-04-17 11:36:35 +020010516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10517$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519# Check whether --with-libs was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010520if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521 withval=$with_libs;
Christian Heimes39258d32021-04-17 11:36:35 +020010522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10523$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010524LIBS="$withval $LIBS"
10525
Christian Heimes39258d32021-04-17 11:36:35 +020010526else
10527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010529fi
10530
Guido van Rossum7f43da71994-08-01 12:15:30 +000010531
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010532
10533
10534
10535
10536
10537
Victor Stinnerb477d192020-01-22 22:48:16 +010010538
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010539if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10540 if test -n "$ac_tool_prefix"; then
10541 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10542set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020010543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10544$as_echo_n "checking for $ac_word... " >&6; }
10545if ${ac_cv_path_PKG_CONFIG+:} false; then :
10546 $as_echo_n "(cached) " >&6
10547else
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010548 case $PKG_CONFIG in
10549 [\\/]* | ?:[\\/]*)
10550 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10551 ;;
10552 *)
10553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10554for as_dir in $PATH
10555do
10556 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020010557 test -z "$as_dir" && as_dir=.
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010558 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020010559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10560 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010562 break 2
10563 fi
10564done
10565 done
10566IFS=$as_save_IFS
10567
10568 ;;
10569esac
10570fi
10571PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10572if test -n "$PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020010573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10574$as_echo "$PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010575else
Christian Heimes39258d32021-04-17 11:36:35 +020010576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010578fi
10579
10580
10581fi
10582if test -z "$ac_cv_path_PKG_CONFIG"; then
10583 ac_pt_PKG_CONFIG=$PKG_CONFIG
10584 # Extract the first word of "pkg-config", so it can be a program name with args.
10585set dummy pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020010586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10587$as_echo_n "checking for $ac_word... " >&6; }
10588if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10589 $as_echo_n "(cached) " >&6
10590else
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010591 case $ac_pt_PKG_CONFIG in
10592 [\\/]* | ?:[\\/]*)
10593 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10594 ;;
10595 *)
10596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10597for as_dir in $PATH
10598do
10599 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020010600 test -z "$as_dir" && as_dir=.
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010601 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020010602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10603 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010605 break 2
10606 fi
10607done
10608 done
10609IFS=$as_save_IFS
10610
10611 ;;
10612esac
10613fi
10614ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10615if test -n "$ac_pt_PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020010616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10617$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010618else
Christian Heimes39258d32021-04-17 11:36:35 +020010619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010621fi
10622
10623 if test "x$ac_pt_PKG_CONFIG" = x; then
10624 PKG_CONFIG=""
10625 else
10626 case $cross_compiling:$ac_tool_warned in
10627yes:)
Christian Heimes39258d32021-04-17 11:36:35 +020010628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010630ac_tool_warned=yes ;;
10631esac
10632 PKG_CONFIG=$ac_pt_PKG_CONFIG
10633 fi
10634else
10635 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10636fi
10637
10638fi
10639if test -n "$PKG_CONFIG"; then
10640 _pkg_min_version=0.9.0
Christian Heimes39258d32021-04-17 11:36:35 +020010641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10642$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010643 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Christian Heimes39258d32021-04-17 11:36:35 +020010644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10645$as_echo "yes" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010646 else
Christian Heimes39258d32021-04-17 11:36:35 +020010647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10648$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010649 PKG_CONFIG=""
10650 fi
10651fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010652
10653# Check for use of the system expat library
Christian Heimes39258d32021-04-17 11:36:35 +020010654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10655$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010656
10657# Check whether --with-system_expat was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010658if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010659 withval=$with_system_expat;
Christian Heimes39258d32021-04-17 11:36:35 +020010660else
Benjamin Peterson79263252010-10-31 16:50:44 +000010661 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010662fi
10663
10664
Christian Heimes39258d32021-04-17 11:36:35 +020010665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10666$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010667
10668# Check for use of the system libffi library
Christian Heimes39258d32021-04-17 11:36:35 +020010669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10670$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010671
10672# Check whether --with-system_ffi was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010673if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010674 withval=$with_system_ffi;
10675fi
10676
10677
Zachary Waref40d4dd2016-09-17 01:25:24 -050010678if test "$ac_sys_system" = "Darwin"
10679then
10680 case "$with_system_ffi" in
10681 "")
10682 with_system_ffi="no"
10683 ;;
10684 yes|no)
10685 ;;
10686 *)
10687 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10688 ;;
10689 esac
Christian Heimes39258d32021-04-17 11:36:35 +020010690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10691$as_echo "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010692else
Christian Heimes39258d32021-04-17 11:36:35 +020010693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10694$as_echo "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010695 if test "$with_system_ffi" != ""
10696 then
Christian Heimes39258d32021-04-17 11:36:35 +020010697 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10698$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050010699 fi
10700 with_system_ffi="yes"
10701fi
Zachary Ware935043d2016-09-09 17:01:21 -070010702
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010703if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010704 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10705else
10706 LIBFFI_INCLUDEDIR=""
10707fi
10708
10709
Stefan Krah60187b52012-03-23 19:06:27 +010010710# Check for use of the system libmpdec library
Christian Heimes39258d32021-04-17 11:36:35 +020010711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10712$as_echo_n "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010713
10714# Check whether --with-system_libmpdec was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010715if test "${with_system_libmpdec+set}" = set; then :
Stefan Krah60187b52012-03-23 19:06:27 +010010716 withval=$with_system_libmpdec;
Christian Heimes39258d32021-04-17 11:36:35 +020010717else
Stefan Krah60187b52012-03-23 19:06:27 +010010718 with_system_libmpdec="no"
10719fi
10720
10721
Christian Heimes39258d32021-04-17 11:36:35 +020010722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10723$as_echo "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010724
Stefan Krah815280e2020-02-29 19:43:42 +010010725# Check whether _decimal should use a coroutine-local or thread-local context
Christian Heimes39258d32021-04-17 11:36:35 +020010726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10727$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010728
10729# Check whether --with-decimal_contextvar was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010730if test "${with_decimal_contextvar+set}" = set; then :
Stefan Krah815280e2020-02-29 19:43:42 +010010731 withval=$with_decimal_contextvar;
Christian Heimes39258d32021-04-17 11:36:35 +020010732else
Stefan Krah815280e2020-02-29 19:43:42 +010010733 with_decimal_contextvar="yes"
10734fi
10735
10736
10737if test "$with_decimal_contextvar" != "no"
10738then
10739
Christian Heimes39258d32021-04-17 11:36:35 +020010740$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010010741
10742fi
10743
Christian Heimes39258d32021-04-17 11:36:35 +020010744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10745$as_echo "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010746
Benjamin Peterson076ed002010-10-31 17:11:02 +000010747# Check for support for loadable sqlite extensions
Christian Heimes39258d32021-04-17 11:36:35 +020010748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10749$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010750# Check whether --enable-loadable-sqlite-extensions was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010751if test "${enable_loadable_sqlite_extensions+set}" = set; then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000010752 enableval=$enable_loadable_sqlite_extensions;
Christian Heimes39258d32021-04-17 11:36:35 +020010753else
Benjamin Peterson076ed002010-10-31 17:11:02 +000010754 enable_loadable_sqlite_extensions="no"
10755fi
10756
10757
Christian Heimes39258d32021-04-17 11:36:35 +020010758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10759$as_echo "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010760
Ned Deilyd819b932013-09-06 01:07:05 -070010761# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10762
10763
Christian Heimes39258d32021-04-17 11:36:35 +020010764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10765$as_echo_n "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010766
10767# Check whether --with-tcltk-includes was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010768if test "${with_tcltk_includes+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010769 withval=$with_tcltk_includes;
Christian Heimes39258d32021-04-17 11:36:35 +020010770else
Ned Deilyd819b932013-09-06 01:07:05 -070010771 with_tcltk_includes="default"
10772fi
10773
Christian Heimes39258d32021-04-17 11:36:35 +020010774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10775$as_echo "$with_tcltk_includes" >&6; }
10776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10777$as_echo_n "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010778
10779# Check whether --with-tcltk-libs was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010780if test "${with_tcltk_libs+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010781 withval=$with_tcltk_libs;
Christian Heimes39258d32021-04-17 11:36:35 +020010782else
Ned Deilyd819b932013-09-06 01:07:05 -070010783 with_tcltk_libs="default"
10784fi
10785
Christian Heimes39258d32021-04-17 11:36:35 +020010786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10787$as_echo "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010788if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10789then
10790 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10791 then
10792 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10793 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010010794 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
10795 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
10796 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
10797 else
10798 TCLTK_INCLUDES=""
10799 TCLTK_LIBS=""
10800 fi
Ned Deilyd819b932013-09-06 01:07:05 -070010801else
10802 TCLTK_INCLUDES="$with_tcltk_includes"
10803 TCLTK_LIBS="$with_tcltk_libs"
10804fi
10805
Matthias Klose55708cc2009-04-30 08:06:49 +000010806# Check for --with-dbmliborder
Christian Heimes39258d32021-04-17 11:36:35 +020010807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10808$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010809
10810# Check whether --with-dbmliborder was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010811if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010812 withval=$with_dbmliborder;
10813if test x$with_dbmliborder = xyes
10814then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010815as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010816else
10817 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10818 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10819 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010820 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010821 fi
10822 done
10823fi
10824fi
10825
Christian Heimes39258d32021-04-17 11:36:35 +020010826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10827$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010828
Martin v. Löwis11437992002-04-12 09:54:03 +000010829# Templates for things AC_DEFINEd more than once.
10830# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010831
10832
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010833if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010834then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010835 # Defining _REENTRANT on system with POSIX threads should not hurt.
Christian Heimes39258d32021-04-17 11:36:35 +020010836 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010837
10838 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010839 if test "$ac_sys_system" = "SunOS"; then
10840 CFLAGS="$CFLAGS -D_REENTRANT"
10841 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010842elif test "$ac_cv_kpthread" = "yes"
10843then
10844 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010845 if test "$ac_cv_cxx_thread" = "yes"; then
10846 CXX="$CXX -Kpthread"
10847 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010848 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010849elif test "$ac_cv_kthread" = "yes"
10850then
10851 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010852 if test "$ac_cv_cxx_thread" = "yes"; then
10853 CXX="$CXX -Kthread"
10854 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010855 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010856elif test "$ac_cv_pthread" = "yes"
10857then
10858 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010859 if test "$ac_cv_cxx_thread" = "yes"; then
10860 CXX="$CXX -pthread"
10861 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010862 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010863else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010864 if test ! -z "$withval" -a -d "$withval"
10865 then LDFLAGS="$LDFLAGS -L$withval"
10866 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010867
10868 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010869 # define _POSIX_THREADS in unistd.h. Some apparently don't
10870 # (e.g. gnu pth with pthread emulation)
Christian Heimes39258d32021-04-17 11:36:35 +020010871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10872$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010874/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010875
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010876#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010877#ifdef _POSIX_THREADS
10878yes
10879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010880
10881_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020010883 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010884 unistd_defines_pthreads=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010885else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010886 unistd_defines_pthreads=no
10887fi
Christian Heimes39258d32021-04-17 11:36:35 +020010888rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010889
Christian Heimes39258d32021-04-17 11:36:35 +020010890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10891$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010892
Christian Heimes39258d32021-04-17 11:36:35 +020010893 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010894
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010895 # Just looking for pthread_create in libpthread is not enough:
10896 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10897 # So we really have to include pthread.h, and then link.
10898 _libs=$LIBS
10899 LIBS="$LIBS -lpthread"
Christian Heimes39258d32021-04-17 11:36:35 +020010900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10901$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010904
10905#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010906#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010907
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010908void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010909int
Christian Heimes39258d32021-04-17 11:36:35 +020010910main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010911{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010912
10913pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 ;
10915 return 0;
10916}
10917_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010918if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010919
Christian Heimes39258d32021-04-17 11:36:35 +020010920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10921$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010922 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010923
Christian Heimes39258d32021-04-17 11:36:35 +020010924else
Martin v. Löwis11437992002-04-12 09:54:03 +000010925
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010926 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Christian Heimes39258d32021-04-17 11:36:35 +020010928if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010929
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010930 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010931
Christian Heimes39258d32021-04-17 11:36:35 +020010932else
Guido van Rossumad678af1998-10-02 14:42:15 +000010933
Christian Heimes39258d32021-04-17 11:36:35 +020010934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10935$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
10936if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
10937 $as_echo_n "(cached) " >&6
10938else
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010940LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010944/* Override any GCC internal prototype to avoid an error.
10945 Use char because int might match the return type of a GCC
10946 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010947#ifdef __cplusplus
10948extern "C"
10949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010950char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010951int
Christian Heimes39258d32021-04-17 11:36:35 +020010952main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 ;
10956 return 0;
10957}
10958_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ac_cv_lib_pthreads_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010961else
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010963fi
Christian Heimes39258d32021-04-17 11:36:35 +020010964rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010966LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010967fi
Christian Heimes39258d32021-04-17 11:36:35 +020010968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10969$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
10970if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010971
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010972 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010973 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010974
Christian Heimes39258d32021-04-17 11:36:35 +020010975else
Greg Steinadf63d62000-07-05 10:38:09 +000010976
Christian Heimes39258d32021-04-17 11:36:35 +020010977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10978$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
10979if ${ac_cv_lib_c_r_pthread_create+:} false; then :
10980 $as_echo_n "(cached) " >&6
10981else
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010983LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010987/* Override any GCC internal prototype to avoid an error.
10988 Use char because int might match the return type of a GCC
10989 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010990#ifdef __cplusplus
10991extern "C"
10992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010993char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010994int
Christian Heimes39258d32021-04-17 11:36:35 +020010995main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ;
10999 return 0;
11000}
11001_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 ac_cv_lib_c_r_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011004else
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011006fi
Christian Heimes39258d32021-04-17 11:36:35 +020011007rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011009LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011010fi
Christian Heimes39258d32021-04-17 11:36:35 +020011011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
11012$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
11013if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000011014
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011015 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011016 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011017
Christian Heimes39258d32021-04-17 11:36:35 +020011018else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011019
Christian Heimes39258d32021-04-17 11:36:35 +020011020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
11021$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
11022if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
11023 $as_echo_n "(cached) " >&6
11024else
Martin v. Löwis11437992002-04-12 09:54:03 +000011025 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011026LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011030/* Override any GCC internal prototype to avoid an error.
11031 Use char because int might match the return type of a GCC
11032 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011033#ifdef __cplusplus
11034extern "C"
11035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011036char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011037int
Christian Heimes39258d32021-04-17 11:36:35 +020011038main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 ;
11042 return 0;
11043}
11044_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 ac_cv_lib_pthread___pthread_create_system=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011047else
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011049fi
Christian Heimes39258d32021-04-17 11:36:35 +020011050rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011052LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011053fi
Christian Heimes39258d32021-04-17 11:36:35 +020011054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11055$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
11056if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011057
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011058 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011059 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011060
Christian Heimes39258d32021-04-17 11:36:35 +020011061else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011062
Christian Heimes39258d32021-04-17 11:36:35 +020011063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
11064$as_echo_n "checking for pthread_create in -lcma... " >&6; }
11065if ${ac_cv_lib_cma_pthread_create+:} false; then :
11066 $as_echo_n "(cached) " >&6
11067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011069LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073/* Override any GCC internal prototype to avoid an error.
11074 Use char because int might match the return type of a GCC
11075 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011076#ifdef __cplusplus
11077extern "C"
11078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011079char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011080int
Christian Heimes39258d32021-04-17 11:36:35 +020011081main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 ac_cv_lib_cma_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011092fi
Christian Heimes39258d32021-04-17 11:36:35 +020011093rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011095LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011096fi
Christian Heimes39258d32021-04-17 11:36:35 +020011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11098$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
11099if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011100
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011101 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011102 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011103
Christian Heimes39258d32021-04-17 11:36:35 +020011104else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011105
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011106 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11107
Guido van Rossum2d38f911996-06-26 19:47:01 +000011108fi
11109
Guido van Rossum627b2d71993-12-24 10:39:16 +000011110
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011111fi
11112
Guido van Rossum0be3e491997-05-22 20:33:33 +000011113fi
11114
Guido van Rossum49545951997-12-02 19:28:29 +000011115fi
11116
Guido van Rossumb93a8621998-05-07 13:27:32 +000011117fi
11118
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011119fi
Christian Heimes39258d32021-04-17 11:36:35 +020011120rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011122
Christian Heimes39258d32021-04-17 11:36:35 +020011123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11124$as_echo_n "checking for usconfig in -lmpc... " >&6; }
11125if ${ac_cv_lib_mpc_usconfig+:} false; then :
11126 $as_echo_n "(cached) " >&6
11127else
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011129LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133/* Override any GCC internal prototype to avoid an error.
11134 Use char because int might match the return type of a GCC
11135 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011136#ifdef __cplusplus
11137extern "C"
11138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011139char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011140int
Christian Heimes39258d32021-04-17 11:36:35 +020011141main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 ;
11145 return 0;
11146}
11147_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011148if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011149 ac_cv_lib_mpc_usconfig=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011150else
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011152fi
Christian Heimes39258d32021-04-17 11:36:35 +020011153rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011155LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156fi
Christian Heimes39258d32021-04-17 11:36:35 +020011157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11158$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
11159if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011160
Martin v. Löwis130fb172001-07-19 11:00:41 +000011161 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011162
Guido van Rossum627b2d71993-12-24 10:39:16 +000011163fi
11164
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011165
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011166fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011167
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011168if test "$posix_threads" = "yes"; then
11169 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011170
Christian Heimes39258d32021-04-17 11:36:35 +020011171$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011172
11173 fi
11174
11175 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11176 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011177 SunOS/5.6)
Christian Heimes39258d32021-04-17 11:36:35 +020011178$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011179
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011180 ;;
11181 SunOS/5.8)
Christian Heimes39258d32021-04-17 11:36:35 +020011182$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011183
11184 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011185 AIX/*)
Christian Heimes39258d32021-04-17 11:36:35 +020011186$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011187
11188 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011189 esac
11190
Christian Heimes39258d32021-04-17 11:36:35 +020011191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11192$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
11193 if ${ac_cv_pthread_system_supported+:} false; then :
11194 $as_echo_n "(cached) " >&6
11195else
11196 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011197 ac_cv_pthread_system_supported=no
Christian Heimes39258d32021-04-17 11:36:35 +020011198else
Matthias Kloseb9621712010-04-24 17:59:49 +000011199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011200/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011201
11202 #include <stdio.h>
11203 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011204 void *foo(void *parm) {
11205 return NULL;
11206 }
11207 main() {
11208 pthread_attr_t attr;
11209 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011210 if (pthread_attr_init(&attr)) return (-1);
11211 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11212 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11213 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011214 }
11215_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011216if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011217 ac_cv_pthread_system_supported=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011218else
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11222 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011223fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225
Guido van Rossum627b2d71993-12-24 10:39:16 +000011226fi
11227
Christian Heimes39258d32021-04-17 11:36:35 +020011228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11229$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011230 if test "$ac_cv_pthread_system_supported" = "yes"; then
11231
Christian Heimes39258d32021-04-17 11:36:35 +020011232$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011233
11234 fi
Christian Heimes39258d32021-04-17 11:36:35 +020011235 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000011236do :
11237 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Christian Heimes39258d32021-04-17 11:36:35 +020011238if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
11239 cat >>confdefs.h <<_ACEOF
11240#define HAVE_PTHREAD_SIGMASK 1
11241_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011242 case $ac_sys_system in
11243 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011244
Christian Heimes39258d32021-04-17 11:36:35 +020011245$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011246
11247 ;;
11248 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011249fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011250done
Christian Heimes39258d32021-04-17 11:36:35 +020011251
11252 for ac_func in pthread_getcpuclockid
11253do :
11254 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11255if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11256 cat >>confdefs.h <<_ACEOF
11257#define HAVE_PTHREAD_GETCPUCLOCKID 1
11258_ACEOF
pdoxe14679c2017-10-05 00:01:56 -070011259
11260fi
Christian Heimes39258d32021-04-17 11:36:35 +020011261done
pdoxe14679c2017-10-05 00:01:56 -070011262
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011263fi
11264
11265
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011266# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011267
Christian Heimes39258d32021-04-17 11:36:35 +020011268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11269$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270# Check whether --enable-ipv6 was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011271if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011272 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011273 no)
Christian Heimes39258d32021-04-17 11:36:35 +020011274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11275$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011276 ipv6=no
11277 ;;
Christian Heimes39258d32021-04-17 11:36:35 +020011278 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11279$as_echo "yes" >&6; }
11280 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011281
11282 ipv6=yes
11283 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 esac
Christian Heimes39258d32021-04-17 11:36:35 +020011285else
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011288/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011289 /* AF_INET6 available check */
11290#include <sys/types.h>
11291#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011292int
Christian Heimes39258d32021-04-17 11:36:35 +020011293main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011294{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011295int domain = AF_INET6;
11296 ;
11297 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011298}
Martin v. Löwis11437992002-04-12 09:54:03 +000011299_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011300if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011301
Christian Heimes39258d32021-04-17 11:36:35 +020011302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11303$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011305
Christian Heimes39258d32021-04-17 11:36:35 +020011306else
Matthias Kloseb159a552010-04-25 21:00:44 +000011307
Christian Heimes39258d32021-04-17 11:36:35 +020011308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011310 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011311
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011312fi
Christian Heimes39258d32021-04-17 11:36:35 +020011313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011315if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11317$as_echo_n "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011319/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011320
11321 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011322#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011323int
Christian Heimes39258d32021-04-17 11:36:35 +020011324main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011325{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011326struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011327 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 ;
11329 return 0;
11330}
Matthias Kloseb159a552010-04-25 21:00:44 +000011331
Martin v. Löwis11437992002-04-12 09:54:03 +000011332_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011333if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011334
Christian Heimes39258d32021-04-17 11:36:35 +020011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11336$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 ipv6=yes
11338
Christian Heimes39258d32021-04-17 11:36:35 +020011339else
Matthias Kloseb159a552010-04-25 21:00:44 +000011340
Christian Heimes39258d32021-04-17 11:36:35 +020011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011343 ipv6=no
11344
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011345fi
Christian Heimes39258d32021-04-17 11:36:35 +020011346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011347fi
11348
11349if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011350 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011351
11352fi
11353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011354fi
11355
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011356
11357ipv6type=unknown
11358ipv6lib=none
11359ipv6trylibc=no
11360
11361if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11363$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011364 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11365 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011366 case $i in
11367 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011370
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011371#include <netinet/in.h>
11372#ifdef IPV6_INRIA_VERSION
11373yes
11374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011375_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011377 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011378 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011379fi
Christian Heimes39258d32021-04-17 11:36:35 +020011380rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011381
11382 ;;
11383 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011385/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011386
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011387#include <netinet/in.h>
11388#ifdef __KAME__
11389yes
11390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011391_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011393 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011394 ipv6type=$i;
11395 ipv6lib=inet6
11396 ipv6libdir=/usr/local/v6/lib
11397 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011398fi
Christian Heimes39258d32021-04-17 11:36:35 +020011399rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011400
11401 ;;
11402 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011405
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011406#include <features.h>
11407#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11408yes
11409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011410_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011412 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011413 ipv6type=$i;
11414 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011415fi
Christian Heimes39258d32021-04-17 11:36:35 +020011416rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011417
11418 ;;
11419 linux-inet6)
11420 if test -d /usr/inet6; then
11421 ipv6type=$i
11422 ipv6lib=inet6
11423 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011424 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011425 fi
11426 ;;
11427 solaris)
11428 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011429 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011430 ipv6type=$i
11431 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011432 fi
11433 fi
11434 ;;
11435 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011437/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011438
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011439#include <sys/param.h>
11440#ifdef _TOSHIBA_INET6
11441yes
11442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011443_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011445 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011446 ipv6type=$i;
11447 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011448 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011449fi
Christian Heimes39258d32021-04-17 11:36:35 +020011450rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011451
11452 ;;
11453 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011455/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011456
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011457#include </usr/local/v6/include/sys/v6config.h>
11458#ifdef __V6D__
11459yes
11460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011461_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011463 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011464 ipv6type=$i;
11465 ipv6lib=v6;
11466 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011467 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011468fi
Christian Heimes39258d32021-04-17 11:36:35 +020011469rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011470
11471 ;;
11472 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011474/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011475
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011476#include <sys/param.h>
11477#ifdef _ZETA_MINAMI_INET6
11478yes
11479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011480_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011482 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011483 ipv6type=$i;
11484 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011485 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011486fi
Christian Heimes39258d32021-04-17 11:36:35 +020011487rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011488
11489 ;;
11490 esac
11491 if test "$ipv6type" != "unknown"; then
11492 break
11493 fi
11494 done
Christian Heimes39258d32021-04-17 11:36:35 +020011495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11496$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011497fi
11498
11499if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11500 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11501 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11502 echo "using lib$ipv6lib"
11503 else
11504 if test $ipv6trylibc = "yes"; then
11505 echo "using libc"
11506 else
11507 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11508 echo "You need to fetch lib$ipv6lib.a from appropriate"
11509 echo 'ipv6 kit and compile beforehand.'
11510 exit 1
11511 fi
11512 fi
11513fi
11514
Christian Heimes39258d32021-04-17 11:36:35 +020011515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11516$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11518/* end confdefs.h. */
11519 /* CAN_RAW_FD_FRAMES available check */
11520#include <linux/can/raw.h>
11521int
Christian Heimes39258d32021-04-17 11:36:35 +020011522main ()
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011523{
11524int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11525 ;
11526 return 0;
11527}
11528_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011529if ac_fn_c_try_compile "$LINENO"; then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011530
11531
Christian Heimes39258d32021-04-17 11:36:35 +020011532$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011533
Christian Heimes39258d32021-04-17 11:36:35 +020011534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11535$as_echo "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011536
Christian Heimes39258d32021-04-17 11:36:35 +020011537else
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011538
Christian Heimes39258d32021-04-17 11:36:35 +020011539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11540$as_echo "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011541
11542fi
Christian Heimes39258d32021-04-17 11:36:35 +020011543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011544
Christian Heimes39258d32021-04-17 11:36:35 +020011545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11546$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11548/* end confdefs.h. */
11549
11550#include <linux/can/raw.h>
11551int
Christian Heimes39258d32021-04-17 11:36:35 +020011552main ()
Zackery Spytz97e0de02020-04-09 06:03:49 -060011553{
11554int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11555 ;
11556 return 0;
11557}
11558_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011559if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060011560
11561
Christian Heimes39258d32021-04-17 11:36:35 +020011562$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060011563
Christian Heimes39258d32021-04-17 11:36:35 +020011564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11565$as_echo "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011566
Christian Heimes39258d32021-04-17 11:36:35 +020011567else
Zackery Spytz97e0de02020-04-09 06:03:49 -060011568
Christian Heimes39258d32021-04-17 11:36:35 +020011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011571
11572fi
Christian Heimes39258d32021-04-17 11:36:35 +020011573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060011574
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011575# Check for --with-doc-strings
Christian Heimes39258d32021-04-17 11:36:35 +020011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11577$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579# Check whether --with-doc-strings was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011580if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581 withval=$with_doc_strings;
11582fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011583
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011584
11585if test -z "$with_doc_strings"
11586then with_doc_strings="yes"
11587fi
11588if test "$with_doc_strings" != "no"
11589then
11590
Christian Heimes39258d32021-04-17 11:36:35 +020011591$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011592
11593fi
Christian Heimes39258d32021-04-17 11:36:35 +020011594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11595$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011596
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011597# Check for Python-specific malloc support
Christian Heimes39258d32021-04-17 11:36:35 +020011598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11599$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601# Check whether --with-pymalloc was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011602if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603 withval=$with_pymalloc;
11604fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011605
Neil Schemenauera35c6882001-02-27 04:45:05 +000011606
Neil Schemenauer16c22972002-03-22 15:34:49 +000011607if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011608then
11609 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011610fi
11611if test "$with_pymalloc" != "no"
11612then
Martin v. Löwis11437992002-04-12 09:54:03 +000011613
Christian Heimes39258d32021-04-17 11:36:35 +020011614$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011615
11616fi
Christian Heimes39258d32021-04-17 11:36:35 +020011617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11618$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011619
Nick Coghlan6ea41862017-06-11 13:16:15 +100011620# Check for --with-c-locale-coercion
Christian Heimes39258d32021-04-17 11:36:35 +020011621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11622$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011623
11624# Check whether --with-c-locale-coercion was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011625if test "${with_c_locale_coercion+set}" = set; then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100011626 withval=$with_c_locale_coercion;
11627fi
11628
11629
11630if test -z "$with_c_locale_coercion"
11631then
11632 with_c_locale_coercion="yes"
11633fi
11634if test "$with_c_locale_coercion" != "no"
11635then
11636
Christian Heimes39258d32021-04-17 11:36:35 +020011637$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100011638
11639fi
Christian Heimes39258d32021-04-17 11:36:35 +020011640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11641$as_echo "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011642
Benjamin Peterson05159c42009-12-03 03:01:27 +000011643# Check for Valgrind support
Christian Heimes39258d32021-04-17 11:36:35 +020011644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11645$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011646
11647# Check whether --with-valgrind was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011648if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011649 withval=$with_valgrind;
Christian Heimes39258d32021-04-17 11:36:35 +020011650else
Benjamin Peterson05159c42009-12-03 03:01:27 +000011651 with_valgrind=no
11652fi
11653
Christian Heimes39258d32021-04-17 11:36:35 +020011654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11655$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011656if test "$with_valgrind" != no; then
Christian Heimes39258d32021-04-17 11:36:35 +020011657 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
11658if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011659
Christian Heimes39258d32021-04-17 11:36:35 +020011660$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011661
Christian Heimes39258d32021-04-17 11:36:35 +020011662else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011663 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011664
11665fi
11666
Christian Heimes39258d32021-04-17 11:36:35 +020011667
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011668 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011669fi
11670
Łukasz Langaa785c872016-09-09 17:37:37 -070011671# Check for DTrace support
Christian Heimes39258d32021-04-17 11:36:35 +020011672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11673$as_echo_n "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011674
11675# Check whether --with-dtrace was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011676if test "${with_dtrace+set}" = set; then :
Łukasz Langaa785c872016-09-09 17:37:37 -070011677 withval=$with_dtrace;
Christian Heimes39258d32021-04-17 11:36:35 +020011678else
Łukasz Langaa785c872016-09-09 17:37:37 -070011679 with_dtrace=no
11680fi
11681
Christian Heimes39258d32021-04-17 11:36:35 +020011682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11683$as_echo "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011684
11685
11686
11687
11688
11689DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011690DTRACE_HEADERS=
11691DTRACE_OBJS=
11692
11693if test "$with_dtrace" = "yes"
11694then
11695 # Extract the first word of "dtrace", so it can be a program name with args.
11696set dummy dtrace; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020011697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11698$as_echo_n "checking for $ac_word... " >&6; }
11699if ${ac_cv_path_DTRACE+:} false; then :
11700 $as_echo_n "(cached) " >&6
11701else
Łukasz Langaa785c872016-09-09 17:37:37 -070011702 case $DTRACE in
11703 [\\/]* | ?:[\\/]*)
11704 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11705 ;;
11706 *)
11707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11708for as_dir in $PATH
11709do
11710 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020011711 test -z "$as_dir" && as_dir=.
Łukasz Langaa785c872016-09-09 17:37:37 -070011712 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020011713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11714 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070011716 break 2
11717 fi
11718done
11719 done
11720IFS=$as_save_IFS
11721
11722 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11723 ;;
11724esac
11725fi
11726DTRACE=$ac_cv_path_DTRACE
11727if test -n "$DTRACE"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11729$as_echo "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011730else
Christian Heimes39258d32021-04-17 11:36:35 +020011731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11732$as_echo "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011733fi
11734
11735
11736 if test "$DTRACE" = "not found"; then
11737 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11738 fi
11739
Christian Heimes39258d32021-04-17 11:36:35 +020011740$as_echo "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070011741
11742 DTRACE_HEADERS="Include/pydtrace_probes.h"
11743
11744 # On OS X, DTrace providers do not need to be explicitly compiled and
11745 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11746 # generation flag '-G'. We check for presence of this flag, rather than
11747 # hardcoding support by OS, in the interest of robustness.
Christian Heimes39258d32021-04-17 11:36:35 +020011748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11749$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11750if ${ac_cv_dtrace_link+:} false; then :
11751 $as_echo_n "(cached) " >&6
11752else
Łukasz Langaa785c872016-09-09 17:37:37 -070011753 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011754 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011755 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011756 ac_cv_dtrace_link=yes
11757
11758fi
Christian Heimes39258d32021-04-17 11:36:35 +020011759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11760$as_echo "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011761 if test "$ac_cv_dtrace_link" = "yes"; then
11762 DTRACE_OBJS="Python/pydtrace.o"
11763 fi
11764fi
11765
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011766# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011767
Guido van Rossum98935bf2001-09-05 19:13:16 +000011768DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011769
Guido van Rossume97ee181999-12-20 21:27:22 +000011770# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011771# platforms have dlopen(), but don't want to use it.
Christian Heimes39258d32021-04-17 11:36:35 +020011772for ac_func in dlopen
11773do :
11774 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11775if test "x$ac_cv_func_dlopen" = xyes; then :
11776 cat >>confdefs.h <<_ACEOF
11777#define HAVE_DLOPEN 1
11778_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011779
Guido van Rossume97ee181999-12-20 21:27:22 +000011780fi
Christian Heimes39258d32021-04-17 11:36:35 +020011781done
Guido van Rossume97ee181999-12-20 21:27:22 +000011782
Michael W. Hudson54241132001-12-07 15:38:26 +000011783
Guido van Rossume97ee181999-12-20 21:27:22 +000011784# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11785# loading of modules.
11786
Christian Heimes39258d32021-04-17 11:36:35 +020011787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11788$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011789if test -z "$DYNLOADFILE"
11790then
11791 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011792 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011793 *)
11794 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11795 # out any dynamic loading
11796 if test "$ac_cv_func_dlopen" = yes
11797 then DYNLOADFILE="dynload_shlib.o"
11798 else DYNLOADFILE="dynload_stub.o"
11799 fi
11800 ;;
11801 esac
11802fi
Christian Heimes39258d32021-04-17 11:36:35 +020011803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11804$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011805if test "$DYNLOADFILE" != "dynload_stub.o"
11806then
Martin v. Löwis11437992002-04-12 09:54:03 +000011807
Christian Heimes39258d32021-04-17 11:36:35 +020011808$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011809
11810fi
11811
Neil Schemenauer4e425612001-06-19 15:44:15 +000011812# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11813
Michael W. Hudson54241132001-12-07 15:38:26 +000011814
Christian Heimes39258d32021-04-17 11:36:35 +020011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11816$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011817if test -z "$MACHDEP_OBJS"
11818then
Jack Jansene578a632001-08-15 01:27:14 +000011819 MACHDEP_OBJS=$extra_machdep_objs
11820else
11821 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011822fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011823if test -z "$MACHDEP_OBJS"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11825$as_echo "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011826else
Christian Heimes39258d32021-04-17 11:36:35 +020011827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11828$as_echo "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011829fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011830
Guido van Rossum627b2d71993-12-24 10:39:16 +000011831# checks for library functions
Christian Heimes39258d32021-04-17 11:36:35 +020011832for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
11833 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11834 explicit_memset faccessat fchmod fchmodat fchown fchownat \
11835 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
11836 futimens futimes gai_strerror getentropy \
11837 getgrgid_r getgrnam_r \
11838 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
11839 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
11840 if_nameindex \
11841 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
11842 memrchr mbrtowc mkdirat mkfifo \
11843 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
11844 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
11845 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
11846 readlink readlinkat readv realpath renameat \
11847 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
11848 setgid sethostname \
11849 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
11850 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11851 sched_rr_get_interval \
11852 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
11853 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
11854 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
11855 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
11856 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
11857do :
11858 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11859ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11860if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11861 cat >>confdefs.h <<_ACEOF
11862#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11863_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011864
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011865fi
Christian Heimes39258d32021-04-17 11:36:35 +020011866done
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011867
Michael W. Hudson54241132001-12-07 15:38:26 +000011868
Benjamin Peterson40caa052018-09-12 15:52:40 -070011869# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11870# links. Some libc implementations have a stub lchmod implementation that always
11871# returns an error.
11872if test "$MACHDEP" != linux; then
Christian Heimes39258d32021-04-17 11:36:35 +020011873 for ac_func in lchmod
11874do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011875 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Christian Heimes39258d32021-04-17 11:36:35 +020011876if test "x$ac_cv_func_lchmod" = xyes; then :
11877 cat >>confdefs.h <<_ACEOF
11878#define HAVE_LCHMOD 1
Benjamin Petersoned709d52018-09-12 17:22:11 -070011879_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011880
11881fi
Christian Heimes39258d32021-04-17 11:36:35 +020011882done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011883
Christian Heimes39258d32021-04-17 11:36:35 +020011884fi
11885
11886ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011887 #include <dirent.h>
Christian Heimes39258d32021-04-17 11:36:35 +020011888"
11889if test "x$ac_cv_have_decl_dirfd" = xyes; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011890
Christian Heimes39258d32021-04-17 11:36:35 +020011891$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011892
11893fi
11894
Christian Heimes39258d32021-04-17 11:36:35 +020011895
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011896# For some functions, having a definition is not sufficient, since
11897# we want to take their address.
Christian Heimes39258d32021-04-17 11:36:35 +020011898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11899$as_echo_n "checking for chroot... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011901/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011902#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011903int
Christian Heimes39258d32021-04-17 11:36:35 +020011904main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011905{
11906void *x=chroot
11907 ;
11908 return 0;
11909}
11910_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011911if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011912
Christian Heimes39258d32021-04-17 11:36:35 +020011913$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011914
Christian Heimes39258d32021-04-17 11:36:35 +020011915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11916$as_echo "yes" >&6; }
11917else
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11919$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011920
11921fi
Christian Heimes39258d32021-04-17 11:36:35 +020011922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11924$as_echo_n "checking for link... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011926/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011927#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011928int
Christian Heimes39258d32021-04-17 11:36:35 +020011929main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011930{
11931void *x=link
11932 ;
11933 return 0;
11934}
11935_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011937
Christian Heimes39258d32021-04-17 11:36:35 +020011938$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011939
Christian Heimes39258d32021-04-17 11:36:35 +020011940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11941$as_echo "yes" >&6; }
11942else
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11944$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011945
11946fi
Christian Heimes39258d32021-04-17 11:36:35 +020011947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11949$as_echo_n "checking for symlink... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011951/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011952#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011953int
Christian Heimes39258d32021-04-17 11:36:35 +020011954main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011955{
11956void *x=symlink
11957 ;
11958 return 0;
11959}
11960_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011961if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011962
Christian Heimes39258d32021-04-17 11:36:35 +020011963$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011964
Christian Heimes39258d32021-04-17 11:36:35 +020011965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11966$as_echo "yes" >&6; }
11967else
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11969$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011970
11971fi
Christian Heimes39258d32021-04-17 11:36:35 +020011972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11974$as_echo_n "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011977#include <unistd.h>
11978int
Christian Heimes39258d32021-04-17 11:36:35 +020011979main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011980{
11981void *x=fchdir
11982 ;
11983 return 0;
11984}
11985_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011987
Christian Heimes39258d32021-04-17 11:36:35 +020011988$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011989
Christian Heimes39258d32021-04-17 11:36:35 +020011990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11991$as_echo "yes" >&6; }
11992else
11993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011995
11996fi
Christian Heimes39258d32021-04-17 11:36:35 +020011997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11999$as_echo_n "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012001/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012002#include <unistd.h>
12003int
Christian Heimes39258d32021-04-17 11:36:35 +020012004main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012005{
12006void *x=fsync
12007 ;
12008 return 0;
12009}
12010_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012011if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012012
Christian Heimes39258d32021-04-17 11:36:35 +020012013$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012014
Christian Heimes39258d32021-04-17 11:36:35 +020012015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12016$as_echo "yes" >&6; }
12017else
12018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12019$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012020
12021fi
Christian Heimes39258d32021-04-17 11:36:35 +020012022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
12024$as_echo_n "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012026/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012027#include <unistd.h>
12028int
Christian Heimes39258d32021-04-17 11:36:35 +020012029main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012030{
12031void *x=fdatasync
12032 ;
12033 return 0;
12034}
12035_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012037
Christian Heimes39258d32021-04-17 11:36:35 +020012038$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012039
Christian Heimes39258d32021-04-17 11:36:35 +020012040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12041$as_echo "yes" >&6; }
12042else
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12044$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012045
12046fi
Christian Heimes39258d32021-04-17 11:36:35 +020012047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
12049$as_echo_n "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012051/* end confdefs.h. */
12052#include <sys/epoll.h>
12053int
Christian Heimes39258d32021-04-17 11:36:35 +020012054main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012055{
12056void *x=epoll_create
12057 ;
12058 return 0;
12059}
12060_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012061if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012062
Christian Heimes39258d32021-04-17 11:36:35 +020012063$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012064
Christian Heimes39258d32021-04-17 11:36:35 +020012065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12066$as_echo "yes" >&6; }
12067else
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12069$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012070
12071fi
Christian Heimes39258d32021-04-17 11:36:35 +020012072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
12074$as_echo_n "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060012075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12076/* end confdefs.h. */
12077#include <sys/epoll.h>
12078int
Christian Heimes39258d32021-04-17 11:36:35 +020012079main ()
Benjamin Peterson95c16622011-12-27 15:36:32 -060012080{
12081void *x=epoll_create1
12082 ;
12083 return 0;
12084}
12085_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012086if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060012087
Christian Heimes39258d32021-04-17 11:36:35 +020012088$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060012089
Christian Heimes39258d32021-04-17 11:36:35 +020012090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12091$as_echo "yes" >&6; }
12092else
12093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12094$as_echo "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060012095
12096fi
Christian Heimes39258d32021-04-17 11:36:35 +020012097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12099$as_echo_n "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012101/* end confdefs.h. */
12102
12103#include <sys/types.h>
12104#include <sys/event.h>
12105
12106int
Christian Heimes39258d32021-04-17 11:36:35 +020012107main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012108{
12109int x=kqueue()
12110 ;
12111 return 0;
12112}
12113_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012114if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012115
Christian Heimes39258d32021-04-17 11:36:35 +020012116$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012117
Christian Heimes39258d32021-04-17 11:36:35 +020012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12119$as_echo "yes" >&6; }
12120else
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12122$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012123
12124fi
Christian Heimes39258d32021-04-17 11:36:35 +020012125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12127$as_echo_n "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12129/* end confdefs.h. */
12130
12131#include <sys/time.h>
12132#include <sys/resource.h>
12133
12134int
Christian Heimes39258d32021-04-17 11:36:35 +020012135main ()
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012136{
12137void *x=prlimit
12138 ;
12139 return 0;
12140}
12141_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012142if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012143
Christian Heimes39258d32021-04-17 11:36:35 +020012144$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012145
Christian Heimes39258d32021-04-17 11:36:35 +020012146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12147$as_echo "yes" >&6; }
12148else
12149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12150$as_echo "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012151
12152fi
Christian Heimes39258d32021-04-17 11:36:35 +020012153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12155$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12157/* end confdefs.h. */
12158#include <mach-o/dyld.h>
12159int
Christian Heimes39258d32021-04-17 11:36:35 +020012160main ()
Ronald Oussoren41761932020-11-08 10:05:27 +010012161{
12162void *x=_dyld_shared_cache_contains_path
12163 ;
12164 return 0;
12165}
12166_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012167if ac_fn_c_try_compile "$LINENO"; then :
Ronald Oussoren41761932020-11-08 10:05:27 +010012168
Christian Heimes39258d32021-04-17 11:36:35 +020012169$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010012170
Christian Heimes39258d32021-04-17 11:36:35 +020012171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12172$as_echo "yes" >&6; }
12173else
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12175$as_echo "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012176
12177fi
Christian Heimes39258d32021-04-17 11:36:35 +020012178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012179
Christian Heimes39258d32021-04-17 11:36:35 +020012180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12181$as_echo_n "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12183/* end confdefs.h. */
12184
12185#ifdef HAVE_SYS_MMAN_H
12186#include <sys/mman.h>
12187#endif
12188#ifdef HAVE_SYS_MEMFD_H
12189#include <sys/memfd.h>
12190#endif
12191
12192int
Christian Heimes39258d32021-04-17 11:36:35 +020012193main ()
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012194{
12195void *x=memfd_create
12196 ;
12197 return 0;
12198}
12199_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012200if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012201
Christian Heimes39258d32021-04-17 11:36:35 +020012202$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012203
Christian Heimes39258d32021-04-17 11:36:35 +020012204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12205$as_echo "yes" >&6; }
12206else
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12208$as_echo "no" >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012209
12210fi
Christian Heimes39258d32021-04-17 11:36:35 +020012211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012212
Christian Heimes39258d32021-04-17 11:36:35 +020012213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12214$as_echo_n "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12216/* end confdefs.h. */
12217
12218#ifdef HAVE_SYS_EVENTFD_H
12219#include <sys/eventfd.h>
12220#endif
12221
12222int
Christian Heimes39258d32021-04-17 11:36:35 +020012223main ()
Christian Heimescd9fed62020-11-13 19:48:52 +010012224{
12225int x = eventfd(0, EFD_CLOEXEC)
12226 ;
12227 return 0;
12228}
12229_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012230if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimescd9fed62020-11-13 19:48:52 +010012231
Christian Heimes39258d32021-04-17 11:36:35 +020012232$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010012233
Christian Heimes39258d32021-04-17 11:36:35 +020012234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12235$as_echo "yes" >&6; }
12236else
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12238$as_echo "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012239
12240fi
Christian Heimes39258d32021-04-17 11:36:35 +020012241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010012242
Martin v. Löwisd5843682002-11-21 20:41:28 +000012243# On some systems (eg. FreeBSD 5), we would find a definition of the
12244# functions ctermid_r, setgroups in the library, but no prototype
12245# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12246# address to avoid compiler warnings and potential miscompilations
12247# because of the missing prototypes.
12248
Christian Heimes39258d32021-04-17 11:36:35 +020012249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12250$as_echo_n "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012252/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012253
Martin v. Löwisd5843682002-11-21 20:41:28 +000012254#include <stdio.h>
12255
Martin v. Löwisd5843682002-11-21 20:41:28 +000012256int
Christian Heimes39258d32021-04-17 11:36:35 +020012257main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012258{
12259void* p = ctermid_r
12260 ;
12261 return 0;
12262}
12263_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012265
Christian Heimes39258d32021-04-17 11:36:35 +020012266$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012267
Christian Heimes39258d32021-04-17 11:36:35 +020012268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12269$as_echo "yes" >&6; }
12270else
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12272$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012273
12274fi
Christian Heimes39258d32021-04-17 11:36:35 +020012275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276
Christian Heimes39258d32021-04-17 11:36:35 +020012277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12278$as_echo_n "checking for flock declaration... " >&6; }
12279if ${ac_cv_flock_decl+:} false; then :
12280 $as_echo_n "(cached) " >&6
12281else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012284#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012285int
Christian Heimes39258d32021-04-17 11:36:35 +020012286main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012287{
12288void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012289
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012290 ;
12291 return 0;
12292}
12293_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012294if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012295 ac_cv_flock_decl=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012296else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012297 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012298
12299fi
Christian Heimes39258d32021-04-17 11:36:35 +020012300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012301
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012302fi
Christian Heimes39258d32021-04-17 11:36:35 +020012303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12304$as_echo "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012305if test "x${ac_cv_flock_decl}" = xyes; then
12306 for ac_func in flock
12307do :
12308 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Christian Heimes39258d32021-04-17 11:36:35 +020012309if test "x$ac_cv_func_flock" = xyes; then :
12310 cat >>confdefs.h <<_ACEOF
12311#define HAVE_FLOCK 1
12312_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012313
Christian Heimes39258d32021-04-17 11:36:35 +020012314else
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
12316$as_echo_n "checking for flock in -lbsd... " >&6; }
12317if ${ac_cv_lib_bsd_flock+:} false; then :
12318 $as_echo_n "(cached) " >&6
12319else
Antoine Pitroua3000072010-09-07 14:52:42 +000012320 ac_check_lib_save_LIBS=$LIBS
12321LIBS="-lbsd $LIBS"
12322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12323/* end confdefs.h. */
12324
12325/* Override any GCC internal prototype to avoid an error.
12326 Use char because int might match the return type of a GCC
12327 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012328#ifdef __cplusplus
12329extern "C"
12330#endif
Antoine Pitroua3000072010-09-07 14:52:42 +000012331char flock ();
12332int
Christian Heimes39258d32021-04-17 11:36:35 +020012333main ()
Antoine Pitroua3000072010-09-07 14:52:42 +000012334{
12335return flock ();
12336 ;
12337 return 0;
12338}
12339_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012340if ac_fn_c_try_link "$LINENO"; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012341 ac_cv_lib_bsd_flock=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012342else
Antoine Pitroua3000072010-09-07 14:52:42 +000012343 ac_cv_lib_bsd_flock=no
12344fi
Christian Heimes39258d32021-04-17 11:36:35 +020012345rm -f core conftest.err conftest.$ac_objext \
Antoine Pitroua3000072010-09-07 14:52:42 +000012346 conftest$ac_exeext conftest.$ac_ext
12347LIBS=$ac_check_lib_save_LIBS
12348fi
Christian Heimes39258d32021-04-17 11:36:35 +020012349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12350$as_echo "$ac_cv_lib_bsd_flock" >&6; }
12351if test "x$ac_cv_lib_bsd_flock" = xyes; then :
12352 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012353
12354
Christian Heimes39258d32021-04-17 11:36:35 +020012355$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012356
12357
12358fi
12359
12360
12361fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012362done
Christian Heimes39258d32021-04-17 11:36:35 +020012363
Antoine Pitroua3000072010-09-07 14:52:42 +000012364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365
Christian Heimes39258d32021-04-17 11:36:35 +020012366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12367$as_echo_n "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012369/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012370
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012371#include <unistd.h>
12372
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012373int
Christian Heimes39258d32021-04-17 11:36:35 +020012374main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012375{
12376void* p = getpagesize
12377 ;
12378 return 0;
12379}
12380_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012382
Christian Heimes39258d32021-04-17 11:36:35 +020012383$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012384
Christian Heimes39258d32021-04-17 11:36:35 +020012385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12386$as_echo "yes" >&6; }
12387else
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12389$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012390
12391fi
Christian Heimes39258d32021-04-17 11:36:35 +020012392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012393
Christian Heimes39258d32021-04-17 11:36:35 +020012394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12395$as_echo_n "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12397/* end confdefs.h. */
12398
12399#include <stdlib.h>
12400
12401int
Christian Heimes39258d32021-04-17 11:36:35 +020012402main ()
Victor Stinner984890f2011-11-24 13:53:38 +010012403{
12404int res = unsetenv("DUMMY")
12405 ;
12406 return 0;
12407}
12408_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012409if ac_fn_c_try_compile "$LINENO"; then :
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411$as_echo "no" >&6; }
12412else
Victor Stinner984890f2011-11-24 13:53:38 +010012413
Christian Heimes39258d32021-04-17 11:36:35 +020012414$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010012415
Christian Heimes39258d32021-04-17 11:36:35 +020012416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12417$as_echo "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012418
12419fi
Christian Heimes39258d32021-04-17 11:36:35 +020012420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010012421
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012422for ac_prog in true
12423do
12424 # Extract the first word of "$ac_prog", so it can be a program name with args.
12425set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020012426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12427$as_echo_n "checking for $ac_word... " >&6; }
12428if ${ac_cv_prog_TRUE+:} false; then :
12429 $as_echo_n "(cached) " >&6
12430else
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012431 if test -n "$TRUE"; then
12432 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12433else
12434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12435for as_dir in $PATH
12436do
12437 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020012438 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020012440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012441 ac_cv_prog_TRUE="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +020012442 $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 +000012443 break 2
12444 fi
12445done
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012448
12449fi
12450fi
12451TRUE=$ac_cv_prog_TRUE
12452if test -n "$TRUE"; then
Christian Heimes39258d32021-04-17 11:36:35 +020012453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12454$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012455else
Christian Heimes39258d32021-04-17 11:36:35 +020012456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12457$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012458fi
12459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012460
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012461 test -n "$TRUE" && break
12462done
12463test -n "$TRUE" || TRUE="/bin/true"
12464
12465
Christian Heimes39258d32021-04-17 11:36:35 +020012466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12467$as_echo_n "checking for inet_aton in -lc... " >&6; }
12468if ${ac_cv_lib_c_inet_aton+:} false; then :
12469 $as_echo_n "(cached) " >&6
12470else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012471 ac_check_lib_save_LIBS=$LIBS
12472LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012474/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476/* Override any GCC internal prototype to avoid an error.
12477 Use char because int might match the return type of a GCC
12478 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012479#ifdef __cplusplus
12480extern "C"
12481#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012482char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012483int
Christian Heimes39258d32021-04-17 11:36:35 +020012484main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012487 ;
12488 return 0;
12489}
12490_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012491if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012492 ac_cv_lib_c_inet_aton=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012493else
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012495fi
Christian Heimes39258d32021-04-17 11:36:35 +020012496rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012498LIBS=$ac_check_lib_save_LIBS
12499fi
Christian Heimes39258d32021-04-17 11:36:35 +020012500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12501$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
12502if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012503 $ac_cv_prog_TRUE
Christian Heimes39258d32021-04-17 11:36:35 +020012504else
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12506$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
12507if ${ac_cv_lib_resolv_inet_aton+:} false; then :
12508 $as_echo_n "(cached) " >&6
12509else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012510 ac_check_lib_save_LIBS=$LIBS
12511LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012513/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515/* Override any GCC internal prototype to avoid an error.
12516 Use char because int might match the return type of a GCC
12517 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012518#ifdef __cplusplus
12519extern "C"
12520#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012521char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012522int
Christian Heimes39258d32021-04-17 11:36:35 +020012523main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012526 ;
12527 return 0;
12528}
12529_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012531 ac_cv_lib_resolv_inet_aton=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012534fi
Christian Heimes39258d32021-04-17 11:36:35 +020012535rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012537LIBS=$ac_check_lib_save_LIBS
12538fi
Christian Heimes39258d32021-04-17 11:36:35 +020012539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12540$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
12541if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
12542 cat >>confdefs.h <<_ACEOF
12543#define HAVE_LIBRESOLV 1
12544_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012545
12546 LIBS="-lresolv $LIBS"
12547
12548fi
12549
12550
12551fi
12552
12553
Christian Heimesd0764e22007-12-04 15:00:33 +000012554# On Tru64, chflags seems to be present, but calling it will
12555# exit Python
Christian Heimes39258d32021-04-17 11:36:35 +020012556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12557$as_echo_n "checking for chflags... " >&6; }
12558if ${ac_cv_have_chflags+:} false; then :
12559 $as_echo_n "(cached) " >&6
12560else
12561 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012562 ac_cv_have_chflags=cross
Christian Heimes39258d32021-04-17 11:36:35 +020012563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012565/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012566
Christian Heimesd0764e22007-12-04 15:00:33 +000012567#include <sys/stat.h>
12568#include <unistd.h>
12569int main(int argc, char*argv[])
12570{
12571 if(chflags(argv[0], 0) != 0)
12572 return 1;
12573 return 0;
12574}
Ned Deily3eb67d52011-06-28 00:00:28 -070012575
Christian Heimesd0764e22007-12-04 15:00:33 +000012576_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012577if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012578 ac_cv_have_chflags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012584fi
12585
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012586
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012587fi
Christian Heimes39258d32021-04-17 11:36:35 +020012588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12589$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012590if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012591 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Christian Heimes39258d32021-04-17 11:36:35 +020012592if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012593 ac_cv_have_chflags="yes"
Christian Heimes39258d32021-04-17 11:36:35 +020012594else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012595 ac_cv_have_chflags="no"
12596fi
12597
12598fi
12599if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012600
Christian Heimes39258d32021-04-17 11:36:35 +020012601$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012602
12603fi
12604
Christian Heimes39258d32021-04-17 11:36:35 +020012605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12606$as_echo_n "checking for lchflags... " >&6; }
12607if ${ac_cv_have_lchflags+:} false; then :
12608 $as_echo_n "(cached) " >&6
12609else
12610 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012611 ac_cv_have_lchflags=cross
Christian Heimes39258d32021-04-17 11:36:35 +020012612else
Matthias Kloseb9621712010-04-24 17:59:49 +000012613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012614/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012615
Christian Heimesd0764e22007-12-04 15:00:33 +000012616#include <sys/stat.h>
12617#include <unistd.h>
12618int main(int argc, char*argv[])
12619{
12620 if(lchflags(argv[0], 0) != 0)
12621 return 1;
12622 return 0;
12623}
Ned Deily3eb67d52011-06-28 00:00:28 -070012624
Christian Heimesd0764e22007-12-04 15:00:33 +000012625_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012626if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012627 ac_cv_have_lchflags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012628else
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12632 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012633fi
12634
12635
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012636fi
Christian Heimes39258d32021-04-17 11:36:35 +020012637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12638$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012639if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Christian Heimes39258d32021-04-17 11:36:35 +020012641if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012642 ac_cv_have_lchflags="yes"
Christian Heimes39258d32021-04-17 11:36:35 +020012643else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012644 ac_cv_have_lchflags="no"
12645fi
12646
12647fi
12648if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012649
Christian Heimes39258d32021-04-17 11:36:35 +020012650$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012651
12652fi
12653
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012654case $ac_sys_system/$ac_sys_release in
12655Darwin/*)
12656 _CUR_CFLAGS="${CFLAGS}"
12657 _CUR_LDFLAGS="${LDFLAGS}"
12658 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12659 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12660 ;;
12661esac
12662
Christian Heimes39258d32021-04-17 11:36:35 +020012663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12664$as_echo_n "checking for inflateCopy in -lz... " >&6; }
12665if ${ac_cv_lib_z_inflateCopy+:} false; then :
12666 $as_echo_n "(cached) " >&6
12667else
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012668 ac_check_lib_save_LIBS=$LIBS
12669LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012671/* end confdefs.h. */
12672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673/* Override any GCC internal prototype to avoid an error.
12674 Use char because int might match the return type of a GCC
12675 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012676#ifdef __cplusplus
12677extern "C"
12678#endif
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012679char inflateCopy ();
12680int
Christian Heimes39258d32021-04-17 11:36:35 +020012681main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012684 ;
12685 return 0;
12686}
12687_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012688if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012689 ac_cv_lib_z_inflateCopy=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012690else
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012692fi
Christian Heimes39258d32021-04-17 11:36:35 +020012693rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012695LIBS=$ac_check_lib_save_LIBS
12696fi
Christian Heimes39258d32021-04-17 11:36:35 +020012697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12698$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
12699if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012700
Christian Heimes39258d32021-04-17 11:36:35 +020012701$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012702
12703fi
12704
12705
12706case $ac_sys_system/$ac_sys_release in
12707Darwin/*)
12708 CFLAGS="${_CUR_CFLAGS}"
12709 LDFLAGS="${_CUR_LDFLAGS}"
12710 ;;
12711esac
12712
Christian Heimes39258d32021-04-17 11:36:35 +020012713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12714$as_echo_n "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012716/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012717
Martin v. Löwise9416172003-05-03 10:12:45 +000012718#include <netdb.h>
12719
Martin v. Löwise9416172003-05-03 10:12:45 +000012720int
Christian Heimes39258d32021-04-17 11:36:35 +020012721main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012722{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012723void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012724 ;
12725 return 0;
12726}
12727_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012729
Christian Heimes39258d32021-04-17 11:36:35 +020012730$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012731
Christian Heimes39258d32021-04-17 11:36:35 +020012732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12733$as_echo "yes" >&6; }
12734else
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12736$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012737
12738fi
Christian Heimes39258d32021-04-17 11:36:35 +020012739rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741
Christian Heimes39258d32021-04-17 11:36:35 +020012742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12743$as_echo_n "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012745/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012746
Martin v. Löwis86d66262006-02-17 08:40:11 +000012747#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012748#include <sys/socket.h>
12749#include <netinet/in.h>
12750#include <arpa/inet.h>
12751
Martin v. Löwise9416172003-05-03 10:12:45 +000012752int
Christian Heimes39258d32021-04-17 11:36:35 +020012753main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012754{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012755void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012756 ;
12757 return 0;
12758}
12759_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012760if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012761
Christian Heimes39258d32021-04-17 11:36:35 +020012762$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012763
Christian Heimes39258d32021-04-17 11:36:35 +020012764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12765$as_echo "yes" >&6; }
12766else
12767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12768$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012769
12770fi
Christian Heimes39258d32021-04-17 11:36:35 +020012771rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773
Christian Heimes39258d32021-04-17 11:36:35 +020012774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12775$as_echo_n "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012777/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012778
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012779#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012780#include <sys/socket.h>
12781#include <netinet/in.h>
12782#include <arpa/inet.h>
12783
Martin v. Löwise9416172003-05-03 10:12:45 +000012784int
Christian Heimes39258d32021-04-17 11:36:35 +020012785main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012786{
12787void* p = inet_pton
12788 ;
12789 return 0;
12790}
12791_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012792if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012793
Christian Heimes39258d32021-04-17 11:36:35 +020012794$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012795
Christian Heimes39258d32021-04-17 11:36:35 +020012796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12797$as_echo "yes" >&6; }
12798else
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12800$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012801
12802fi
Christian Heimes39258d32021-04-17 11:36:35 +020012803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012804
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012805# On some systems, setgroups is in unistd.h, on others, in grp.h
Christian Heimes39258d32021-04-17 11:36:35 +020012806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12807$as_echo_n "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012809/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012810
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012811#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012812#ifdef HAVE_GRP_H
12813#include <grp.h>
12814#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012815
Martin v. Löwisd5843682002-11-21 20:41:28 +000012816int
Christian Heimes39258d32021-04-17 11:36:35 +020012817main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012818{
12819void* p = setgroups
12820 ;
12821 return 0;
12822}
12823_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012824if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012825
Christian Heimes39258d32021-04-17 11:36:35 +020012826$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012827
Christian Heimes39258d32021-04-17 11:36:35 +020012828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12829$as_echo "yes" >&6; }
12830else
12831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12832$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012833
12834fi
Christian Heimes39258d32021-04-17 11:36:35 +020012835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012836
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012837# check for openpty and forkpty
12838
Christian Heimes39258d32021-04-17 11:36:35 +020012839for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012840do :
12841 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Christian Heimes39258d32021-04-17 11:36:35 +020012842if test "x$ac_cv_func_openpty" = xyes; then :
12843 cat >>confdefs.h <<_ACEOF
12844#define HAVE_OPENPTY 1
12845_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012846
Christian Heimes39258d32021-04-17 11:36:35 +020012847else
12848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12849$as_echo_n "checking for openpty in -lutil... " >&6; }
12850if ${ac_cv_lib_util_openpty+:} false; then :
12851 $as_echo_n "(cached) " >&6
12852else
Martin v. Löwis11437992002-04-12 09:54:03 +000012853 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012854LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858/* Override any GCC internal prototype to avoid an error.
12859 Use char because int might match the return type of a GCC
12860 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012861#ifdef __cplusplus
12862extern "C"
12863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012864char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012865int
Christian Heimes39258d32021-04-17 11:36:35 +020012866main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ;
12870 return 0;
12871}
12872_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012873if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 ac_cv_lib_util_openpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012875else
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012877fi
Christian Heimes39258d32021-04-17 11:36:35 +020012878rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012880LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012881fi
Christian Heimes39258d32021-04-17 11:36:35 +020012882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12883$as_echo "$ac_cv_lib_util_openpty" >&6; }
12884if test "x$ac_cv_lib_util_openpty" = xyes; then :
12885 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012886 LIBS="$LIBS -lutil"
Christian Heimes39258d32021-04-17 11:36:35 +020012887else
12888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12889$as_echo_n "checking for openpty in -lbsd... " >&6; }
12890if ${ac_cv_lib_bsd_openpty+:} false; then :
12891 $as_echo_n "(cached) " >&6
12892else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012893 ac_check_lib_save_LIBS=$LIBS
12894LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012896/* end confdefs.h. */
12897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898/* Override any GCC internal prototype to avoid an error.
12899 Use char because int might match the return type of a GCC
12900 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012901#ifdef __cplusplus
12902extern "C"
12903#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012904char openpty ();
12905int
Christian Heimes39258d32021-04-17 11:36:35 +020012906main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012909 ;
12910 return 0;
12911}
12912_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012914 ac_cv_lib_bsd_openpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012917fi
Christian Heimes39258d32021-04-17 11:36:35 +020012918rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012920LIBS=$ac_check_lib_save_LIBS
12921fi
Christian Heimes39258d32021-04-17 11:36:35 +020012922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12923$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
12924if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
12925 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012926 LIBS="$LIBS -lbsd"
12927fi
12928
12929
12930fi
12931
Fred Drake8cef4cf2000-06-28 16:40:38 +000012932
12933fi
12934done
12935
Christian Heimes39258d32021-04-17 11:36:35 +020012936for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012937do :
12938 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Christian Heimes39258d32021-04-17 11:36:35 +020012939if test "x$ac_cv_func_forkpty" = xyes; then :
12940 cat >>confdefs.h <<_ACEOF
12941#define HAVE_FORKPTY 1
12942_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012943
Christian Heimes39258d32021-04-17 11:36:35 +020012944else
12945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12946$as_echo_n "checking for forkpty in -lutil... " >&6; }
12947if ${ac_cv_lib_util_forkpty+:} false; then :
12948 $as_echo_n "(cached) " >&6
12949else
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012951LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955/* Override any GCC internal prototype to avoid an error.
12956 Use char because int might match the return type of a GCC
12957 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012958#ifdef __cplusplus
12959extern "C"
12960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012961char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012962int
Christian Heimes39258d32021-04-17 11:36:35 +020012963main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 ;
12967 return 0;
12968}
12969_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 ac_cv_lib_util_forkpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012972else
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012974fi
Christian Heimes39258d32021-04-17 11:36:35 +020012975rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012977LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012978fi
Christian Heimes39258d32021-04-17 11:36:35 +020012979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12980$as_echo "$ac_cv_lib_util_forkpty" >&6; }
12981if test "x$ac_cv_lib_util_forkpty" = xyes; then :
12982 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012983 LIBS="$LIBS -lutil"
Christian Heimes39258d32021-04-17 11:36:35 +020012984else
12985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12986$as_echo_n "checking for forkpty in -lbsd... " >&6; }
12987if ${ac_cv_lib_bsd_forkpty+:} false; then :
12988 $as_echo_n "(cached) " >&6
12989else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012990 ac_check_lib_save_LIBS=$LIBS
12991LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012993/* end confdefs.h. */
12994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995/* Override any GCC internal prototype to avoid an error.
12996 Use char because int might match the return type of a GCC
12997 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012998#ifdef __cplusplus
12999extern "C"
13000#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013001char forkpty ();
13002int
Christian Heimes39258d32021-04-17 11:36:35 +020013003main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013006 ;
13007 return 0;
13008}
13009_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013011 ac_cv_lib_bsd_forkpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013014fi
Christian Heimes39258d32021-04-17 11:36:35 +020013015rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013017LIBS=$ac_check_lib_save_LIBS
13018fi
Christian Heimes39258d32021-04-17 11:36:35 +020013019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
13020$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
13021if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
13022 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013023 LIBS="$LIBS -lbsd"
13024fi
13025
13026
13027fi
13028
Fred Drake8cef4cf2000-06-28 16:40:38 +000013029
13030fi
Pablo Galindo53e55292021-04-05 17:38:40 +010013031done
Christian Heimes32eba612021-03-19 10:29:25 +010013032
Christian Heimes39258d32021-04-17 11:36:35 +020013033
Michael W. Hudson54241132001-12-07 15:38:26 +000013034# check for long file support functions
Christian Heimes39258d32021-04-17 11:36:35 +020013035for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13036do :
13037 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13038ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13039if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13040 cat >>confdefs.h <<_ACEOF
13041#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13042_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013043
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044fi
Christian Heimes39258d32021-04-17 11:36:35 +020013045done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013046
Michael W. Hudson54241132001-12-07 15:38:26 +000013047
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013048ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Christian Heimes39258d32021-04-17 11:36:35 +020013049if test "x$ac_cv_func_dup2" = xyes; then :
13050 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000013051
Christian Heimes39258d32021-04-17 11:36:35 +020013052else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013054 *" dup2.$ac_objext "* ) ;;
13055 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013057esac
13058
Martin v. Löwis1142de32002-03-29 16:28:31 +000013059fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013060
Martin v. Löwis1142de32002-03-29 16:28:31 +000013061
Christian Heimes39258d32021-04-17 11:36:35 +020013062for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013063do :
13064 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Christian Heimes39258d32021-04-17 11:36:35 +020013065if test "x$ac_cv_func_getpgrp" = xyes; then :
13066 cat >>confdefs.h <<_ACEOF
13067#define HAVE_GETPGRP 1
13068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013072int
Christian Heimes39258d32021-04-17 11:36:35 +020013073main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013074{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 ;
13077 return 0;
13078}
13079_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013080if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013081
Christian Heimes39258d32021-04-17 11:36:35 +020013082$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013083
Guido van Rossum627b2d71993-12-24 10:39:16 +000013084fi
Christian Heimes39258d32021-04-17 11:36:35 +020013085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013086
Guido van Rossum627b2d71993-12-24 10:39:16 +000013087fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013088done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013089
Christian Heimes39258d32021-04-17 11:36:35 +020013090for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013091do :
13092 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Christian Heimes39258d32021-04-17 11:36:35 +020013093if test "x$ac_cv_func_setpgrp" = xyes; then :
13094 cat >>confdefs.h <<_ACEOF
13095#define HAVE_SETPGRP 1
13096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013098/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013099#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013100int
Christian Heimes39258d32021-04-17 11:36:35 +020013101main ()
Jack Jansen150753c2003-03-29 22:07:47 +000013102{
13103setpgrp(0,0);
13104 ;
13105 return 0;
13106}
13107_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Christian Heimes39258d32021-04-17 11:36:35 +020013110$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013111
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013112fi
Christian Heimes39258d32021-04-17 11:36:35 +020013113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013114
13115fi
13116done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013117
Christian Heimes39258d32021-04-17 11:36:35 +020013118
Gregory P. Smith387512c2018-12-30 15:42:32 -080013119# We search for both crypt and crypt_r as one or the other may be defined
13120# This gets us our -lcrypt in LIBS when required on the target platform.
Christian Heimes39258d32021-04-17 11:36:35 +020013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13122$as_echo_n "checking for library containing crypt... " >&6; }
13123if ${ac_cv_search_crypt+:} false; then :
13124 $as_echo_n "(cached) " >&6
13125else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013126 ac_func_search_save_LIBS=$LIBS
13127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13128/* end confdefs.h. */
13129
13130/* Override any GCC internal prototype to avoid an error.
13131 Use char because int might match the return type of a GCC
13132 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013133#ifdef __cplusplus
13134extern "C"
13135#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013136char crypt ();
13137int
Christian Heimes39258d32021-04-17 11:36:35 +020013138main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013139{
13140return crypt ();
13141 ;
13142 return 0;
13143}
13144_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013145for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013146 if test -z "$ac_lib"; then
13147 ac_res="none required"
13148 else
13149 ac_res=-l$ac_lib
13150 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13151 fi
Christian Heimes39258d32021-04-17 11:36:35 +020013152 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013153 ac_cv_search_crypt=$ac_res
13154fi
Christian Heimes39258d32021-04-17 11:36:35 +020013155rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013156 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020013157 if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013158 break
13159fi
13160done
Christian Heimes39258d32021-04-17 11:36:35 +020013161if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013162
Christian Heimes39258d32021-04-17 11:36:35 +020013163else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013164 ac_cv_search_crypt=no
13165fi
13166rm conftest.$ac_ext
13167LIBS=$ac_func_search_save_LIBS
13168fi
Christian Heimes39258d32021-04-17 11:36:35 +020013169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13170$as_echo "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013171ac_res=$ac_cv_search_crypt
Christian Heimes39258d32021-04-17 11:36:35 +020013172if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013173 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13174
13175fi
13176
Christian Heimes39258d32021-04-17 11:36:35 +020013177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13178$as_echo_n "checking for library containing crypt_r... " >&6; }
13179if ${ac_cv_search_crypt_r+:} false; then :
13180 $as_echo_n "(cached) " >&6
13181else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013182 ac_func_search_save_LIBS=$LIBS
13183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13184/* end confdefs.h. */
13185
13186/* Override any GCC internal prototype to avoid an error.
13187 Use char because int might match the return type of a GCC
13188 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013189#ifdef __cplusplus
13190extern "C"
13191#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013192char crypt_r ();
13193int
Christian Heimes39258d32021-04-17 11:36:35 +020013194main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013195{
13196return crypt_r ();
13197 ;
13198 return 0;
13199}
13200_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013201for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013202 if test -z "$ac_lib"; then
13203 ac_res="none required"
13204 else
13205 ac_res=-l$ac_lib
13206 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13207 fi
Christian Heimes39258d32021-04-17 11:36:35 +020013208 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013209 ac_cv_search_crypt_r=$ac_res
13210fi
Christian Heimes39258d32021-04-17 11:36:35 +020013211rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013212 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020013213 if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013214 break
13215fi
13216done
Christian Heimes39258d32021-04-17 11:36:35 +020013217if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013218
Christian Heimes39258d32021-04-17 11:36:35 +020013219else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013220 ac_cv_search_crypt_r=no
13221fi
13222rm conftest.$ac_ext
13223LIBS=$ac_func_search_save_LIBS
13224fi
Christian Heimes39258d32021-04-17 11:36:35 +020013225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13226$as_echo "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013227ac_res=$ac_cv_search_crypt_r
Christian Heimes39258d32021-04-17 11:36:35 +020013228if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013229 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13230
13231fi
13232
13233
13234ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Christian Heimes39258d32021-04-17 11:36:35 +020013235if test "x$ac_cv_func_crypt_r" = xyes; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13237/* end confdefs.h. */
13238
13239#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13240#include <crypt.h>
13241
13242int
Christian Heimes39258d32021-04-17 11:36:35 +020013243main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013244{
13245
13246struct crypt_data d;
13247char *r = crypt_r("", "", &d);
13248
13249 ;
13250 return 0;
13251}
13252_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013253if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013254
Christian Heimes39258d32021-04-17 11:36:35 +020013255$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080013256
13257fi
Christian Heimes39258d32021-04-17 11:36:35 +020013258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080013259
13260fi
13261
13262
Christian Heimes39258d32021-04-17 11:36:35 +020013263for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020013264do :
13265 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Christian Heimes39258d32021-04-17 11:36:35 +020013266if test "x$ac_cv_func_clock_gettime" = xyes; then :
13267 cat >>confdefs.h <<_ACEOF
13268#define HAVE_CLOCK_GETTIME 1
13269_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013270
Christian Heimes39258d32021-04-17 11:36:35 +020013271else
Victor Stinnere0be4232011-10-25 13:06:09 +020013272
Christian Heimes39258d32021-04-17 11:36:35 +020013273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13274$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13275if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13276 $as_echo_n "(cached) " >&6
13277else
Victor Stinnere0be4232011-10-25 13:06:09 +020013278 ac_check_lib_save_LIBS=$LIBS
13279LIBS="-lrt $LIBS"
13280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13281/* end confdefs.h. */
13282
13283/* Override any GCC internal prototype to avoid an error.
13284 Use char because int might match the return type of a GCC
13285 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013286#ifdef __cplusplus
13287extern "C"
13288#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013289char clock_gettime ();
13290int
Christian Heimes39258d32021-04-17 11:36:35 +020013291main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013292{
13293return clock_gettime ();
13294 ;
13295 return 0;
13296}
13297_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013298if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013299 ac_cv_lib_rt_clock_gettime=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013300else
Victor Stinnere0be4232011-10-25 13:06:09 +020013301 ac_cv_lib_rt_clock_gettime=no
13302fi
Christian Heimes39258d32021-04-17 11:36:35 +020013303rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013304 conftest$ac_exeext conftest.$ac_ext
13305LIBS=$ac_check_lib_save_LIBS
13306fi
Christian Heimes39258d32021-04-17 11:36:35 +020013307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13308$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13309if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013310
Victor Stinner7efb8332014-08-29 15:41:08 +020013311 LIBS="$LIBS -lrt"
Christian Heimes39258d32021-04-17 11:36:35 +020013312 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013313
13314
Christian Heimes39258d32021-04-17 11:36:35 +020013315$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013316
13317
13318fi
13319
13320
13321fi
13322done
13323
13324
Christian Heimes39258d32021-04-17 11:36:35 +020013325for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020013326do :
13327 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Christian Heimes39258d32021-04-17 11:36:35 +020013328if test "x$ac_cv_func_clock_getres" = xyes; then :
13329 cat >>confdefs.h <<_ACEOF
13330#define HAVE_CLOCK_GETRES 1
13331_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013332
Christian Heimes39258d32021-04-17 11:36:35 +020013333else
Victor Stinnere0be4232011-10-25 13:06:09 +020013334
Christian Heimes39258d32021-04-17 11:36:35 +020013335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13336$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13337if ${ac_cv_lib_rt_clock_getres+:} false; then :
13338 $as_echo_n "(cached) " >&6
13339else
Victor Stinnere0be4232011-10-25 13:06:09 +020013340 ac_check_lib_save_LIBS=$LIBS
13341LIBS="-lrt $LIBS"
13342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13343/* end confdefs.h. */
13344
13345/* Override any GCC internal prototype to avoid an error.
13346 Use char because int might match the return type of a GCC
13347 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013348#ifdef __cplusplus
13349extern "C"
13350#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013351char clock_getres ();
13352int
Christian Heimes39258d32021-04-17 11:36:35 +020013353main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013354{
13355return clock_getres ();
13356 ;
13357 return 0;
13358}
13359_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013360if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013361 ac_cv_lib_rt_clock_getres=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013362else
Victor Stinnere0be4232011-10-25 13:06:09 +020013363 ac_cv_lib_rt_clock_getres=no
13364fi
Christian Heimes39258d32021-04-17 11:36:35 +020013365rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013366 conftest$ac_exeext conftest.$ac_ext
13367LIBS=$ac_check_lib_save_LIBS
13368fi
Christian Heimes39258d32021-04-17 11:36:35 +020013369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13370$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13371if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013372
Christian Heimes39258d32021-04-17 11:36:35 +020013373 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013374
13375
13376fi
13377
13378
13379fi
13380done
13381
13382
Christian Heimes39258d32021-04-17 11:36:35 +020013383for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013384do :
13385 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Christian Heimes39258d32021-04-17 11:36:35 +020013386if test "x$ac_cv_func_clock_settime" = xyes; then :
13387 cat >>confdefs.h <<_ACEOF
13388#define HAVE_CLOCK_SETTIME 1
13389_ACEOF
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013390
Christian Heimes39258d32021-04-17 11:36:35 +020013391else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013392
Christian Heimes39258d32021-04-17 11:36:35 +020013393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13394$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13395if ${ac_cv_lib_rt_clock_settime+:} false; then :
13396 $as_echo_n "(cached) " >&6
13397else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013398 ac_check_lib_save_LIBS=$LIBS
13399LIBS="-lrt $LIBS"
13400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13401/* end confdefs.h. */
13402
13403/* Override any GCC internal prototype to avoid an error.
13404 Use char because int might match the return type of a GCC
13405 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013406#ifdef __cplusplus
13407extern "C"
13408#endif
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013409char clock_settime ();
13410int
Christian Heimes39258d32021-04-17 11:36:35 +020013411main ()
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013412{
13413return clock_settime ();
13414 ;
13415 return 0;
13416}
13417_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013418if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013419 ac_cv_lib_rt_clock_settime=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013420else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013421 ac_cv_lib_rt_clock_settime=no
13422fi
Christian Heimes39258d32021-04-17 11:36:35 +020013423rm -f core conftest.err conftest.$ac_objext \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013424 conftest$ac_exeext conftest.$ac_ext
13425LIBS=$ac_check_lib_save_LIBS
13426fi
Christian Heimes39258d32021-04-17 11:36:35 +020013427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13428$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13429if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013430
Christian Heimes39258d32021-04-17 11:36:35 +020013431 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013432
13433
13434fi
13435
13436
13437fi
13438done
13439
Christian Heimes39258d32021-04-17 11:36:35 +020013440
13441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13442$as_echo_n "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013444/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013445
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013446#if defined(MAJOR_IN_MKDEV)
13447#include <sys/mkdev.h>
13448#elif defined(MAJOR_IN_SYSMACROS)
13449#include <sys/sysmacros.h>
13450#else
13451#include <sys/types.h>
13452#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013453
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013454int
Christian Heimes39258d32021-04-17 11:36:35 +020013455main ()
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013456{
13457
13458 makedev(major(0),minor(0));
13459
13460 ;
13461 return 0;
13462}
13463_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013465
13466
Christian Heimes39258d32021-04-17 11:36:35 +020013467$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013468
Christian Heimes39258d32021-04-17 11:36:35 +020013469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13470$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013471
Christian Heimes39258d32021-04-17 11:36:35 +020013472else
Skip Montanaro6dead952003-09-25 14:50:04 +000013473
Christian Heimes39258d32021-04-17 11:36:35 +020013474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13475$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013476
13477fi
Christian Heimes39258d32021-04-17 11:36:35 +020013478rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013480
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013481# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013482# for [no]getaddrinfo in netdb.h.
Christian Heimes39258d32021-04-17 11:36:35 +020013483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13484$as_echo_n "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013486/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013487
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013488#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013489#include <sys/socket.h>
13490#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013491#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013492
Martin v. Löwis11437992002-04-12 09:54:03 +000013493int
Christian Heimes39258d32021-04-17 11:36:35 +020013494main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013495{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013496getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 ;
13498 return 0;
13499}
13500_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013501if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013502 have_getaddrinfo=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013505fi
Christian Heimes39258d32021-04-17 11:36:35 +020013506rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020013508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13509$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013510if test $have_getaddrinfo = yes
13511then
Christian Heimes39258d32021-04-17 11:36:35 +020013512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13513$as_echo_n "checking getaddrinfo bug... " >&6; }
13514 if ${ac_cv_buggy_getaddrinfo+:} false; then :
13515 $as_echo_n "(cached) " >&6
13516else
13517 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013518
13519if test "${enable_ipv6+set}" = set; then
13520 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13521else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013522 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013523fi
Christian Heimes39258d32021-04-17 11:36:35 +020013524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013526/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013527
Stefan Krah19c21392012-11-22 23:47:32 +010013528#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013529#include <sys/types.h>
13530#include <netdb.h>
13531#include <string.h>
13532#include <sys/socket.h>
13533#include <netinet/in.h>
13534
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013535int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013536{
13537 int passive, gaierr, inet4 = 0, inet6 = 0;
13538 struct addrinfo hints, *ai, *aitop;
13539 char straddr[INET6_ADDRSTRLEN], strport[16];
13540
13541 for (passive = 0; passive <= 1; passive++) {
13542 memset(&hints, 0, sizeof(hints));
13543 hints.ai_family = AF_UNSPEC;
13544 hints.ai_flags = passive ? AI_PASSIVE : 0;
13545 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013546 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013547 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13548 (void)gai_strerror(gaierr);
13549 goto bad;
13550 }
13551 for (ai = aitop; ai; ai = ai->ai_next) {
13552 if (ai->ai_addr == NULL ||
13553 ai->ai_addrlen == 0 ||
13554 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13555 straddr, sizeof(straddr), strport, sizeof(strport),
13556 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13557 goto bad;
13558 }
13559 switch (ai->ai_family) {
13560 case AF_INET:
13561 if (strcmp(strport, "54321") != 0) {
13562 goto bad;
13563 }
13564 if (passive) {
13565 if (strcmp(straddr, "0.0.0.0") != 0) {
13566 goto bad;
13567 }
13568 } else {
13569 if (strcmp(straddr, "127.0.0.1") != 0) {
13570 goto bad;
13571 }
13572 }
13573 inet4++;
13574 break;
13575 case AF_INET6:
13576 if (strcmp(strport, "54321") != 0) {
13577 goto bad;
13578 }
13579 if (passive) {
13580 if (strcmp(straddr, "::") != 0) {
13581 goto bad;
13582 }
13583 } else {
13584 if (strcmp(straddr, "::1") != 0) {
13585 goto bad;
13586 }
13587 }
13588 inet6++;
13589 break;
13590 case AF_UNSPEC:
13591 goto bad;
13592 break;
13593 default:
13594 /* another family support? */
13595 break;
13596 }
13597 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013598 freeaddrinfo(aitop);
13599 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013600 }
13601
13602 if (!(inet4 == 0 || inet4 == 2))
13603 goto bad;
13604 if (!(inet6 == 0 || inet6 == 2))
13605 goto bad;
13606
13607 if (aitop)
13608 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013609 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013610
13611 bad:
13612 if (aitop)
13613 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013614 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013615}
13616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013618if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013619 ac_cv_buggy_getaddrinfo=no
Christian Heimes39258d32021-04-17 11:36:35 +020013620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13624 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013627fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630
Christian Heimes39258d32021-04-17 11:36:35 +020013631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13632$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013633
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013634if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013635then
13636 if test $ipv6 = yes
13637 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013638 echo 'Fatal: You must get working getaddrinfo() function.'
13639 echo ' or you can specify "--disable-ipv6"'.
13640 exit 1
13641 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013642else
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
Christian Heimes39258d32021-04-17 11:36:35 +020013644$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013645
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013646fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013647
Christian Heimes39258d32021-04-17 11:36:35 +020013648for ac_func in getnameinfo
13649do :
13650 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
13651if test "x$ac_cv_func_getnameinfo" = xyes; then :
13652 cat >>confdefs.h <<_ACEOF
13653#define HAVE_GETNAMEINFO 1
13654_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013655
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013656fi
Christian Heimes39258d32021-04-17 11:36:35 +020013657done
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013658
Michael W. Hudson54241132001-12-07 15:38:26 +000013659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013660# checks for structures
Christian Heimes39258d32021-04-17 11:36:35 +020013661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13662$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
13663if ${ac_cv_header_time+:} false; then :
13664 $as_echo_n "(cached) " >&6
13665else
13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13667/* end confdefs.h. */
13668#include <sys/types.h>
13669#include <sys/time.h>
13670#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013671
Christian Heimes39258d32021-04-17 11:36:35 +020013672int
13673main ()
13674{
13675if ((struct tm *) 0)
13676return 0;
13677 ;
13678 return 0;
13679}
13680_ACEOF
13681if ac_fn_c_try_compile "$LINENO"; then :
13682 ac_cv_header_time=yes
13683else
13684 ac_cv_header_time=no
13685fi
13686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13687fi
13688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13689$as_echo "$ac_cv_header_time" >&6; }
13690if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Christian Heimes39258d32021-04-17 11:36:35 +020013692$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013693
13694fi
13695
Christian Heimes39258d32021-04-17 11:36:35 +020013696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13697$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13698if ${ac_cv_struct_tm+:} false; then :
13699 $as_echo_n "(cached) " >&6
13700else
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013702/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013703#include <sys/types.h>
13704#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
Martin v. Löwis11437992002-04-12 09:54:03 +000013706int
Christian Heimes39258d32021-04-17 11:36:35 +020013707main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709struct tm tm;
13710 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 ;
13713 return 0;
13714}
13715_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013716if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717 ac_cv_struct_tm=time.h
Christian Heimes39258d32021-04-17 11:36:35 +020013718else
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013720fi
Christian Heimes39258d32021-04-17 11:36:35 +020013721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722fi
Christian Heimes39258d32021-04-17 11:36:35 +020013723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13724$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013725if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013726
Christian Heimes39258d32021-04-17 11:36:35 +020013727$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728
13729fi
13730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731ac_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 +000013732#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734"
Christian Heimes39258d32021-04-17 11:36:35 +020013735if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
Christian Heimes39258d32021-04-17 11:36:35 +020013737cat >>confdefs.h <<_ACEOF
13738#define HAVE_STRUCT_TM_TM_ZONE 1
13739_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
13741
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013743
Martin v. Löwis11437992002-04-12 09:54:03 +000013744if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13745
Christian Heimes39258d32021-04-17 11:36:35 +020013746$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013747
13748else
Christian Heimes39258d32021-04-17 11:36:35 +020013749 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13750"
13751if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020013753else
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755fi
13756
Christian Heimes39258d32021-04-17 11:36:35 +020013757cat >>confdefs.h <<_ACEOF
13758#define HAVE_DECL_TZNAME $ac_have_decl
13759_ACEOF
13760
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13762$as_echo_n "checking for tzname... " >&6; }
13763if ${ac_cv_var_tzname+:} false; then :
13764 $as_echo_n "(cached) " >&6
13765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013767/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013768#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769#if !HAVE_DECL_TZNAME
13770extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013772
Martin v. Löwis11437992002-04-12 09:54:03 +000013773int
Christian Heimes39258d32021-04-17 11:36:35 +020013774main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 ;
13778 return 0;
13779}
13780_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013781if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782 ac_cv_var_tzname=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013783else
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013785fi
Christian Heimes39258d32021-04-17 11:36:35 +020013786rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013788fi
Christian Heimes39258d32021-04-17 11:36:35 +020013789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13790$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013791 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013792
Christian Heimes39258d32021-04-17 11:36:35 +020013793$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013795 fi
13796fi
13797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798ac_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 +020013799if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
Christian Heimes39258d32021-04-17 11:36:35 +020013801cat >>confdefs.h <<_ACEOF
13802#define HAVE_STRUCT_STAT_ST_RDEV 1
13803_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
13805
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013806fi
13807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808ac_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 +020013809if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013810
Christian Heimes39258d32021-04-17 11:36:35 +020013811cat >>confdefs.h <<_ACEOF
13812#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13813_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
13815
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013816fi
13817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818ac_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 +020013819if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013820
Christian Heimes39258d32021-04-17 11:36:35 +020013821cat >>confdefs.h <<_ACEOF
13822#define HAVE_STRUCT_STAT_ST_FLAGS 1
13823_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013824
13825
13826fi
13827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828ac_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 +020013829if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013830
Christian Heimes39258d32021-04-17 11:36:35 +020013831cat >>confdefs.h <<_ACEOF
13832#define HAVE_STRUCT_STAT_ST_GEN 1
13833_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013834
13835
13836fi
13837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838ac_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 +020013839if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013840
Christian Heimes39258d32021-04-17 11:36:35 +020013841cat >>confdefs.h <<_ACEOF
13842#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13843_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013844
13845
13846fi
13847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848ac_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 +020013849if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013850
Christian Heimes39258d32021-04-17 11:36:35 +020013851cat >>confdefs.h <<_ACEOF
13852#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13853_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013854
13855
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013856fi
13857
Stefan Krah267b6392016-04-26 01:09:18 +020013858ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13859 #include <sys/types.h>
13860 #include <pwd.h>
13861
13862"
Christian Heimes39258d32021-04-17 11:36:35 +020013863if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013864
Christian Heimes39258d32021-04-17 11:36:35 +020013865cat >>confdefs.h <<_ACEOF
13866#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13867_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013868
13869
13870fi
13871ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13872 #include <sys/types.h>
13873 #include <pwd.h>
13874
13875"
Christian Heimes39258d32021-04-17 11:36:35 +020013876if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013877
Christian Heimes39258d32021-04-17 11:36:35 +020013878cat >>confdefs.h <<_ACEOF
13879#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13880_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013881
13882
13883fi
13884
Zachary Ware6a6967e2016-10-01 00:47:27 -050013885# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13886ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13887"
Christian Heimes39258d32021-04-17 11:36:35 +020013888if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050013889
Christian Heimes39258d32021-04-17 11:36:35 +020013890cat >>confdefs.h <<_ACEOF
13891#define HAVE_SIGINFO_T_SI_BAND 1
13892_ACEOF
Zachary Ware6a6967e2016-10-01 00:47:27 -050013893
13894
13895fi
13896
Michael W. Hudson54241132001-12-07 15:38:26 +000013897
Christian Heimes39258d32021-04-17 11:36:35 +020013898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13899$as_echo_n "checking for time.h that defines altzone... " >&6; }
13900if ${ac_cv_header_time_altzone+:} false; then :
13901 $as_echo_n "(cached) " >&6
13902else
Matthias Kloseb159a552010-04-25 21:00:44 +000013903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013905/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013906#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013907int
Christian Heimes39258d32021-04-17 11:36:35 +020013908main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013909{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013910return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 ;
13912 return 0;
13913}
13914_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013915if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013916 ac_cv_header_time_altzone=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013919fi
Christian Heimes39258d32021-04-17 11:36:35 +020013920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922fi
13923
Christian Heimes39258d32021-04-17 11:36:35 +020013924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13925$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013926if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013927
Christian Heimes39258d32021-04-17 11:36:35 +020013928$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013929
13930fi
13931
Guido van Rossumda88dad1995-01-26 00:46:29 +000013932was_it_defined=no
Christian Heimes39258d32021-04-17 11:36:35 +020013933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13934$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013936/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013937
13938#include <sys/types.h>
13939#include <sys/select.h>
13940#include <sys/time.h>
13941
Martin v. Löwis11437992002-04-12 09:54:03 +000013942int
Christian Heimes39258d32021-04-17 11:36:35 +020013943main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013944{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013945;
Martin v. Löwis11437992002-04-12 09:54:03 +000013946 ;
13947 return 0;
13948}
13949_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013951
13952
Christian Heimes39258d32021-04-17 11:36:35 +020013953$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013954
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013955 was_it_defined=yes
13956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957fi
Christian Heimes39258d32021-04-17 11:36:35 +020013958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13960$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961
Christian Heimes39258d32021-04-17 11:36:35 +020013962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13963$as_echo_n "checking for addrinfo... " >&6; }
13964if ${ac_cv_struct_addrinfo+:} false; then :
13965 $as_echo_n "(cached) " >&6
13966else
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013968/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013969#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013970int
Christian Heimes39258d32021-04-17 11:36:35 +020013971main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013972{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013973struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 ;
13975 return 0;
13976}
13977_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013979 ac_cv_struct_addrinfo=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013980else
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013982fi
Christian Heimes39258d32021-04-17 11:36:35 +020013983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984fi
13985
Christian Heimes39258d32021-04-17 11:36:35 +020013986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13987$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013988if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
Christian Heimes39258d32021-04-17 11:36:35 +020013990$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013991
13992fi
13993
Christian Heimes39258d32021-04-17 11:36:35 +020013994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13995$as_echo_n "checking for sockaddr_storage... " >&6; }
13996if ${ac_cv_struct_sockaddr_storage+:} false; then :
13997 $as_echo_n "(cached) " >&6
13998else
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014000/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014001
14002# include <sys/types.h>
14003# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014004int
Christian Heimes39258d32021-04-17 11:36:35 +020014005main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014006{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014007struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014008 ;
14009 return 0;
14010}
14011_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014013 ac_cv_struct_sockaddr_storage=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014014else
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014016fi
Christian Heimes39258d32021-04-17 11:36:35 +020014017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014018fi
14019
Christian Heimes39258d32021-04-17 11:36:35 +020014020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
14021$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014022if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014023
Christian Heimes39258d32021-04-17 11:36:35 +020014024$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014025
14026fi
14027
Christian Heimes39258d32021-04-17 11:36:35 +020014028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
14029$as_echo_n "checking for sockaddr_alg... " >&6; }
14030if ${ac_cv_struct_sockaddr_alg+:} false; then :
14031 $as_echo_n "(cached) " >&6
14032else
Christian Heimesdffa3942016-09-05 23:54:41 +020014033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14034/* end confdefs.h. */
14035
14036# include <sys/types.h>
14037# include <sys/socket.h>
14038# include <linux/if_alg.h>
14039int
Christian Heimes39258d32021-04-17 11:36:35 +020014040main ()
Christian Heimesdffa3942016-09-05 23:54:41 +020014041{
14042struct sockaddr_alg s
14043 ;
14044 return 0;
14045}
14046_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014047if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesdffa3942016-09-05 23:54:41 +020014048 ac_cv_struct_sockaddr_alg=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014049else
Christian Heimesdffa3942016-09-05 23:54:41 +020014050 ac_cv_struct_sockaddr_alg=no
14051fi
Christian Heimes39258d32021-04-17 11:36:35 +020014052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020014053fi
14054
Christian Heimes39258d32021-04-17 11:36:35 +020014055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
14056$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020014057if test $ac_cv_struct_sockaddr_alg = yes; then
14058
Christian Heimes39258d32021-04-17 11:36:35 +020014059$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020014060
14061fi
14062
Guido van Rossum627b2d71993-12-24 10:39:16 +000014063# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014064
Christian Heimes39258d32021-04-17 11:36:35 +020014065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
14066$as_echo_n "checking whether char is unsigned... " >&6; }
14067if ${ac_cv_c_char_unsigned+:} false; then :
14068 $as_echo_n "(cached) " >&6
14069else
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014072$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014073int
Christian Heimes39258d32021-04-17 11:36:35 +020014074main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014075{
14076static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014077test_array [0] = 0;
14078return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
14080 ;
14081 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014082}
Martin v. Löwis11437992002-04-12 09:54:03 +000014083_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014084if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014085 ac_cv_c_char_unsigned=no
Christian Heimes39258d32021-04-17 11:36:35 +020014086else
Matthias Kloseb9621712010-04-24 17:59:49 +000014087 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088fi
Christian Heimes39258d32021-04-17 11:36:35 +020014089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014090fi
Christian Heimes39258d32021-04-17 11:36:35 +020014091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14092$as_echo "$ac_cv_c_char_unsigned" >&6; }
14093if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
14094 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014095
14096fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014097
Christian Heimes39258d32021-04-17 11:36:35 +020014098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14099$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
14100if ${ac_cv_c_const+:} false; then :
14101 $as_echo_n "(cached) " >&6
14102else
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014104/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014105
Martin v. Löwis11437992002-04-12 09:54:03 +000014106int
Christian Heimes39258d32021-04-17 11:36:35 +020014107main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014108{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014109
Martin v. Löwis11437992002-04-12 09:54:03 +000014110#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014111 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014113 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115 char const *const *pcpcc;
14116 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 /* NEC SVR4.0.2 mips cc rejects this. */
14118 struct point {int x, y;};
14119 static struct point const zero = {0,0};
Christian Heimes39258d32021-04-17 11:36:35 +020014120 /* AIX XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 It does not let you subtract one const X* pointer from another in
14122 an arm of an if-expression whose if-part is not a constant
14123 expression */
14124 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127 ++pcpcc;
14128 ppc = (char**) pcpcc;
14129 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014130 { /* SCO 3.2v4 cc rejects this sort of thing. */
14131 char tx;
14132 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014134
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 }
14138 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14139 int x[] = {25, 17};
14140 const int *foo = &x[0];
14141 ++foo;
14142 }
14143 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14144 typedef const int *iptr;
14145 iptr p = 0;
14146 ++p;
14147 }
Christian Heimes39258d32021-04-17 11:36:35 +020014148 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014150 struct s { int j; const int *ap[3]; } bx;
14151 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014152 }
14153 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14154 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014158#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014159
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 ;
14161 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014162}
Martin v. Löwis11437992002-04-12 09:54:03 +000014163_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014164if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014165 ac_cv_c_const=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014168fi
Christian Heimes39258d32021-04-17 11:36:35 +020014169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014170fi
Christian Heimes39258d32021-04-17 11:36:35 +020014171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14172$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014173if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014174
Christian Heimes39258d32021-04-17 11:36:35 +020014175$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176
14177fi
14178
Michael W. Hudson54241132001-12-07 15:38:26 +000014179
Guido van Rossumda88dad1995-01-26 00:46:29 +000014180works=no
Christian Heimes39258d32021-04-17 11:36:35 +020014181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14182$as_echo_n "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014184/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014185
Martin v. Löwis11437992002-04-12 09:54:03 +000014186int
Christian Heimes39258d32021-04-17 11:36:35 +020014187main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014188{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014189signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014190 ;
14191 return 0;
14192}
14193_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014194if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014195 works=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014196else
Skip Montanaro6dead952003-09-25 14:50:04 +000014197
Christian Heimes39258d32021-04-17 11:36:35 +020014198$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014200
Guido van Rossum7f43da71994-08-01 12:15:30 +000014201fi
Christian Heimes39258d32021-04-17 11:36:35 +020014202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14204$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014205
Guido van Rossumda88dad1995-01-26 00:46:29 +000014206have_prototypes=no
Christian Heimes39258d32021-04-17 11:36:35 +020014207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14208$as_echo_n "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014210/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014211int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014212int
Christian Heimes39258d32021-04-17 11:36:35 +020014213main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014214{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014215return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 ;
14217 return 0;
14218}
14219_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014220if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014221
Christian Heimes39258d32021-04-17 11:36:35 +020014222$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014223
Matthias Kloseb159a552010-04-25 21:00:44 +000014224 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014225fi
Christian Heimes39258d32021-04-17 11:36:35 +020014226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14228$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014229
Guido van Rossumda88dad1995-01-26 00:46:29 +000014230works=no
Christian Heimes39258d32021-04-17 11:36:35 +020014231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14232$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014234/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014235
14236#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014237int foo(int x, ...) {
14238 va_list va;
14239 va_start(va, x);
14240 va_arg(va, int);
14241 va_arg(va, char *);
14242 va_arg(va, double);
14243 return 0;
14244}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014245
Martin v. Löwis11437992002-04-12 09:54:03 +000014246int
Christian Heimes39258d32021-04-17 11:36:35 +020014247main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014248{
Guido van Rossum90eea071996-08-30 20:58:57 +000014249return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 ;
14251 return 0;
14252}
14253_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014254if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014255
14256
Christian Heimes39258d32021-04-17 11:36:35 +020014257$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014258
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014259 works=yes
14260
Guido van Rossum627b2d71993-12-24 10:39:16 +000014261fi
Christian Heimes39258d32021-04-17 11:36:35 +020014262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14264$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014265
Martin v. Löwisd6320502004-08-12 13:45:08 +000014266# check for socketpair
Christian Heimes39258d32021-04-17 11:36:35 +020014267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14268$as_echo_n "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014270/* end confdefs.h. */
14271
14272#include <sys/types.h>
14273#include <sys/socket.h>
14274
14275int
Christian Heimes39258d32021-04-17 11:36:35 +020014276main ()
Martin v. Löwisd6320502004-08-12 13:45:08 +000014277{
14278void *x=socketpair
14279 ;
14280 return 0;
14281}
14282_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014284
Christian Heimes39258d32021-04-17 11:36:35 +020014285$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014286
Christian Heimes39258d32021-04-17 11:36:35 +020014287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14288$as_echo "yes" >&6; }
14289else
14290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14291$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014292
14293fi
Christian Heimes39258d32021-04-17 11:36:35 +020014294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014295
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014296# check if sockaddr has sa_len member
Christian Heimes39258d32021-04-17 11:36:35 +020014297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14298$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014300/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014301#include <sys/types.h>
14302#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014303int
Christian Heimes39258d32021-04-17 11:36:35 +020014304main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014305{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014306struct sockaddr x;
14307x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 ;
14309 return 0;
14310}
14311_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014312if ac_fn_c_try_compile "$LINENO"; then :
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14314$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014315
Christian Heimes39258d32021-04-17 11:36:35 +020014316$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014317
Christian Heimes39258d32021-04-17 11:36:35 +020014318else
14319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14320$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014321
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014322fi
Christian Heimes39258d32021-04-17 11:36:35 +020014323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014324
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014325# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
14327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Christian Heimes39258d32021-04-17 11:36:35 +020014329if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
Christian Heimes39258d32021-04-17 11:36:35 +020014331 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014332
Christian Heimes39258d32021-04-17 11:36:35 +020014333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14334$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014335 OLD_CFLAGS=$CFLAGS
14336 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014338/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014339
14340# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014341
Martin v. Löwis11437992002-04-12 09:54:03 +000014342int
Christian Heimes39258d32021-04-17 11:36:35 +020014343main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014344{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014345
14346 char *name;
14347 struct hostent *he, *res;
14348 char buffer[2048];
14349 int buflen = 2048;
14350 int h_errnop;
14351
14352 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
14354 ;
14355 return 0;
14356}
14357_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014359
Christian Heimes39258d32021-04-17 11:36:35 +020014360 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014361
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Christian Heimes39258d32021-04-17 11:36:35 +020014363$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014364
Christian Heimes39258d32021-04-17 11:36:35 +020014365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14366$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
Christian Heimes39258d32021-04-17 11:36:35 +020014368else
Skip Montanaro6dead952003-09-25 14:50:04 +000014369
Christian Heimes39258d32021-04-17 11:36:35 +020014370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14371$as_echo "no" >&6; }
14372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14373$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014375/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014376
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014377# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
Martin v. Löwis11437992002-04-12 09:54:03 +000014379int
Christian Heimes39258d32021-04-17 11:36:35 +020014380main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014381{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014382
14383 char *name;
14384 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014385 char buffer[2048];
14386 int buflen = 2048;
14387 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014388
Matthias Kloseb159a552010-04-25 21:00:44 +000014389 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
14391 ;
14392 return 0;
14393}
14394_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Christian Heimes39258d32021-04-17 11:36:35 +020014397 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Christian Heimes39258d32021-04-17 11:36:35 +020014400$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014401
Christian Heimes39258d32021-04-17 11:36:35 +020014402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14403$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014404
Christian Heimes39258d32021-04-17 11:36:35 +020014405else
Skip Montanaro6dead952003-09-25 14:50:04 +000014406
Christian Heimes39258d32021-04-17 11:36:35 +020014407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14408$as_echo "no" >&6; }
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14410$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14412/* end confdefs.h. */
14413
14414# include <netdb.h>
14415
14416int
Christian Heimes39258d32021-04-17 11:36:35 +020014417main ()
Matthias Kloseb159a552010-04-25 21:00:44 +000014418{
14419
14420 char *name;
14421 struct hostent *he;
14422 struct hostent_data data;
14423
14424 (void) gethostbyname_r(name, he, &data);
14425
14426 ;
14427 return 0;
14428}
14429_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014430if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000014431
Christian Heimes39258d32021-04-17 11:36:35 +020014432 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014433
14434
Christian Heimes39258d32021-04-17 11:36:35 +020014435$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014436
Christian Heimes39258d32021-04-17 11:36:35 +020014437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14438$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014439
Christian Heimes39258d32021-04-17 11:36:35 +020014440else
Matthias Kloseb159a552010-04-25 21:00:44 +000014441
Christian Heimes39258d32021-04-17 11:36:35 +020014442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14443$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014445fi
Christian Heimes39258d32021-04-17 11:36:35 +020014446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014448fi
Christian Heimes39258d32021-04-17 11:36:35 +020014449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014451fi
Christian Heimes39258d32021-04-17 11:36:35 +020014452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014453 CFLAGS=$OLD_CFLAGS
14454
Christian Heimes39258d32021-04-17 11:36:35 +020014455else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014456
Christian Heimes39258d32021-04-17 11:36:35 +020014457 for ac_func in gethostbyname
14458do :
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Christian Heimes39258d32021-04-17 11:36:35 +020014460if test "x$ac_cv_func_gethostbyname" = xyes; then :
14461 cat >>confdefs.h <<_ACEOF
14462#define HAVE_GETHOSTBYNAME 1
14463_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014465fi
Christian Heimes39258d32021-04-17 11:36:35 +020014466done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014467
Michael W. Hudson54241132001-12-07 15:38:26 +000014468
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014469fi
14470
Michael W. Hudson54241132001-12-07 15:38:26 +000014471
14472
14473
14474
14475
14476
Guido van Rossum627b2d71993-12-24 10:39:16 +000014477# checks for system services
14478# (none yet)
14479
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014480# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014481ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Christian Heimes39258d32021-04-17 11:36:35 +020014482if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014483
Christian Heimes39258d32021-04-17 11:36:35 +020014484else
14485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14486$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
14487if ${ac_cv_lib_ieee___fpu_control+:} false; then :
14488 $as_echo_n "(cached) " >&6
14489else
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014491LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495/* Override any GCC internal prototype to avoid an error.
14496 Use char because int might match the return type of a GCC
14497 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020014498#ifdef __cplusplus
14499extern "C"
14500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014501char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014502int
Christian Heimes39258d32021-04-17 11:36:35 +020014503main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 ;
14507 return 0;
14508}
14509_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014510if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ac_cv_lib_ieee___fpu_control=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014512else
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014514fi
Christian Heimes39258d32021-04-17 11:36:35 +020014515rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014517LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014518fi
Christian Heimes39258d32021-04-17 11:36:35 +020014519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14520$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
14521if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
14522 cat >>confdefs.h <<_ACEOF
14523#define HAVE_LIBIEEE 1
14524_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014525
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014526 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014527
Guido van Rossum627b2d71993-12-24 10:39:16 +000014528fi
14529
Michael W. Hudson54241132001-12-07 15:38:26 +000014530
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014531fi
14532
Michael W. Hudson54241132001-12-07 15:38:26 +000014533
Guido van Rossum7f43da71994-08-01 12:15:30 +000014534# check for --with-libm=...
14535
Guido van Rossum563e7081996-09-10 18:20:48 +000014536case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014537Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014538*) LIBM=-lm
14539esac
Christian Heimes39258d32021-04-17 11:36:35 +020014540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14541$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543# Check whether --with-libm was given.
Christian Heimes39258d32021-04-17 11:36:35 +020014544if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014546if test "$withval" = no
14547then LIBM=
Christian Heimes39258d32021-04-17 11:36:35 +020014548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14549$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014550elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014551then LIBM=$withval
Christian Heimes39258d32021-04-17 11:36:35 +020014552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14553$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014554else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014555fi
Christian Heimes39258d32021-04-17 11:36:35 +020014556else
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14558$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559fi
14560
Guido van Rossum7f43da71994-08-01 12:15:30 +000014561
14562# check for --with-libc=...
14563
Christian Heimes39258d32021-04-17 11:36:35 +020014564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14565$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567# Check whether --with-libc was given.
Christian Heimes39258d32021-04-17 11:36:35 +020014568if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014570if test "$withval" = no
14571then LIBC=
Christian Heimes39258d32021-04-17 11:36:35 +020014572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14573$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014574elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014575then LIBC=$withval
Christian Heimes39258d32021-04-17 11:36:35 +020014576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14577$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014578else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014579fi
Christian Heimes39258d32021-04-17 11:36:35 +020014580else
14581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14582$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583fi
14584
Guido van Rossum7f43da71994-08-01 12:15:30 +000014585
Stefan Krah1919b7e2012-03-21 18:25:23 +010014586# **************************************
14587# * Check for gcc x64 inline assembler *
14588# **************************************
14589
Christian Heimes39258d32021-04-17 11:36:35 +020014590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14591$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14593/* end confdefs.h. */
14594
14595int
Christian Heimes39258d32021-04-17 11:36:35 +020014596main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010014597{
14598
14599 __asm__ __volatile__ ("movq %rcx, %rax");
14600
14601 ;
14602 return 0;
14603}
14604_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014605if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014606 have_gcc_asm_for_x64=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014607else
Stefan Krah1919b7e2012-03-21 18:25:23 +010014608 have_gcc_asm_for_x64=no
14609fi
Christian Heimes39258d32021-04-17 11:36:35 +020014610rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014611 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14613$as_echo "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014614if test "$have_gcc_asm_for_x64" = yes
14615then
14616
Christian Heimes39258d32021-04-17 11:36:35 +020014617$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010014618
14619fi
14620
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014621# **************************************************
14622# * Check for various properties of floating point *
14623# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014624
Christian Heimes39258d32021-04-17 11:36:35 +020014625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14626$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14627if ${ax_cv_c_float_words_bigendian+:} false; then :
14628 $as_echo_n "(cached) " >&6
14629else
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014630
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014631
14632ax_cv_c_float_words_bigendian=unknown
14633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014634/* end confdefs.h. */
14635
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014636
14637double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14638
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014639
14640_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014641if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014642
14643
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014644if grep noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014645 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014646fi
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014647if grep seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014648 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14649 ax_cv_c_float_words_bigendian=no
14650 else
14651 ax_cv_c_float_words_bigendian=unknown
14652 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014653fi
14654
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014655
14656fi
Christian Heimes39258d32021-04-17 11:36:35 +020014657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014658fi
Christian Heimes39258d32021-04-17 11:36:35 +020014659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14660$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014661
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014662case $ax_cv_c_float_words_bigendian in
14663 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014664
Christian Heimes39258d32021-04-17 11:36:35 +020014665$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014666 ;;
14667 no)
14668 ;;
14669 *)
14670 as_fn_error $? "
14671
14672Unknown float word ordering. You need to manually preset
14673ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14674
14675 " "$LINENO" 5 ;;
14676esac
14677
14678
14679if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014680then
14681
Christian Heimes39258d32021-04-17 11:36:35 +020014682$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014683
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014684elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014685then
14686
Christian Heimes39258d32021-04-17 11:36:35 +020014687$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014688
14689else
14690 # Some ARM platforms use a mixed-endian representation for doubles.
14691 # While Python doesn't currently have full support for these platforms
14692 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14693 # conversions work.
14694 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14695 # or little, then it must be this?
14696
Christian Heimes39258d32021-04-17 11:36:35 +020014697$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014698
14699fi
14700
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014701# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014702# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014703# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014704# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014705# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014706# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014707
14708# This inline assembler syntax may also work for suncc and icc,
14709# so we try it on all platforms.
14710
Christian Heimes39258d32021-04-17 11:36:35 +020014711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14712$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 +000014713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014714/* end confdefs.h. */
14715
14716int
Christian Heimes39258d32021-04-17 11:36:35 +020014717main ()
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014718{
14719
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014720 unsigned short cw;
14721 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14722 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014723
14724 ;
14725 return 0;
14726}
14727_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014728if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014729 have_gcc_asm_for_x87=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014730else
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014732fi
Christian Heimes39258d32021-04-17 11:36:35 +020014733rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014734 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14736$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014737if test "$have_gcc_asm_for_x87" = yes
14738then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014739
Christian Heimes39258d32021-04-17 11:36:35 +020014740$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014741
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014743
Christian Heimes39258d32021-04-17 11:36:35 +020014744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14745$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 -040014746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14747/* end confdefs.h. */
14748
14749int
Christian Heimes39258d32021-04-17 11:36:35 +020014750main ()
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014751{
14752
14753 unsigned int fpcr;
14754 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14755 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14756
14757 ;
14758 return 0;
14759}
14760_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014761if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014762 have_gcc_asm_for_mc68881=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014763else
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014764 have_gcc_asm_for_mc68881=no
14765fi
Christian Heimes39258d32021-04-17 11:36:35 +020014766rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014767 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14769$as_echo "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014770if test "$have_gcc_asm_for_mc68881" = yes
14771then
14772
Christian Heimes39258d32021-04-17 11:36:35 +020014773$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014774
14775fi
14776
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014777# Detect whether system arithmetic is subject to x87-style double
14778# rounding issues. The result of this test has little meaning on non
14779# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14780# mode is round-to-nearest and double rounding issues are present, and
14781# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Christian Heimes39258d32021-04-17 11:36:35 +020014782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14783$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014784# $BASECFLAGS may affect the result
14785ac_save_cc="$CC"
14786CC="$CC $BASECFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +020014787if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014788 ac_cv_x87_double_rounding=no
Christian Heimes39258d32021-04-17 11:36:35 +020014789else
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014791/* end confdefs.h. */
14792
14793#include <stdlib.h>
14794#include <math.h>
14795int main() {
14796 volatile double x, y, z;
14797 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14798 x = 0.99999999999999989; /* 1-2**-53 */
14799 y = 1./x;
14800 if (y != 1.)
14801 exit(0);
14802 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14803 x = 1e16;
14804 y = 2.99999;
14805 z = x + y;
14806 if (z != 1e16+4.)
14807 exit(0);
14808 /* both tests show evidence of double rounding */
14809 exit(1);
14810}
14811
14812_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014813if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014814 ac_cv_x87_double_rounding=no
Christian Heimes39258d32021-04-17 11:36:35 +020014815else
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014820fi
14821
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014822CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +020014823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14824$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014825if test "$ac_cv_x87_double_rounding" = yes
14826then
14827
Christian Heimes39258d32021-04-17 11:36:35 +020014828$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014829
14830fi
14831
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014832# ************************************
14833# * Check for mathematical functions *
14834# ************************************
14835
14836LIBS_SAVE=$LIBS
14837LIBS="$LIBS $LIBM"
14838
Christian Heimes39258d32021-04-17 11:36:35 +020014839for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14840do :
14841 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14842ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14843if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14844 cat >>confdefs.h <<_ACEOF
14845#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14846_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014847
14848fi
Christian Heimes39258d32021-04-17 11:36:35 +020014849done
14850
14851for ac_func in hypot lgamma log1p log2 round tgamma
14852do :
14853 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14854ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14855if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14856 cat >>confdefs.h <<_ACEOF
14857#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14858_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014859
14860fi
Christian Heimes39258d32021-04-17 11:36:35 +020014861done
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014862
Christian Heimes39258d32021-04-17 11:36:35 +020014863ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14864"
14865if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014866 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014867else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014868 ac_have_decl=0
14869fi
Christian Heimes39258d32021-04-17 11:36:35 +020014870
14871cat >>confdefs.h <<_ACEOF
14872#define HAVE_DECL_ISINF $ac_have_decl
14873_ACEOF
14874ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14875"
14876if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014877 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014878else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014879 ac_have_decl=0
14880fi
Christian Heimes39258d32021-04-17 11:36:35 +020014881
14882cat >>confdefs.h <<_ACEOF
14883#define HAVE_DECL_ISNAN $ac_have_decl
14884_ACEOF
14885ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14886"
14887if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014888 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014889else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014890 ac_have_decl=0
14891fi
Christian Heimes39258d32021-04-17 11:36:35 +020014892
14893cat >>confdefs.h <<_ACEOF
14894#define HAVE_DECL_ISFINITE $ac_have_decl
14895_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014896
14897
Mark Dickinsona614f042009-11-28 12:48:43 +000014898# For multiprocessing module, check that sem_open
14899# actually works. For FreeBSD versions <= 7.2,
14900# the kernel module that provides POSIX semaphores
14901# isn't loaded by default, so an attempt to call
14902# sem_open results in a 'Signal 12' error.
Christian Heimes39258d32021-04-17 11:36:35 +020014903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14904$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
14905if ${ac_cv_posix_semaphores_enabled+:} false; then :
14906 $as_echo_n "(cached) " >&6
14907else
14908 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014909 ac_cv_posix_semaphores_enabled=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014910else
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014912/* end confdefs.h. */
14913
14914#include <unistd.h>
14915#include <fcntl.h>
14916#include <stdio.h>
14917#include <semaphore.h>
14918#include <sys/stat.h>
14919
14920int main(void) {
14921 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14922 if (a == SEM_FAILED) {
14923 perror("sem_open");
14924 return 1;
14925 }
14926 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014927 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014928 return 0;
14929}
14930
14931_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014932if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014933 ac_cv_posix_semaphores_enabled=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014934else
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014939fi
14940
14941
Mark Dickinsona614f042009-11-28 12:48:43 +000014942fi
14943
Christian Heimes39258d32021-04-17 11:36:35 +020014944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14945$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014946if test $ac_cv_posix_semaphores_enabled = no
14947then
14948
Christian Heimes39258d32021-04-17 11:36:35 +020014949$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014950
14951fi
14952
Mark Dickinson10683072009-04-18 21:18:19 +000014953# Multiprocessing check for broken sem_getvalue
Christian Heimes39258d32021-04-17 11:36:35 +020014954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14955$as_echo_n "checking for broken sem_getvalue... " >&6; }
14956if ${ac_cv_broken_sem_getvalue+:} false; then :
14957 $as_echo_n "(cached) " >&6
14958else
14959 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014960 ac_cv_broken_sem_getvalue=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014961else
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014963/* end confdefs.h. */
14964
14965#include <unistd.h>
14966#include <fcntl.h>
14967#include <stdio.h>
14968#include <semaphore.h>
14969#include <sys/stat.h>
14970
14971int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014972 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014973 int count;
14974 int res;
14975 if(a==SEM_FAILED){
14976 perror("sem_open");
14977 return 1;
14978
14979 }
14980 res = sem_getvalue(a, &count);
14981 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014982 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014983 return res==-1 ? 1 : 0;
14984}
14985
Mark Dickinson10683072009-04-18 21:18:19 +000014986_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014987if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014988 ac_cv_broken_sem_getvalue=no
Christian Heimes39258d32021-04-17 11:36:35 +020014989else
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014994fi
14995
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014997fi
14998
Christian Heimes39258d32021-04-17 11:36:35 +020014999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
15000$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015001if test $ac_cv_broken_sem_getvalue = yes
15002then
15003
Christian Heimes39258d32021-04-17 11:36:35 +020015004$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015005
15006fi
15007
Christian Heimes39258d32021-04-17 11:36:35 +020015008ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
15009"
15010if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015011 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015012else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015013 ac_have_decl=0
15014fi
Christian Heimes39258d32021-04-17 11:36:35 +020015015
15016cat >>confdefs.h <<_ACEOF
15017#define HAVE_DECL_RTLD_LAZY $ac_have_decl
15018_ACEOF
15019ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15020"
15021if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015022 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015023else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015024 ac_have_decl=0
15025fi
Christian Heimes39258d32021-04-17 11:36:35 +020015026
15027cat >>confdefs.h <<_ACEOF
15028#define HAVE_DECL_RTLD_NOW $ac_have_decl
15029_ACEOF
15030ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15031"
15032if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015033 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015034else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015035 ac_have_decl=0
15036fi
Christian Heimes39258d32021-04-17 11:36:35 +020015037
15038cat >>confdefs.h <<_ACEOF
15039#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15040_ACEOF
15041ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
15042"
15043if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015044 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015045else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015046 ac_have_decl=0
15047fi
Christian Heimes39258d32021-04-17 11:36:35 +020015048
15049cat >>confdefs.h <<_ACEOF
15050#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
15051_ACEOF
15052ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
15053"
15054if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015055 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015056else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015057 ac_have_decl=0
15058fi
Christian Heimes39258d32021-04-17 11:36:35 +020015059
15060cat >>confdefs.h <<_ACEOF
15061#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
15062_ACEOF
15063ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
15064"
15065if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015066 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015067else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015068 ac_have_decl=0
15069fi
Christian Heimes39258d32021-04-17 11:36:35 +020015070
15071cat >>confdefs.h <<_ACEOF
15072#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
15073_ACEOF
15074ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
15075"
15076if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015077 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015078else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015079 ac_have_decl=0
15080fi
Christian Heimes39258d32021-04-17 11:36:35 +020015081
15082cat >>confdefs.h <<_ACEOF
15083#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
15084_ACEOF
15085ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
15086"
15087if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
Michael Feltc5ae1692017-12-19 13:58:49 +010015088 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015089else
Michael Feltc5ae1692017-12-19 13:58:49 +010015090 ac_have_decl=0
15091fi
Christian Heimes39258d32021-04-17 11:36:35 +020015092
15093cat >>confdefs.h <<_ACEOF
15094#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
15095_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015096
15097
Mark Dickinsonbd792642009-03-18 20:06:12 +000015098# determine what size digit to use for Python's longs
Christian Heimes39258d32021-04-17 11:36:35 +020015099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15100$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015101# Check whether --enable-big-digits was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015102if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015103 enableval=$enable_big_digits; case $enable_big_digits in
15104yes)
15105 enable_big_digits=30 ;;
15106no)
15107 enable_big_digits=15 ;;
1510815|30)
15109 ;;
15110*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015111 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 +000015112esac
Christian Heimes39258d32021-04-17 11:36:35 +020015113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15114$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015115
Christian Heimes39258d32021-04-17 11:36:35 +020015116cat >>confdefs.h <<_ACEOF
15117#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15118_ACEOF
Mark Dickinsonbd792642009-03-18 20:06:12 +000015119
15120
Christian Heimes39258d32021-04-17 11:36:35 +020015121else
15122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15123$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015124fi
15125
15126
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127# check for wchar.h
Christian Heimes39258d32021-04-17 11:36:35 +020015128ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
15129if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015130
15131
Christian Heimes39258d32021-04-17 11:36:35 +020015132$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015133
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015134 wchar_h="yes"
15135
Christian Heimes39258d32021-04-17 11:36:35 +020015136else
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015138
15139fi
15140
Michael W. Hudson54241132001-12-07 15:38:26 +000015141
Christian Heimes39258d32021-04-17 11:36:35 +020015142
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015143# determine wchar_t size
15144if test "$wchar_h" = yes
15145then
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15149# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +020015150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15151$as_echo_n "checking size of wchar_t... " >&6; }
15152if ${ac_cv_sizeof_wchar_t+:} false; then :
15153 $as_echo_n "(cached) " >&6
15154else
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 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 +020015156"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015157
Christian Heimes39258d32021-04-17 11:36:35 +020015158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 if test "$ac_cv_type_wchar_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +020015160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015162as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015163See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164 else
15165 ac_cv_sizeof_wchar_t=0
15166 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015168
Martin v. Löwis11437992002-04-12 09:54:03 +000015169fi
Christian Heimes39258d32021-04-17 11:36:35 +020015170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15171$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172
15173
15174
Christian Heimes39258d32021-04-17 11:36:35 +020015175cat >>confdefs.h <<_ACEOF
15176#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
15177_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015178
Michael W. Hudson54241132001-12-07 15:38:26 +000015179
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015180fi
15181
Christian Heimes39258d32021-04-17 11:36:35 +020015182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15183$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015184have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015186/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015187
15188#include <tcl.h>
15189#if TCL_UTF_MAX != 6
15190# error "NOT UCS4_TCL"
15191#endif
15192int
Christian Heimes39258d32021-04-17 11:36:35 +020015193main ()
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015194{
15195
15196 ;
15197 return 0;
15198}
15199_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015201
15202
Christian Heimes39258d32021-04-17 11:36:35 +020015203$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015204
15205 have_ucs4_tcl=yes
15206
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015207fi
Christian Heimes39258d32021-04-17 11:36:35 +020015208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15210$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015211
Skip Montanaro6dead952003-09-25 14:50:04 +000015212# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015213if test "$wchar_h" = yes
15214then
15215 # check whether wchar_t is signed or not
Christian Heimes39258d32021-04-17 11:36:35 +020015216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15217$as_echo_n "checking whether wchar_t is signed... " >&6; }
15218 if ${ac_cv_wchar_t_signed+:} false; then :
15219 $as_echo_n "(cached) " >&6
15220else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015221
Christian Heimes39258d32021-04-17 11:36:35 +020015222 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015223 ac_cv_wchar_t_signed=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015224else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015226/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015227
15228 #include <wchar.h>
15229 int main()
15230 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015231 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015232 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015233 }
15234
15235_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015236if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015237 ac_cv_wchar_t_signed=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015238else
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15242 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015243fi
15244
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015245fi
15246
Christian Heimes39258d32021-04-17 11:36:35 +020015247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15248$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249fi
15250
Christian Heimes39258d32021-04-17 11:36:35 +020015251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15252$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015253# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015254if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015255 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015256then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015257
Christian Heimes39258d32021-04-17 11:36:35 +020015258$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
Christian Heimes39258d32021-04-17 11:36:35 +020015260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15261$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015262else
Christian Heimes39258d32021-04-17 11:36:35 +020015263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15264$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015265fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015266
Jakub Kulík9032cf52021-04-30 15:21:42 +020015267case $ac_sys_system/$ac_sys_release in
15268SunOS/*)
15269 if test -f /etc/os-release; then
15270 OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
15271 if test "x$OS_NAME" = "xOracle Solaris"; then
15272 # bpo-43667: In Oracle Solaris, the internal form of wchar_t in
15273 # non-Unicode locales is not Unicode and hence cannot be used directly.
15274 # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html
15275
15276$as_echo "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h
15277
15278 fi
15279 fi
15280 ;;
15281esac
15282
Guido van Rossumef2255b2000-03-10 22:30:29 +000015283# check for endianness
Christian Heimes39258d32021-04-17 11:36:35 +020015284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15285$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
15286if ${ac_cv_c_bigendian+:} false; then :
15287 $as_echo_n "(cached) " >&6
15288else
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 ac_cv_c_bigendian=unknown
15290 # See if we're dealing with a universal compiler.
15291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15292/* end confdefs.h. */
15293#ifndef __APPLE_CC__
15294 not a universal capable compiler
15295 #endif
15296 typedef int dummy;
15297
Skip Montanaro6dead952003-09-25 14:50:04 +000015298_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015299if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015300
15301 # Check for potential -arch flags. It is not universal unless
15302 # there are at least two -arch flags with different values.
15303 ac_arch=
15304 ac_prev=
15305 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15306 if test -n "$ac_prev"; then
15307 case $ac_word in
15308 i?86 | x86_64 | ppc | ppc64)
15309 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15310 ac_arch=$ac_word
15311 else
15312 ac_cv_c_bigendian=universal
15313 break
15314 fi
15315 ;;
15316 esac
15317 ac_prev=
15318 elif test "x$ac_word" = "x-arch"; then
15319 ac_prev=arch
15320 fi
15321 done
15322fi
Christian Heimes39258d32021-04-17 11:36:35 +020015323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015324 if test $ac_cv_c_bigendian = unknown; then
15325 # See if sys/param.h defines the BYTE_ORDER macro.
15326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015328#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015330
Martin v. Löwis11437992002-04-12 09:54:03 +000015331int
Christian Heimes39258d32021-04-17 11:36:35 +020015332main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015333{
Matthias Kloseb9621712010-04-24 17:59:49 +000015334#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15335 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15336 && LITTLE_ENDIAN)
15337 bogus endian macros
15338 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
15340 ;
15341 return 0;
15342}
15343_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015344if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015345 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015347/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015348#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015349 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015350
Martin v. Löwis11437992002-04-12 09:54:03 +000015351int
Christian Heimes39258d32021-04-17 11:36:35 +020015352main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015353{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015354#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 not big endian
15356 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
15358 ;
15359 return 0;
15360}
15361_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015362if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015363 ac_cv_c_bigendian=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015366fi
Christian Heimes39258d32021-04-17 11:36:35 +020015367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015368fi
Christian Heimes39258d32021-04-17 11:36:35 +020015369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 fi
15371 if test $ac_cv_c_bigendian = unknown; then
15372 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015374/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015375#include <limits.h>
15376
Martin v. Löwis11437992002-04-12 09:54:03 +000015377int
Christian Heimes39258d32021-04-17 11:36:35 +020015378main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015379{
Matthias Kloseb9621712010-04-24 17:59:49 +000015380#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15381 bogus endian macros
15382 #endif
15383
Martin v. Löwis11437992002-04-12 09:54:03 +000015384 ;
15385 return 0;
15386}
15387_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015388if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 # It does; now see whether it defined to _BIG_ENDIAN or not.
15390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15391/* end confdefs.h. */
15392#include <limits.h>
15393
15394int
Christian Heimes39258d32021-04-17 11:36:35 +020015395main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015396{
15397#ifndef _BIG_ENDIAN
15398 not big endian
15399 #endif
15400
15401 ;
15402 return 0;
15403}
15404_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 ac_cv_c_bigendian=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015409fi
Christian Heimes39258d32021-04-17 11:36:35 +020015410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015411fi
Christian Heimes39258d32021-04-17 11:36:35 +020015412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 fi
15414 if test $ac_cv_c_bigendian = unknown; then
15415 # Compile a test program.
Christian Heimes39258d32021-04-17 11:36:35 +020015416 if test "$cross_compiling" = yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 # Try to guess by grepping values from an object file.
15418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15419/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +020015420short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015421 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Christian Heimes39258d32021-04-17 11:36:35 +020015422 short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15424 int use_ascii (int i) {
15425 return ascii_mm[i] + ascii_ii[i];
15426 }
Christian Heimes39258d32021-04-17 11:36:35 +020015427 short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Christian Heimes39258d32021-04-17 11:36:35 +020015429 short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15431 int use_ebcdic (int i) {
15432 return ebcdic_mm[i] + ebcdic_ii[i];
15433 }
15434 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435
Matthias Kloseb9621712010-04-24 17:59:49 +000015436int
Christian Heimes39258d32021-04-17 11:36:35 +020015437main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015438{
15439return use_ascii (foo) == use_ebcdic (foo);
15440 ;
15441 return 0;
15442}
15443_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015444if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15446 ac_cv_c_bigendian=yes
15447 fi
15448 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15449 if test "$ac_cv_c_bigendian" = unknown; then
15450 ac_cv_c_bigendian=no
15451 else
15452 # finding both strings is unlikely to happen, but who knows?
15453 ac_cv_c_bigendian=unknown
15454 fi
15455 fi
15456fi
Christian Heimes39258d32021-04-17 11:36:35 +020015457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15458else
Matthias Kloseb9621712010-04-24 17:59:49 +000015459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015460/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015462int
Christian Heimes39258d32021-04-17 11:36:35 +020015463main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 /* Are we little or big endian? From Harbison&Steele. */
15467 union
15468 {
15469 long int l;
15470 char c[sizeof (long int)];
15471 } u;
15472 u.l = 1;
15473 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474
15475 ;
15476 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015477}
Martin v. Löwis11437992002-04-12 09:54:03 +000015478_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015479if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015480 ac_cv_c_bigendian=no
Christian Heimes39258d32021-04-17 11:36:35 +020015481else
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015489fi
Christian Heimes39258d32021-04-17 11:36:35 +020015490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15491$as_echo "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015492 case $ac_cv_c_bigendian in #(
15493 yes)
Christian Heimes39258d32021-04-17 11:36:35 +020015494 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015495;; #(
15496 no)
15497 ;; #(
15498 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015499
Christian Heimes39258d32021-04-17 11:36:35 +020015500$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502 ;; #(
15503 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015504 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015505 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015506 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015507
Michael W. Hudson54241132001-12-07 15:38:26 +000015508
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015509# ABI version string for Python extension modules. This appears between the
15510# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15511# from the following attributes which affect the ABI of this Python build (in
15512# this order):
15513#
15514# * The Python implementation (always 'cpython-' for us)
15515# * The major and minor version numbers
15516# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015517#
15518# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015519# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15520# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015521#
15522# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15523# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015524
Christian Heimes39258d32021-04-17 11:36:35 +020015525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15526$as_echo_n "checking ABIFLAGS... " >&6; }
15527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15528$as_echo "$ABIFLAGS" >&6; }
15529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15530$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015531SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Christian Heimes39258d32021-04-17 11:36:35 +020015532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15533$as_echo "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015534
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015535# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15536if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015537 # Similar to SOABI but remove "d" flag from ABIFLAGS
15538
15539 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15540
Christian Heimes39258d32021-04-17 11:36:35 +020015541cat >>confdefs.h <<_ACEOF
15542#define ALT_SOABI "${ALT_SOABI}"
15543_ACEOF
Victor Stinner5422e3c2019-04-26 01:40:00 +020015544
15545fi
15546
Victor Stinner52a327c2020-12-23 03:41:08 +010015547
Matti Picusa44ce6c2020-12-20 04:56:57 +020015548EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015549
Christian Heimes39258d32021-04-17 11:36:35 +020015550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15551$as_echo_n "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015552LDVERSION='$(VERSION)$(ABIFLAGS)'
Christian Heimes39258d32021-04-17 11:36:35 +020015553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15554$as_echo "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015555
E. M. Brayc994c8f2019-05-24 17:33:47 +020015556# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015557
E. M. Brayb1fc4172019-05-24 18:39:39 +020015558if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015559 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015560else
15561 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015562fi
15563
doko@python.org87421192013-01-26 11:39:31 +010015564
Victor Stinner51ae31e2020-06-09 15:32:43 +020015565
15566BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15567
15568
15569# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015570# /usr/$LIDIRNAME/python$VERSION
15571
15572PLATLIBDIR="lib"
Christian Heimes39258d32021-04-17 11:36:35 +020015573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15574$as_echo_n "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015575
15576# Check whether --with-platlibdir was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015577if test "${with_platlibdir+set}" = set; then :
Victor Stinner8510f432020-03-10 09:53:09 +010015578 withval=$with_platlibdir;
15579# ignore 3 options:
15580# --with-platlibdir
15581# --with-platlibdir=
15582# --without-platlibdir
15583if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15584then
Christian Heimes39258d32021-04-17 11:36:35 +020015585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15586$as_echo "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015587 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015588 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015589else
Christian Heimes39258d32021-04-17 11:36:35 +020015590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15591$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015592fi
Christian Heimes39258d32021-04-17 11:36:35 +020015593else
15594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15595$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015596fi
15597
15598
15599
15600
15601if test x$PLATFORM_TRIPLET = x; then
15602 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15603else
15604 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015605fi
doko@python.org87421192013-01-26 11:39:31 +010015606
15607
Victor Stinner75e59a92021-01-20 17:07:21 +010015608# Check for --with-wheel-pkg-dir=PATH
15609
15610WHEEL_PKG_DIR=""
Christian Heimes39258d32021-04-17 11:36:35 +020015611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15612$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015613
15614# Check whether --with-wheel-pkg-dir was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015615if test "${with_wheel_pkg_dir+set}" = set; then :
Victor Stinner75e59a92021-01-20 17:07:21 +010015616 withval=$with_wheel_pkg_dir;
15617if test -n "$withval"; then
Christian Heimes39258d32021-04-17 11:36:35 +020015618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15619$as_echo "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015620 WHEEL_PKG_DIR="$withval"
15621else
Christian Heimes39258d32021-04-17 11:36:35 +020015622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15623$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015624fi
Christian Heimes39258d32021-04-17 11:36:35 +020015625else
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15627$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015628fi
15629
15630
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015631# Check whether right shifting a negative integer extends the sign bit
15632# or fills with zeros (like the Cray J90, according to Tim Peters).
Christian Heimes39258d32021-04-17 11:36:35 +020015633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15634$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
15635if ${ac_cv_rshift_extends_sign+:} false; then :
15636 $as_echo_n "(cached) " >&6
15637else
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
Christian Heimes39258d32021-04-17 11:36:35 +020015639if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015640 ac_cv_rshift_extends_sign=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015641else
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015643/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015644
15645int main()
15646{
Joshua Root674fa0a2020-12-14 07:56:34 +110015647 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015648}
15649
Martin v. Löwis11437992002-04-12 09:54:03 +000015650_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015651if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015652 ac_cv_rshift_extends_sign=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015653else
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015658fi
15659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015660fi
15661
Christian Heimes39258d32021-04-17 11:36:35 +020015662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15663$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015664if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015665then
Martin v. Löwis11437992002-04-12 09:54:03 +000015666
Christian Heimes39258d32021-04-17 11:36:35 +020015667$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015668
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015669fi
15670
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015671# check for getc_unlocked and related locking functions
Christian Heimes39258d32021-04-17 11:36:35 +020015672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15673$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
15674if ${ac_cv_have_getc_unlocked+:} false; then :
15675 $as_echo_n "(cached) " >&6
15676else
Martin v. Löwis11437992002-04-12 09:54:03 +000015677
Matthias Kloseb9621712010-04-24 17:59:49 +000015678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015679/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015680#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015681int
Christian Heimes39258d32021-04-17 11:36:35 +020015682main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015683{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015684
15685 FILE *f = fopen("/dev/null", "r");
15686 flockfile(f);
15687 getc_unlocked(f);
15688 funlockfile(f);
15689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 ;
15691 return 0;
15692}
15693_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015694if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015695 ac_cv_have_getc_unlocked=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 ac_cv_have_getc_unlocked=no
15698fi
Christian Heimes39258d32021-04-17 11:36:35 +020015699rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015702
Christian Heimes39258d32021-04-17 11:36:35 +020015703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15704$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015705if test "$ac_cv_have_getc_unlocked" = yes
15706then
Martin v. Löwis11437992002-04-12 09:54:03 +000015707
Christian Heimes39258d32021-04-17 11:36:35 +020015708$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015709
15710fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015711
Roland Hiebere1f77692021-02-09 02:05:25 +010015712
15713# Check whether --with-readline was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015714if test "${with_readline+set}" = set; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015715 withval=$with_readline;
Christian Heimes39258d32021-04-17 11:36:35 +020015716else
Roland Hiebere1f77692021-02-09 02:05:25 +010015717 with_readline=yes
15718fi
15719
15720
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015721# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010015722py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000015723# save the value of LIBS so we don't actually link Python with readline
15724LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015725
Roland Hiebere1f77692021-02-09 02:05:25 +010015726if test "$with_readline" != no; then
15727 case "$with_readline" in
15728 editline|edit)
15729 LIBREADLINE=edit
15730
Christian Heimes39258d32021-04-17 11:36:35 +020015731$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010015732
15733 ;;
15734 yes|readline)
15735 LIBREADLINE=readline
15736 ;;
15737 *)
15738 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
15739 ;;
15740 esac
15741
15742 # On some systems we need to link readline to a termcap compatible
15743 # library. NOTE: Keep the precedence of listed libraries synchronised
15744 # with setup.py.
Christian Heimes39258d32021-04-17 11:36:35 +020015745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15746$as_echo_n "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015747 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
15748 if test -z "$py_libtermcap"; then
15749 READLINE_LIBS="-l$LIBREADLINE"
15750 else
15751 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
15752 fi
15753 LIBS="$READLINE_LIBS $LIBS_no_readline"
15754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015755/* end confdefs.h. */
15756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757/* Override any GCC internal prototype to avoid an error.
15758 Use char because int might match the return type of a GCC
15759 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015760#ifdef __cplusplus
15761extern "C"
15762#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015763char readline ();
15764int
Christian Heimes39258d32021-04-17 11:36:35 +020015765main ()
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015766{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015767return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015768 ;
15769 return 0;
15770}
15771_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015772if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015773 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015774fi
Christian Heimes39258d32021-04-17 11:36:35 +020015775rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015776 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010015777 if test $py_cv_lib_readline = yes; then
15778 break
15779 fi
15780 done
15781
15782 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
15783 #AC_SUBST([READLINE_LIBS])
15784 if test $py_cv_lib_readline = no; then
Christian Heimes39258d32021-04-17 11:36:35 +020015785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15786$as_echo "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015787 else
Christian Heimes39258d32021-04-17 11:36:35 +020015788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15789$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015790
Christian Heimes39258d32021-04-17 11:36:35 +020015791$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015792
Roland Hiebere1f77692021-02-09 02:05:25 +010015793 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015794fi
15795
Roland Hiebere1f77692021-02-09 02:05:25 +010015796if test "$py_cv_lib_readline" = yes; then
15797 # check for readline 2.2
Christian Heimes39258d32021-04-17 11:36:35 +020015798 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 +010015799#include <stdio.h> /* Must be first for Gnu Readline */
15800#ifdef WITH_EDITLINE
15801# include <editline/readline.h>
15802#else
15803# include <readline/readline.h>
15804#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015805
Christian Heimes39258d32021-04-17 11:36:35 +020015806"
15807if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015808
Christian Heimes39258d32021-04-17 11:36:35 +020015809$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015810
15811fi
Christian Heimes39258d32021-04-17 11:36:35 +020015812
15813 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 +010015814#include <stdio.h> /* Must be first for Gnu Readline */
15815#ifdef WITH_EDITLINE
15816# include <editline/readline.h>
15817#else
15818# include <readline/readline.h>
15819#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000015820
Christian Heimes39258d32021-04-17 11:36:35 +020015821"
15822if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015823
Christian Heimes39258d32021-04-17 11:36:35 +020015824$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015825
15826fi
Antoine Pitroud5131772009-10-26 19:22:14 +000015827
Christian Heimes39258d32021-04-17 11:36:35 +020015828
Roland Hiebere1f77692021-02-09 02:05:25 +010015829 # check for readline 4.0
Christian Heimes39258d32021-04-17 11:36:35 +020015830 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
15831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
15832$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
15833if eval \${$as_ac_Lib+:} false; then :
15834 $as_echo_n "(cached) " >&6
15835else
Martin v. Löwis11437992002-04-12 09:54:03 +000015836 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015837LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841/* Override any GCC internal prototype to avoid an error.
15842 Use char because int might match the return type of a GCC
15843 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015844#ifdef __cplusplus
15845extern "C"
15846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015847char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015848int
Christian Heimes39258d32021-04-17 11:36:35 +020015849main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015850{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 ;
15853 return 0;
15854}
15855_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015856if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015857 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015858else
Roland Hiebere1f77692021-02-09 02:05:25 +010015859 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015860fi
Christian Heimes39258d32021-04-17 11:36:35 +020015861rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015863LIBS=$ac_check_lib_save_LIBS
15864fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015865eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15867$as_echo "$ac_res" >&6; }
15868if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015869
Christian Heimes39258d32021-04-17 11:36:35 +020015870$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015871
Martin v. Löwis0daad592001-09-30 21:09:59 +000015872fi
15873
Michael W. Hudson54241132001-12-07 15:38:26 +000015874
Roland Hiebere1f77692021-02-09 02:05:25 +010015875 # also in 4.0
Christian Heimes39258d32021-04-17 11:36:35 +020015876 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
15877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
15878$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
15879if eval \${$as_ac_Lib+:} false; then :
15880 $as_echo_n "(cached) " >&6
15881else
Thomas Wouters89d996e2007-09-08 17:39:28 +000015882 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015883LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015885/* end confdefs.h. */
15886
15887/* Override any GCC internal prototype to avoid an error.
15888 Use char because int might match the return type of a GCC
15889 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015890#ifdef __cplusplus
15891extern "C"
15892#endif
Thomas Wouters89d996e2007-09-08 17:39:28 +000015893char rl_completion_display_matches_hook ();
15894int
Christian Heimes39258d32021-04-17 11:36:35 +020015895main ()
Thomas Wouters89d996e2007-09-08 17:39:28 +000015896{
15897return rl_completion_display_matches_hook ();
15898 ;
15899 return 0;
15900}
15901_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015902if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015903 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015904else
Roland Hiebere1f77692021-02-09 02:05:25 +010015905 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015906fi
Christian Heimes39258d32021-04-17 11:36:35 +020015907rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015909LIBS=$ac_check_lib_save_LIBS
15910fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015911eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15913$as_echo "$ac_res" >&6; }
15914if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015915
Christian Heimes39258d32021-04-17 11:36:35 +020015916$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015917
15918fi
15919
15920
Roland Hiebere1f77692021-02-09 02:05:25 +010015921 # also in 4.0, but not in editline
Christian Heimes39258d32021-04-17 11:36:35 +020015922 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
15923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
15924$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
15925if eval \${$as_ac_Lib+:} false; then :
15926 $as_echo_n "(cached) " >&6
15927else
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015928 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015929LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15931/* end confdefs.h. */
15932
15933/* Override any GCC internal prototype to avoid an error.
15934 Use char because int might match the return type of a GCC
15935 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015936#ifdef __cplusplus
15937extern "C"
15938#endif
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015939char rl_resize_terminal ();
15940int
Christian Heimes39258d32021-04-17 11:36:35 +020015941main ()
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015942{
15943return rl_resize_terminal ();
15944 ;
15945 return 0;
15946}
15947_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015948if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015949 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015950else
Roland Hiebere1f77692021-02-09 02:05:25 +010015951 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015952fi
Christian Heimes39258d32021-04-17 11:36:35 +020015953rm -f core conftest.err conftest.$ac_objext \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015954 conftest$ac_exeext conftest.$ac_ext
15955LIBS=$ac_check_lib_save_LIBS
15956fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015957eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15959$as_echo "$ac_res" >&6; }
15960if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015961
Christian Heimes39258d32021-04-17 11:36:35 +020015962$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015963
15964fi
15965
15966
Roland Hiebere1f77692021-02-09 02:05:25 +010015967 # check for readline 4.2
Christian Heimes39258d32021-04-17 11:36:35 +020015968 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
15969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
15970$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
15971if eval \${$as_ac_Lib+:} false; then :
15972 $as_echo_n "(cached) " >&6
15973else
Martin v. Löwis11437992002-04-12 09:54:03 +000015974 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015975LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015979/* Override any GCC internal prototype to avoid an error.
15980 Use char because int might match the return type of a GCC
15981 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015982#ifdef __cplusplus
15983extern "C"
15984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015985char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015986int
Christian Heimes39258d32021-04-17 11:36:35 +020015987main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015989return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 ;
15991 return 0;
15992}
15993_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015994if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015995 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015996else
Roland Hiebere1f77692021-02-09 02:05:25 +010015997 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000015998fi
Christian Heimes39258d32021-04-17 11:36:35 +020015999rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016001LIBS=$ac_check_lib_save_LIBS
16002fi
Roland Hiebere1f77692021-02-09 02:05:25 +010016003eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020016004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16005$as_echo "$ac_res" >&6; }
16006if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000016007
Christian Heimes39258d32021-04-17 11:36:35 +020016008$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000016009
Guido van Rossum353ae582001-07-10 16:45:32 +000016010fi
16011
Jack Jansendd19cf82001-12-06 22:36:17 +000016012
Roland Hiebere1f77692021-02-09 02:05:25 +010016013 # also in readline 4.2
Christian Heimes39258d32021-04-17 11:36:35 +020016014 ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010016015#include <stdio.h> /* Must be first for Gnu Readline */
16016#ifdef WITH_EDITLINE
16017# include <editline/readline.h>
16018#else
16019# include <readline/readline.h>
16020#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000016021
Christian Heimes39258d32021-04-17 11:36:35 +020016022"
16023if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016024
Christian Heimes39258d32021-04-17 11:36:35 +020016025$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016026
16027fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016028
Christian Heimes39258d32021-04-17 11:36:35 +020016029
16030 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
16031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
16032$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
16033if eval \${$as_ac_Lib+:} false; then :
16034 $as_echo_n "(cached) " >&6
16035else
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016036 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010016037LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16039/* end confdefs.h. */
16040
16041/* Override any GCC internal prototype to avoid an error.
16042 Use char because int might match the return type of a GCC
16043 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020016044#ifdef __cplusplus
16045extern "C"
16046#endif
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016047char append_history ();
16048int
Christian Heimes39258d32021-04-17 11:36:35 +020016049main ()
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016050{
16051return append_history ();
16052 ;
16053 return 0;
16054}
16055_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016056if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010016057 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020016058else
Roland Hiebere1f77692021-02-09 02:05:25 +010016059 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016060fi
Christian Heimes39258d32021-04-17 11:36:35 +020016061rm -f core conftest.err conftest.$ac_objext \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016062 conftest$ac_exeext conftest.$ac_ext
16063LIBS=$ac_check_lib_save_LIBS
16064fi
Roland Hiebere1f77692021-02-09 02:05:25 +010016065eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020016066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16067$as_echo "$ac_res" >&6; }
16068if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016069
Christian Heimes39258d32021-04-17 11:36:35 +020016070$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016071
16072fi
16073
Roland Hiebere1f77692021-02-09 02:05:25 +010016074fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016075
Martin v. Löwis82bca632006-02-10 20:49:30 +000016076# End of readline checks: restore LIBS
16077LIBS=$LIBS_no_readline
16078
Christian Heimes39258d32021-04-17 11:36:35 +020016079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
16080$as_echo_n "checking for broken nice()... " >&6; }
16081if ${ac_cv_broken_nice+:} false; then :
16082 $as_echo_n "(cached) " >&6
16083else
Martin v. Löwis11437992002-04-12 09:54:03 +000016084
Christian Heimes39258d32021-04-17 11:36:35 +020016085if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000016086 ac_cv_broken_nice=no
Christian Heimes39258d32021-04-17 11:36:35 +020016087else
Matthias Kloseb9621712010-04-24 17:59:49 +000016088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016089/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016090
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080016091#include <stdlib.h>
16092#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016093int main()
16094{
16095 int val1 = nice(1);
16096 if (val1 != -1 && val1 == nice(2))
16097 exit(0);
16098 exit(1);
16099}
16100
Martin v. Löwis11437992002-04-12 09:54:03 +000016101_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016102if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016103 ac_cv_broken_nice=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016104else
Matthias Kloseb9621712010-04-24 17:59:49 +000016105 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16108 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016109fi
16110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016111fi
16112
Christian Heimes39258d32021-04-17 11:36:35 +020016113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
16114$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016115if test "$ac_cv_broken_nice" = yes
16116then
Martin v. Löwis11437992002-04-12 09:54:03 +000016117
Christian Heimes39258d32021-04-17 11:36:35 +020016118$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016119
16120fi
16121
Christian Heimes39258d32021-04-17 11:36:35 +020016122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
16123$as_echo_n "checking for broken poll()... " >&6; }
16124if ${ac_cv_broken_poll+:} false; then :
16125 $as_echo_n "(cached) " >&6
16126else
16127 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016128 ac_cv_broken_poll=no
Christian Heimes39258d32021-04-17 11:36:35 +020016129else
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016131/* end confdefs.h. */
16132
16133#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016134#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016136int main()
16137{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016138 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016139 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016140
16141 close (42);
16142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016143 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016144 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016145 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016146 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016147 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016148 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016149 return 1;
16150}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016151
16152_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016153if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016154 ac_cv_broken_poll=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016155else
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16159 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016162fi
16163
Christian Heimes39258d32021-04-17 11:36:35 +020016164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16165$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016166if test "$ac_cv_broken_poll" = yes
16167then
16168
Christian Heimes39258d32021-04-17 11:36:35 +020016169$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016170
16171fi
16172
Martin v. Löwis1d459062005-03-14 21:23:33 +000016173# check tzset(3) exists and works like we expect it to
Christian Heimes39258d32021-04-17 11:36:35 +020016174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16175$as_echo_n "checking for working tzset()... " >&6; }
16176if ${ac_cv_working_tzset+:} false; then :
16177 $as_echo_n "(cached) " >&6
16178else
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016179
Christian Heimes39258d32021-04-17 11:36:35 +020016180if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016181 ac_cv_working_tzset=no
Christian Heimes39258d32021-04-17 11:36:35 +020016182else
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016184/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016185
16186#include <stdlib.h>
16187#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016188#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016189
16190#if HAVE_TZNAME
16191extern char *tzname[];
16192#endif
16193
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016194int main()
16195{
Brett Cannon18367812003-09-19 00:59:16 +000016196 /* Note that we need to ensure that not only does tzset(3)
16197 do 'something' with localtime, but it works as documented
16198 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016199 This includes making sure that tzname is set properly if
16200 tm->tm_zone does not exist since it is the alternative way
16201 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016202
16203 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016204 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016205 */
16206
Martin v. Löwis1d459062005-03-14 21:23:33 +000016207 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016208 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16209
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016210 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016211 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016212 if (localtime(&groundhogday)->tm_hour != 0)
16213 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016214#if HAVE_TZNAME
16215 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16216 if (strcmp(tzname[0], "UTC") ||
16217 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16218 exit(1);
16219#endif
Brett Cannon18367812003-09-19 00:59:16 +000016220
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016221 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016222 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016223 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016224 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016225#if HAVE_TZNAME
16226 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16227 exit(1);
16228#endif
Brett Cannon18367812003-09-19 00:59:16 +000016229
16230 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16231 tzset();
16232 if (localtime(&groundhogday)->tm_hour != 11)
16233 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016234#if HAVE_TZNAME
16235 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16236 exit(1);
16237#endif
16238
16239#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016240 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16241 exit(1);
16242 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16243 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016244#endif
Brett Cannon18367812003-09-19 00:59:16 +000016245
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016246 exit(0);
16247}
16248
16249_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016250if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016251 ac_cv_working_tzset=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016252else
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16256 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016257fi
16258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259fi
16260
Christian Heimes39258d32021-04-17 11:36:35 +020016261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16262$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016263if test "$ac_cv_working_tzset" = yes
16264then
16265
Christian Heimes39258d32021-04-17 11:36:35 +020016266$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016267
16268fi
16269
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016270# Look for subsecond timestamps in struct stat
Christian Heimes39258d32021-04-17 11:36:35 +020016271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16272$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
16273if ${ac_cv_stat_tv_nsec+:} false; then :
16274 $as_echo_n "(cached) " >&6
16275else
Matthias Kloseb9621712010-04-24 17:59:49 +000016276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016277/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016278#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016279int
Christian Heimes39258d32021-04-17 11:36:35 +020016280main ()
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016281{
16282
16283struct stat st;
16284st.st_mtim.tv_nsec = 1;
16285
16286 ;
16287 return 0;
16288}
16289_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016291 ac_cv_stat_tv_nsec=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016292else
Matthias Kloseb9621712010-04-24 17:59:49 +000016293 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016294fi
Christian Heimes39258d32021-04-17 11:36:35 +020016295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296fi
16297
Christian Heimes39258d32021-04-17 11:36:35 +020016298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16299$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016300if test "$ac_cv_stat_tv_nsec" = yes
16301then
16302
Christian Heimes39258d32021-04-17 11:36:35 +020016303$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016304
16305fi
16306
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016307# Look for BSD style subsecond timestamps in struct stat
Christian Heimes39258d32021-04-17 11:36:35 +020016308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16309$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
16310if ${ac_cv_stat_tv_nsec2+:} false; then :
16311 $as_echo_n "(cached) " >&6
16312else
Matthias Kloseb9621712010-04-24 17:59:49 +000016313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016314/* end confdefs.h. */
16315#include <sys/stat.h>
16316int
Christian Heimes39258d32021-04-17 11:36:35 +020016317main ()
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016318{
16319
16320struct stat st;
16321st.st_mtimespec.tv_nsec = 1;
16322
16323 ;
16324 return 0;
16325}
16326_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016328 ac_cv_stat_tv_nsec2=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016329else
Matthias Kloseb9621712010-04-24 17:59:49 +000016330 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016331fi
Christian Heimes39258d32021-04-17 11:36:35 +020016332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333fi
16334
Christian Heimes39258d32021-04-17 11:36:35 +020016335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16336$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016337if test "$ac_cv_stat_tv_nsec2" = yes
16338then
16339
Christian Heimes39258d32021-04-17 11:36:35 +020016340$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016341
16342fi
16343
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016344# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016345ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016346if test "$cross_compiling" = no; then
16347 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16348fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016349
Christian Heimes39258d32021-04-17 11:36:35 +020016350for ac_header in curses.h ncurses.h
16351do :
16352 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16353ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16354if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16355 cat >>confdefs.h <<_ACEOF
16356#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16357_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016358
16359fi
Pablo Galindocc128882021-03-01 16:47:53 +000016360
Christian Heimes39258d32021-04-17 11:36:35 +020016361done
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016362
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016363
16364# On Solaris, term.h requires curses.h
Christian Heimes39258d32021-04-17 11:36:35 +020016365for ac_header in term.h
16366do :
16367 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016368#ifdef HAVE_CURSES_H
16369#include <curses.h>
16370#endif
16371
16372"
Christian Heimes39258d32021-04-17 11:36:35 +020016373if test "x$ac_cv_header_term_h" = xyes; then :
16374 cat >>confdefs.h <<_ACEOF
16375#define HAVE_TERM_H 1
16376_ACEOF
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016377
16378fi
16379
Christian Heimes39258d32021-04-17 11:36:35 +020016380done
16381
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016382
Jack Jansen666b1e72001-10-31 12:11:48 +000016383# On HP/UX 11.0, mvwdelch is a block with a return statement
Christian Heimes39258d32021-04-17 11:36:35 +020016384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16385$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
16386if ${ac_cv_mvwdelch_is_expression+:} false; then :
16387 $as_echo_n "(cached) " >&6
16388else
Matthias Kloseb9621712010-04-24 17:59:49 +000016389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016390/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016391#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016392int
Christian Heimes39258d32021-04-17 11:36:35 +020016393main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016394{
Jack Jansen666b1e72001-10-31 12:11:48 +000016395
16396 int rtn;
16397 rtn = mvwdelch(0,0,0);
16398
Martin v. Löwis11437992002-04-12 09:54:03 +000016399 ;
16400 return 0;
16401}
16402_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016403if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016404 ac_cv_mvwdelch_is_expression=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016405else
Matthias Kloseb9621712010-04-24 17:59:49 +000016406 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016407fi
Christian Heimes39258d32021-04-17 11:36:35 +020016408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409fi
16410
Christian Heimes39258d32021-04-17 11:36:35 +020016411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16412$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016413
16414if test "$ac_cv_mvwdelch_is_expression" = yes
16415then
Martin v. Löwis11437992002-04-12 09:54:03 +000016416
Christian Heimes39258d32021-04-17 11:36:35 +020016417$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016418
16419fi
16420
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016421# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16422# structs since version 5.7. If the macro is defined as zero before including
16423# [n]curses.h, ncurses will expose fields of the structs regardless of the
16424# configuration.
Christian Heimes39258d32021-04-17 11:36:35 +020016425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16426$as_echo_n "checking whether WINDOW has _flags... " >&6; }
16427if ${ac_cv_window_has_flags+:} false; then :
16428 $as_echo_n "(cached) " >&6
16429else
Matthias Kloseb9621712010-04-24 17:59:49 +000016430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016431/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016432
16433 #define NCURSES_OPAQUE 0
16434 #include <curses.h>
16435
Martin v. Löwis11437992002-04-12 09:54:03 +000016436int
Christian Heimes39258d32021-04-17 11:36:35 +020016437main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016438{
Jack Jansen666b1e72001-10-31 12:11:48 +000016439
16440 WINDOW *w;
16441 w->_flags = 0;
16442
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 ;
16444 return 0;
16445}
16446_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016447if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016448 ac_cv_window_has_flags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016449else
Matthias Kloseb9621712010-04-24 17:59:49 +000016450 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016451fi
Christian Heimes39258d32021-04-17 11:36:35 +020016452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016453fi
16454
Christian Heimes39258d32021-04-17 11:36:35 +020016455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16456$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016457
Jack Jansen666b1e72001-10-31 12:11:48 +000016458
16459if test "$ac_cv_window_has_flags" = yes
16460then
Martin v. Löwis11437992002-04-12 09:54:03 +000016461
Christian Heimes39258d32021-04-17 11:36:35 +020016462$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016463
16464fi
16465
Christian Heimes39258d32021-04-17 11:36:35 +020016466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16467$as_echo_n "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16469/* end confdefs.h. */
16470#include <curses.h>
16471int
Christian Heimes39258d32021-04-17 11:36:35 +020016472main ()
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016473{
16474
16475#ifndef is_pad
16476void *x=is_pad
16477#endif
16478
16479 ;
16480 return 0;
16481}
16482_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016483if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016484
Christian Heimes39258d32021-04-17 11:36:35 +020016485$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016486
Christian Heimes39258d32021-04-17 11:36:35 +020016487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16488$as_echo "yes" >&6; }
16489else
16490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16491$as_echo "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016492
16493fi
Christian Heimes39258d32021-04-17 11:36:35 +020016494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016495
Christian Heimes39258d32021-04-17 11:36:35 +020016496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16497$as_echo_n "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016499/* end confdefs.h. */
16500#include <curses.h>
16501int
Christian Heimes39258d32021-04-17 11:36:35 +020016502main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016503{
16504void *x=is_term_resized
16505 ;
16506 return 0;
16507}
16508_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016510
Christian Heimes39258d32021-04-17 11:36:35 +020016511$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016512
Christian Heimes39258d32021-04-17 11:36:35 +020016513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16514$as_echo "yes" >&6; }
16515else
16516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16517$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016518
16519fi
Christian Heimes39258d32021-04-17 11:36:35 +020016520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521
Christian Heimes39258d32021-04-17 11:36:35 +020016522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16523$as_echo_n "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016525/* end confdefs.h. */
16526#include <curses.h>
16527int
Christian Heimes39258d32021-04-17 11:36:35 +020016528main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016529{
16530void *x=resize_term
16531 ;
16532 return 0;
16533}
16534_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016535if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016536
Christian Heimes39258d32021-04-17 11:36:35 +020016537$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016538
Christian Heimes39258d32021-04-17 11:36:35 +020016539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16540$as_echo "yes" >&6; }
16541else
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16543$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016544
16545fi
Christian Heimes39258d32021-04-17 11:36:35 +020016546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016547
Christian Heimes39258d32021-04-17 11:36:35 +020016548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16549$as_echo_n "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016551/* end confdefs.h. */
16552#include <curses.h>
16553int
Christian Heimes39258d32021-04-17 11:36:35 +020016554main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016555{
16556void *x=resizeterm
16557 ;
16558 return 0;
16559}
16560_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016561if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016562
Christian Heimes39258d32021-04-17 11:36:35 +020016563$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016564
Christian Heimes39258d32021-04-17 11:36:35 +020016565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16566$as_echo "yes" >&6; }
16567else
16568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16569$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016570
16571fi
Christian Heimes39258d32021-04-17 11:36:35 +020016572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016573
Christian Heimes39258d32021-04-17 11:36:35 +020016574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16575$as_echo_n "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16577/* end confdefs.h. */
16578#include <curses.h>
16579int
Christian Heimes39258d32021-04-17 11:36:35 +020016580main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016581{
16582
16583#ifndef immedok
16584void *x=immedok
16585#endif
16586
16587 ;
16588 return 0;
16589}
16590_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016591if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016592
Christian Heimes39258d32021-04-17 11:36:35 +020016593$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016594
Christian Heimes39258d32021-04-17 11:36:35 +020016595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16596$as_echo "yes" >&6; }
16597else
16598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16599$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016600
16601fi
Christian Heimes39258d32021-04-17 11:36:35 +020016602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016603
Christian Heimes39258d32021-04-17 11:36:35 +020016604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16605$as_echo_n "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16607/* end confdefs.h. */
16608#include <curses.h>
16609int
Christian Heimes39258d32021-04-17 11:36:35 +020016610main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016611{
16612
16613#ifndef syncok
16614void *x=syncok
16615#endif
16616
16617 ;
16618 return 0;
16619}
16620_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016621if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016622
Christian Heimes39258d32021-04-17 11:36:35 +020016623$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016624
Christian Heimes39258d32021-04-17 11:36:35 +020016625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16626$as_echo "yes" >&6; }
16627else
16628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16629$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016630
16631fi
Christian Heimes39258d32021-04-17 11:36:35 +020016632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016633
Christian Heimes39258d32021-04-17 11:36:35 +020016634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16635$as_echo_n "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16637/* end confdefs.h. */
16638#include <curses.h>
16639int
Christian Heimes39258d32021-04-17 11:36:35 +020016640main ()
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016641{
16642
16643#ifndef wchgat
16644void *x=wchgat
16645#endif
16646
16647 ;
16648 return 0;
16649}
16650_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016651if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016652
Christian Heimes39258d32021-04-17 11:36:35 +020016653$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016654
Christian Heimes39258d32021-04-17 11:36:35 +020016655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16656$as_echo "yes" >&6; }
16657else
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16659$as_echo "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016660
16661fi
Christian Heimes39258d32021-04-17 11:36:35 +020016662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016663
Christian Heimes39258d32021-04-17 11:36:35 +020016664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16665$as_echo_n "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16667/* end confdefs.h. */
16668#include <curses.h>
16669int
Christian Heimes39258d32021-04-17 11:36:35 +020016670main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016671{
16672
16673#ifndef filter
16674void *x=filter
16675#endif
16676
16677 ;
16678 return 0;
16679}
16680_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016681if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016682
Christian Heimes39258d32021-04-17 11:36:35 +020016683$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016684
Christian Heimes39258d32021-04-17 11:36:35 +020016685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16686$as_echo "yes" >&6; }
16687else
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16689$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016690
16691fi
Christian Heimes39258d32021-04-17 11:36:35 +020016692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016693
Christian Heimes39258d32021-04-17 11:36:35 +020016694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16695$as_echo_n "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16697/* end confdefs.h. */
16698#include <curses.h>
16699int
Christian Heimes39258d32021-04-17 11:36:35 +020016700main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016701{
16702
16703#ifndef has_key
16704void *x=has_key
16705#endif
16706
16707 ;
16708 return 0;
16709}
16710_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016711if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016712
Christian Heimes39258d32021-04-17 11:36:35 +020016713$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016714
Christian Heimes39258d32021-04-17 11:36:35 +020016715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16716$as_echo "yes" >&6; }
16717else
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16719$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016720
16721fi
Christian Heimes39258d32021-04-17 11:36:35 +020016722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016723
Christian Heimes39258d32021-04-17 11:36:35 +020016724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16725$as_echo_n "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16727/* end confdefs.h. */
16728#include <curses.h>
16729int
Christian Heimes39258d32021-04-17 11:36:35 +020016730main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016731{
16732
16733#ifndef typeahead
16734void *x=typeahead
16735#endif
16736
16737 ;
16738 return 0;
16739}
16740_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016741if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016742
Christian Heimes39258d32021-04-17 11:36:35 +020016743$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016744
Christian Heimes39258d32021-04-17 11:36:35 +020016745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16746$as_echo "yes" >&6; }
16747else
16748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16749$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016750
16751fi
Christian Heimes39258d32021-04-17 11:36:35 +020016752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016753
Christian Heimes39258d32021-04-17 11:36:35 +020016754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16755$as_echo_n "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16757/* end confdefs.h. */
16758#include <curses.h>
16759int
Christian Heimes39258d32021-04-17 11:36:35 +020016760main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016761{
16762
16763#ifndef use_env
16764void *x=use_env
16765#endif
16766
16767 ;
16768 return 0;
16769}
16770_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016771if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016772
Christian Heimes39258d32021-04-17 11:36:35 +020016773$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016774
Christian Heimes39258d32021-04-17 11:36:35 +020016775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16776$as_echo "yes" >&6; }
16777else
16778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16779$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016780
16781fi
Christian Heimes39258d32021-04-17 11:36:35 +020016782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016783# last curses configure check
16784CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785
Christian Heimes39258d32021-04-17 11:36:35 +020016786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16787$as_echo "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016788
16789if test "x$cross_compiling" = xyes; then
16790 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Christian Heimes39258d32021-04-17 11:36:35 +020016791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16792$as_echo_n "checking for /dev/ptmx... " >&6; }
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16794$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016795 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16796 fi
16797 if test "${ac_cv_file__dev_ptc+set}" != set; then
Christian Heimes39258d32021-04-17 11:36:35 +020016798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16799$as_echo_n "checking for /dev/ptc... " >&6; }
16800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16801$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016802 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16803 fi
16804fi
16805
Christian Heimes39258d32021-04-17 11:36:35 +020016806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16807$as_echo_n "checking for /dev/ptmx... " >&6; }
16808if ${ac_cv_file__dev_ptmx+:} false; then :
16809 $as_echo_n "(cached) " >&6
16810else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016811 test "$cross_compiling" = yes &&
16812 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16813if test -r "/dev/ptmx"; then
16814 ac_cv_file__dev_ptmx=yes
16815else
16816 ac_cv_file__dev_ptmx=no
16817fi
16818fi
Christian Heimes39258d32021-04-17 11:36:35 +020016819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16820$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16821if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016822
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016823fi
16824
16825if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016826
Christian Heimes39258d32021-04-17 11:36:35 +020016827$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016828
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016829fi
Christian Heimes39258d32021-04-17 11:36:35 +020016830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16831$as_echo_n "checking for /dev/ptc... " >&6; }
16832if ${ac_cv_file__dev_ptc+:} false; then :
16833 $as_echo_n "(cached) " >&6
16834else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016835 test "$cross_compiling" = yes &&
16836 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16837if test -r "/dev/ptc"; then
16838 ac_cv_file__dev_ptc=yes
16839else
16840 ac_cv_file__dev_ptc=no
16841fi
16842fi
Christian Heimes39258d32021-04-17 11:36:35 +020016843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16844$as_echo "$ac_cv_file__dev_ptc" >&6; }
16845if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016846
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016847fi
16848
16849if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016850
Christian Heimes39258d32021-04-17 11:36:35 +020016851$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016852
Neal Norwitz865400f2003-03-21 01:42:58 +000016853fi
16854
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016855if test $ac_sys_system = Darwin
16856then
16857 LIBS="$LIBS -framework CoreFoundation"
16858fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016859
Christian Heimes39258d32021-04-17 11:36:35 +020016860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16861$as_echo_n "checking for %zd printf() format support... " >&6; }
16862if ${ac_cv_have_size_t_format+:} false; then :
16863 $as_echo_n "(cached) " >&6
16864else
16865 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016866 ac_cv_have_size_t_format="cross -- assuming yes"
16867
Christian Heimes39258d32021-04-17 11:36:35 +020016868else
Matthias Kloseb9621712010-04-24 17:59:49 +000016869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016870/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016871
Thomas Wouters477c8d52006-05-27 19:21:47 +000016872#include <stdio.h>
16873#include <stddef.h>
16874#include <string.h>
16875
Christian Heimes2c181612007-12-17 20:04:13 +000016876#ifdef HAVE_SYS_TYPES_H
16877#include <sys/types.h>
16878#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016879
16880#ifdef HAVE_SSIZE_T
16881typedef ssize_t Py_ssize_t;
16882#elif SIZEOF_VOID_P == SIZEOF_LONG
16883typedef long Py_ssize_t;
16884#else
16885typedef int Py_ssize_t;
16886#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016887
Christian Heimes2c181612007-12-17 20:04:13 +000016888int main()
16889{
16890 char buffer[256];
16891
Thomas Wouters477c8d52006-05-27 19:21:47 +000016892 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16893 return 1;
16894
Thomas Wouters89f507f2006-12-13 04:49:30 +000016895 if (strcmp(buffer, "123"))
16896 return 1;
16897
16898 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16899 return 1;
16900
16901 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016902 return 1;
16903
16904 return 0;
16905}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016906
Thomas Wouters477c8d52006-05-27 19:21:47 +000016907_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016908if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016909 ac_cv_have_size_t_format=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016910else
Matthias Kloseb9621712010-04-24 17:59:49 +000016911 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016915fi
16916
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016917fi
Christian Heimes39258d32021-04-17 11:36:35 +020016918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16919$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016920if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016921
Christian Heimes39258d32021-04-17 11:36:35 +020016922$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016923
16924fi
16925
Matthias Kloseb9621712010-04-24 17:59:49 +000016926ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016927#ifdef HAVE_SYS_TYPES_H
16928#include <sys/types.h>
16929#endif
16930#ifdef HAVE_SYS_SOCKET_H
16931#include <sys/socket.h>
16932#endif
16933
Matthias Kloseb9621712010-04-24 17:59:49 +000016934"
Christian Heimes39258d32021-04-17 11:36:35 +020016935if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016936
Christian Heimes39258d32021-04-17 11:36:35 +020016937else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016938
Christian Heimes39258d32021-04-17 11:36:35 +020016939$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016940
16941fi
16942
Michael W. Hudson54241132001-12-07 15:38:26 +000016943
Christian Heimes39258d32021-04-17 11:36:35 +020016944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16945$as_echo_n "checking for broken mbstowcs... " >&6; }
16946if ${ac_cv_broken_mbstowcs+:} false; then :
16947 $as_echo_n "(cached) " >&6
16948else
16949 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016950 ac_cv_broken_mbstowcs=no
Christian Heimes39258d32021-04-17 11:36:35 +020016951else
Matthias Kloseb9621712010-04-24 17:59:49 +000016952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016953/* end confdefs.h. */
16954
Stefan Krah19c21392012-11-22 23:47:32 +010016955#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016956#include<stdlib.h>
16957int main() {
16958 size_t len = -1;
16959 const char *str = "text";
16960 len = mbstowcs(NULL, str, 0);
16961 return (len != 4);
16962}
16963
16964_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016965if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016966 ac_cv_broken_mbstowcs=no
Christian Heimes39258d32021-04-17 11:36:35 +020016967else
Matthias Kloseb9621712010-04-24 17:59:49 +000016968 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016972fi
16973
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016974fi
16975
Christian Heimes39258d32021-04-17 11:36:35 +020016976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16977$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016978if test "$ac_cv_broken_mbstowcs" = yes
16979then
16980
Christian Heimes39258d32021-04-17 11:36:35 +020016981$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016982
16983fi
16984
Antoine Pitroub52ec782009-01-25 16:34:23 +000016985# Check for --with-computed-gotos
Christian Heimes39258d32021-04-17 11:36:35 +020016986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16987$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016988
16989# Check whether --with-computed-gotos was given.
Christian Heimes39258d32021-04-17 11:36:35 +020016990if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016991 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016992if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016993then
16994
Christian Heimes39258d32021-04-17 11:36:35 +020016995$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016996
Christian Heimes39258d32021-04-17 11:36:35 +020016997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16998$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016999fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000017000if test "$withval" = no
17001then
17002
Christian Heimes39258d32021-04-17 11:36:35 +020017003$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000017004
Christian Heimes39258d32021-04-17 11:36:35 +020017005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17006$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000017007fi
17008
Christian Heimes39258d32021-04-17 11:36:35 +020017009else
17010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
17011$as_echo "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000017012fi
17013
Antoine Pitroub52ec782009-01-25 16:34:23 +000017014
Christian Heimes39258d32021-04-17 11:36:35 +020017015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
17016$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
17017if ${ac_cv_computed_gotos+:} false; then :
17018 $as_echo_n "(cached) " >&6
17019else
17020 if test "$cross_compiling" = yes; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010017021 if test "${with_computed_gotos+set}" = set; then
17022 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
17023 else
17024 ac_cv_computed_gotos=no
17025 fi
Christian Heimes39258d32021-04-17 11:36:35 +020017026else
Matthias Kloseb17289e2012-03-15 19:51:34 +010017027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17028/* end confdefs.h. */
17029
17030int main(int argc, char **argv)
17031{
17032 static void *targets[1] = { &&LABEL1 };
17033 goto LABEL2;
17034LABEL1:
17035 return 0;
17036LABEL2:
17037 goto *targets[0];
17038 return 1;
17039}
17040
17041_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017042if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010017043 ac_cv_computed_gotos=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017044else
Matthias Kloseb17289e2012-03-15 19:51:34 +010017045 ac_cv_computed_gotos=no
17046fi
17047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17048 conftest.$ac_objext conftest.beam conftest.$ac_ext
17049fi
17050
17051fi
17052
Christian Heimes39258d32021-04-17 11:36:35 +020017053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
17054$as_echo "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010017055case "$ac_cv_computed_gotos" in yes*)
17056
Christian Heimes39258d32021-04-17 11:36:35 +020017057$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010017058
17059esac
17060
Benjamin Petersond8d835b2010-10-15 23:14:46 +000017061case $ac_sys_system in
17062AIX*)
17063
Christian Heimes39258d32021-04-17 11:36:35 +020017064$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000017065 ;;
17066esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017067
Michael W. Hudson54241132001-12-07 15:38:26 +000017068
Mark Dickinsonb2153e92010-05-05 22:31:36 +000017069
17070
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017071for h in `(cd $srcdir;echo Python/thread_*.h)`
17072do
17073 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17074done
17075
Michael W. Hudson54241132001-12-07 15:38:26 +000017076
Ned Deily8d02f912020-06-25 10:46:44 -040017077SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Christian Heimes39258d32021-04-17 11:36:35 +020017078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
17079$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017080for dir in $SRCDIRS; do
17081 if test ! -d $dir; then
17082 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017083 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017084done
Christian Heimes39258d32021-04-17 11:36:35 +020017085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
17086$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000017087
Stefan Krah1919b7e2012-03-21 18:25:23 +010017088# Availability of -O2:
Christian Heimes39258d32021-04-17 11:36:35 +020017089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
17090$as_echo_n "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017091saved_cflags="$CFLAGS"
17092CFLAGS="-O2"
17093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17094/* end confdefs.h. */
17095
17096int
Christian Heimes39258d32021-04-17 11:36:35 +020017097main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010017098{
17099
17100
17101 ;
17102 return 0;
17103}
17104_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017105if ac_fn_c_try_compile "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017106 have_O2=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017107else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017108 have_O2=no
17109fi
Christian Heimes39258d32021-04-17 11:36:35 +020017110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
17112$as_echo "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017113CFLAGS="$saved_cflags"
17114
17115# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
17116# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Christian Heimes39258d32021-04-17 11:36:35 +020017117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
17118$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017119saved_cflags="$CFLAGS"
17120CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
17121if test "$have_O2" = no; then
17122 CFLAGS=""
17123fi
Christian Heimes39258d32021-04-17 11:36:35 +020017124if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017125 have_glibc_memmove_bug=undefined
Christian Heimes39258d32021-04-17 11:36:35 +020017126else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17128/* end confdefs.h. */
17129
17130#include <stdio.h>
17131#include <stdlib.h>
17132#include <string.h>
17133void foo(void *p, void *q) { memmove(p, q, 19); }
17134int main() {
17135 char a[32] = "123456789000000000";
17136 foo(&a[9], a);
17137 if (strcmp(a, "123456789123456789000000000") != 0)
17138 return 1;
17139 foo(a, &a[9]);
17140 if (strcmp(a, "123456789000000000") != 0)
17141 return 1;
17142 return 0;
17143}
17144
17145_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017146if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017147 have_glibc_memmove_bug=no
Christian Heimes39258d32021-04-17 11:36:35 +020017148else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017149 have_glibc_memmove_bug=yes
17150fi
17151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17152 conftest.$ac_objext conftest.beam conftest.$ac_ext
17153fi
17154
17155CFLAGS="$saved_cflags"
Christian Heimes39258d32021-04-17 11:36:35 +020017156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17157$as_echo "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017158if test "$have_glibc_memmove_bug" = yes; then
17159
Christian Heimes39258d32021-04-17 11:36:35 +020017160$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017161
17162fi
17163
17164if test "$have_gcc_asm_for_x87" = yes; then
17165 # Some versions of gcc miscompile inline asm:
17166 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17167 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17168 case $CC in
17169 *gcc*)
Christian Heimes39258d32021-04-17 11:36:35 +020017170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17171$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017172 saved_cflags="$CFLAGS"
17173 CFLAGS="-O2"
Christian Heimes39258d32021-04-17 11:36:35 +020017174 if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017175 have_ipa_pure_const_bug=undefined
Christian Heimes39258d32021-04-17 11:36:35 +020017176else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17178/* end confdefs.h. */
17179
17180 __attribute__((noinline)) int
17181 foo(int *p) {
17182 int r;
17183 asm ( "movl \$6, (%1)\n\t"
17184 "xorl %0, %0\n\t"
17185 : "=r" (r) : "r" (p) : "memory"
17186 );
17187 return r;
17188 }
17189 int main() {
17190 int p = 8;
17191 if ((foo(&p) ? : p) != 6)
17192 return 1;
17193 return 0;
17194 }
17195
17196_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017197if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017198 have_ipa_pure_const_bug=no
Christian Heimes39258d32021-04-17 11:36:35 +020017199else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017200 have_ipa_pure_const_bug=yes
17201fi
17202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17203 conftest.$ac_objext conftest.beam conftest.$ac_ext
17204fi
17205
17206 CFLAGS="$saved_cflags"
Christian Heimes39258d32021-04-17 11:36:35 +020017207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17208$as_echo "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017209 if test "$have_ipa_pure_const_bug" = yes; then
17210
Christian Heimes39258d32021-04-17 11:36:35 +020017211$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017212
17213 fi
17214 ;;
17215 esac
17216fi
17217
Victor Stinner4f5366e2015-01-09 02:13:19 +010017218# Check for stdatomic.h
Christian Heimes39258d32021-04-17 11:36:35 +020017219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17220$as_echo_n "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17222/* end confdefs.h. */
17223
17224
17225 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017226 atomic_int int_var;
17227 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017228 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017229 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17230 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17231 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017232 return 0;
17233 }
17234
17235
17236_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017237if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017238 have_stdatomic_h=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017239else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017240 have_stdatomic_h=no
17241fi
Christian Heimes39258d32021-04-17 11:36:35 +020017242rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017243 conftest$ac_exeext conftest.$ac_ext
17244
Christian Heimes39258d32021-04-17 11:36:35 +020017245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17246$as_echo "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017247
17248if test "$have_stdatomic_h" = yes; then
17249
Christian Heimes39258d32021-04-17 11:36:35 +020017250$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017251
17252fi
17253
Victor Stinner52a327c2020-12-23 03:41:08 +010017254# Check for GCC >= 4.7 and clang __atomic builtin functions
Christian Heimes39258d32021-04-17 11:36:35 +020017255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17256$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17258/* end confdefs.h. */
17259
17260
Victor Stinner52a327c2020-12-23 03:41:08 +010017261 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017262 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017263 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17264 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017265 return 0;
17266 }
17267
17268
17269_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017270if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017271 have_builtin_atomic=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017272else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017273 have_builtin_atomic=no
17274fi
Christian Heimes39258d32021-04-17 11:36:35 +020017275rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017276 conftest$ac_exeext conftest.$ac_ext
17277
Christian Heimes39258d32021-04-17 11:36:35 +020017278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17279$as_echo "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017280
17281if test "$have_builtin_atomic" = yes; then
17282
Christian Heimes39258d32021-04-17 11:36:35 +020017283$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017284
17285fi
17286
Ned Deily322f5ba2013-11-21 23:01:59 -080017287# ensurepip option
Christian Heimes39258d32021-04-17 11:36:35 +020017288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17289$as_echo_n "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017290
17291# Check whether --with-ensurepip was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017292if test "${with_ensurepip+set}" = set; then :
Ned Deily322f5ba2013-11-21 23:01:59 -080017293 withval=$with_ensurepip;
Christian Heimes39258d32021-04-17 11:36:35 +020017294else
Ned Deily322f5ba2013-11-21 23:01:59 -080017295 with_ensurepip=upgrade
17296fi
17297
17298case $with_ensurepip in #(
17299 yes|upgrade) :
17300 ENSUREPIP=upgrade ;; #(
17301 install) :
17302 ENSUREPIP=install ;; #(
17303 no) :
17304 ENSUREPIP=no ;; #(
17305 *) :
17306 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17307esac
Christian Heimes39258d32021-04-17 11:36:35 +020017308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17309$as_echo "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017310
17311
Victor Stinner35a97c02015-03-08 02:59:09 +010017312# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Christian Heimes39258d32021-04-17 11:36:35 +020017313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17314$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17316/* end confdefs.h. */
17317
17318
17319 #include <dirent.h>
17320
17321 int main() {
17322 struct dirent entry;
17323 return entry.d_type == DT_UNKNOWN;
17324 }
17325
17326
17327_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017328if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner35a97c02015-03-08 02:59:09 +010017329 have_dirent_d_type=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017330else
Victor Stinner35a97c02015-03-08 02:59:09 +010017331 have_dirent_d_type=no
17332fi
Christian Heimes39258d32021-04-17 11:36:35 +020017333rm -f core conftest.err conftest.$ac_objext \
Victor Stinner35a97c02015-03-08 02:59:09 +010017334 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17336$as_echo "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017337
17338if test "$have_dirent_d_type" = yes; then
17339
Christian Heimes39258d32021-04-17 11:36:35 +020017340$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010017341
17342fi
17343
Victor Stinner9eb57c52015-03-19 22:21:49 +010017344# check if the Linux getrandom() syscall is available
Christian Heimes39258d32021-04-17 11:36:35 +020017345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17346$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17348/* end confdefs.h. */
17349
17350
Victor Stinner1b80b242016-04-12 22:34:58 +020017351 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017352 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017353 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017354
17355 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017356 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017357 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017358 const int flags = GRND_NONBLOCK;
17359 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017360 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017361 return 0;
17362 }
17363
17364
17365_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017366if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010017367 have_getrandom_syscall=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017368else
Victor Stinner9eb57c52015-03-19 22:21:49 +010017369 have_getrandom_syscall=no
17370fi
Christian Heimes39258d32021-04-17 11:36:35 +020017371rm -f core conftest.err conftest.$ac_objext \
Victor Stinner9eb57c52015-03-19 22:21:49 +010017372 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17374$as_echo "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017375
17376if test "$have_getrandom_syscall" = yes; then
17377
Christian Heimes39258d32021-04-17 11:36:35 +020017378$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010017379
17380fi
17381
Victor Stinner3abf44e2015-09-18 15:38:37 +020017382# check if the getrandom() function is available
17383# the test was written for the Solaris function of <sys/random.h>
Christian Heimes39258d32021-04-17 11:36:35 +020017384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17385$as_echo_n "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17387/* end confdefs.h. */
17388
17389
17390 #include <sys/random.h>
17391
17392 int main() {
17393 char buffer[1];
17394 const size_t buflen = sizeof(buffer);
17395 const int flags = 0;
17396 /* ignore the result, Python checks for ENOSYS at runtime */
17397 (void)getrandom(buffer, buflen, flags);
17398 return 0;
17399 }
17400
17401
17402_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017403if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020017404 have_getrandom=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017405else
Victor Stinner3abf44e2015-09-18 15:38:37 +020017406 have_getrandom=no
17407fi
Christian Heimes39258d32021-04-17 11:36:35 +020017408rm -f core conftest.err conftest.$ac_objext \
Victor Stinner3abf44e2015-09-18 15:38:37 +020017409 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17411$as_echo "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017412
17413if test "$have_getrandom" = yes; then
17414
Christian Heimes39258d32021-04-17 11:36:35 +020017415$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020017416
17417fi
17418
Neil Schemenauer5741c452019-02-08 10:48:46 -080017419# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17420# shm_* may only be available if linking against librt
17421save_LIBS="$LIBS"
17422save_includes_default="$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020017423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17424$as_echo_n "checking for library containing shm_open... " >&6; }
17425if ${ac_cv_search_shm_open+:} false; then :
17426 $as_echo_n "(cached) " >&6
17427else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017428 ac_func_search_save_LIBS=$LIBS
17429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17430/* end confdefs.h. */
17431
17432/* Override any GCC internal prototype to avoid an error.
17433 Use char because int might match the return type of a GCC
17434 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020017435#ifdef __cplusplus
17436extern "C"
17437#endif
Neil Schemenauer5741c452019-02-08 10:48:46 -080017438char shm_open ();
17439int
Christian Heimes39258d32021-04-17 11:36:35 +020017440main ()
Neil Schemenauer5741c452019-02-08 10:48:46 -080017441{
17442return shm_open ();
17443 ;
17444 return 0;
17445}
17446_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017447for ac_lib in '' rt; do
Neil Schemenauer5741c452019-02-08 10:48:46 -080017448 if test -z "$ac_lib"; then
17449 ac_res="none required"
17450 else
17451 ac_res=-l$ac_lib
17452 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17453 fi
Christian Heimes39258d32021-04-17 11:36:35 +020017454 if ac_fn_c_try_link "$LINENO"; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017455 ac_cv_search_shm_open=$ac_res
17456fi
Christian Heimes39258d32021-04-17 11:36:35 +020017457rm -f core conftest.err conftest.$ac_objext \
Neil Schemenauer5741c452019-02-08 10:48:46 -080017458 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020017459 if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017460 break
17461fi
17462done
Christian Heimes39258d32021-04-17 11:36:35 +020017463if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017464
Christian Heimes39258d32021-04-17 11:36:35 +020017465else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017466 ac_cv_search_shm_open=no
17467fi
17468rm conftest.$ac_ext
17469LIBS=$ac_func_search_save_LIBS
17470fi
Christian Heimes39258d32021-04-17 11:36:35 +020017471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17472$as_echo "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080017473ac_res=$ac_cv_search_shm_open
Christian Heimes39258d32021-04-17 11:36:35 +020017474if test "$ac_res" != no; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017475 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17476
17477fi
17478
17479if test "$ac_cv_search_shm_open" = "-lrt"; then
17480
Christian Heimes39258d32021-04-17 11:36:35 +020017481$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080017482
17483fi
Christian Heimes39258d32021-04-17 11:36:35 +020017484for ac_header in sys/mman.h
17485do :
17486 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17487if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17488 cat >>confdefs.h <<_ACEOF
17489#define HAVE_SYS_MMAN_H 1
17490_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017491
17492fi
17493
Christian Heimes39258d32021-04-17 11:36:35 +020017494done
17495
Neil Schemenauer5741c452019-02-08 10:48:46 -080017496# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17497ac_includes_default="\
17498${ac_includes_default}
17499#ifndef __cplusplus
17500# ifdef HAVE_SYS_MMAN_H
17501# include <sys/mman.h>
17502# endif
17503#endif
17504"
Christian Heimes39258d32021-04-17 11:36:35 +020017505for ac_func in shm_open shm_unlink
17506do :
17507 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17508ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17509if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17510 cat >>confdefs.h <<_ACEOF
17511#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17512_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017513
17514fi
Christian Heimes39258d32021-04-17 11:36:35 +020017515done
Neil Schemenauer5741c452019-02-08 10:48:46 -080017516
17517# we don't want to link with librt always, restore LIBS
17518LIBS="$save_LIBS"
17519ac_includes_default="$save_includes_default"
17520
Christian Heimesff5be6e2018-01-20 13:19:21 +010017521# Check for usable OpenSSL
17522
17523 found=false
17524
17525# Check whether --with-openssl was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017526if test "${with_openssl+set}" = set; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017527 withval=$with_openssl;
17528 case "$withval" in
17529 "" | y | ye | yes | n | no)
17530 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17531 ;;
17532 *) ssldirs="$withval"
17533 ;;
17534 esac
17535
Christian Heimes39258d32021-04-17 11:36:35 +020017536else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017537
17538 # if pkg-config is installed and openssl has installed a .pc file,
17539 # then use that information and don't search ssldirs
17540 if test -n "$ac_tool_prefix"; then
17541 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17542set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020017543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17544$as_echo_n "checking for $ac_word... " >&6; }
17545if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17546 $as_echo_n "(cached) " >&6
17547else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017548 if test -n "$PKG_CONFIG"; then
17549 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17550else
17551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17552for as_dir in $PATH
17553do
17554 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020017555 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017556 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020017557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017558 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Christian Heimes39258d32021-04-17 11:36:35 +020017559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017560 break 2
17561 fi
17562done
17563 done
17564IFS=$as_save_IFS
17565
17566fi
17567fi
17568PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17569if test -n "$PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17571$as_echo "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017572else
Christian Heimes39258d32021-04-17 11:36:35 +020017573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17574$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017575fi
17576
17577
17578fi
17579if test -z "$ac_cv_prog_PKG_CONFIG"; then
17580 ac_ct_PKG_CONFIG=$PKG_CONFIG
17581 # Extract the first word of "pkg-config", so it can be a program name with args.
17582set dummy pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020017583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17584$as_echo_n "checking for $ac_word... " >&6; }
17585if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17586 $as_echo_n "(cached) " >&6
17587else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017588 if test -n "$ac_ct_PKG_CONFIG"; then
17589 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17590else
17591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17592for as_dir in $PATH
17593do
17594 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020017595 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017596 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020017597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017598 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Christian Heimes39258d32021-04-17 11:36:35 +020017599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017600 break 2
17601 fi
17602done
17603 done
17604IFS=$as_save_IFS
17605
17606fi
17607fi
17608ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17609if test -n "$ac_ct_PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17611$as_echo "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017612else
Christian Heimes39258d32021-04-17 11:36:35 +020017613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17614$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017615fi
17616
17617 if test "x$ac_ct_PKG_CONFIG" = x; then
17618 PKG_CONFIG=""
17619 else
17620 case $cross_compiling:$ac_tool_warned in
17621yes:)
Christian Heimes39258d32021-04-17 11:36:35 +020017622{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17623$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010017624ac_tool_warned=yes ;;
17625esac
17626 PKG_CONFIG=$ac_ct_PKG_CONFIG
17627 fi
17628else
17629 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17630fi
17631
17632 if test x"$PKG_CONFIG" != x""; then
17633 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17634 if test $? = 0; then
17635 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17636 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17637 found=true
17638 fi
17639 fi
17640
17641 # no such luck; use some default ssldirs
17642 if ! $found; then
17643 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17644 fi
17645
17646
17647fi
17648
17649
17650
17651 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17652 # an 'openssl' subdirectory
17653
17654 if ! $found; then
17655 OPENSSL_INCLUDES=
17656 for ssldir in $ssldirs; do
Christian Heimes39258d32021-04-17 11:36:35 +020017657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17658$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017659 if test -f "$ssldir/include/openssl/ssl.h"; then
17660 OPENSSL_INCLUDES="-I$ssldir/include"
17661 OPENSSL_LDFLAGS="-L$ssldir/lib"
17662 OPENSSL_LIBS="-lssl -lcrypto"
17663 found=true
Christian Heimes39258d32021-04-17 11:36:35 +020017664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17665$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017666 break
17667 else
Christian Heimes39258d32021-04-17 11:36:35 +020017668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17669$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017670 fi
17671 done
17672
17673 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17674 # it will just work!
17675 fi
17676
17677 # try the preprocessor and linker with our new flags,
17678 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17679
Christian Heimes39258d32021-04-17 11:36:35 +020017680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17681$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017682 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17683 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17684
17685 save_LIBS="$LIBS"
17686 save_LDFLAGS="$LDFLAGS"
17687 save_CPPFLAGS="$CPPFLAGS"
17688 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17689 LIBS="$OPENSSL_LIBS $LIBS"
17690 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17692/* end confdefs.h. */
17693#include <openssl/ssl.h>
17694int
Christian Heimes39258d32021-04-17 11:36:35 +020017695main ()
Christian Heimesff5be6e2018-01-20 13:19:21 +010017696{
17697SSL_new(NULL)
17698 ;
17699 return 0;
17700}
17701_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017702if ac_fn_c_try_link "$LINENO"; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017703
Christian Heimes39258d32021-04-17 11:36:35 +020017704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17705$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017706 have_openssl=yes
17707
Christian Heimes39258d32021-04-17 11:36:35 +020017708else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017709
Christian Heimes39258d32021-04-17 11:36:35 +020017710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17711$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017712 have_openssl=no
17713
17714fi
Christian Heimes39258d32021-04-17 11:36:35 +020017715rm -f core conftest.err conftest.$ac_objext \
Christian Heimesff5be6e2018-01-20 13:19:21 +010017716 conftest$ac_exeext conftest.$ac_ext
17717 CPPFLAGS="$save_CPPFLAGS"
17718 LDFLAGS="$save_LDFLAGS"
17719 LIBS="$save_LIBS"
17720
17721
17722
17723
17724
17725
Christian Heimes32eba612021-03-19 10:29:25 +010017726# rpath to libssl and libcrypto
Christian Heimes39258d32021-04-17 11:36:35 +020017727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
17728$as_echo_n "checking for --with-openssl-rpath... " >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010017729
17730# Check whether --with-openssl-rpath was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017731if test "${with_openssl_rpath+set}" = set; then :
Christian Heimes32eba612021-03-19 10:29:25 +010017732 withval=$with_openssl_rpath;
Christian Heimes39258d32021-04-17 11:36:35 +020017733else
Christian Heimes32eba612021-03-19 10:29:25 +010017734 with_openssl_rpath=no
17735
17736fi
17737
17738case $with_openssl_rpath in #(
17739 auto|yes) :
17740 OPENSSL_RPATH=auto ;; #(
17741 no) :
17742 OPENSSL_RPATH= ;; #(
17743 *) :
Christian Heimes39258d32021-04-17 11:36:35 +020017744 if test -d "$with_openssl_rpath"; then :
Christian Heimes32eba612021-03-19 10:29:25 +010017745 OPENSSL_RPATH="$with_openssl_rpath"
Christian Heimes39258d32021-04-17 11:36:35 +020017746else
Christian Heimes32eba612021-03-19 10:29:25 +010017747 as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
17748fi
17749
17750 ;;
17751esac
Christian Heimes39258d32021-04-17 11:36:35 +020017752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5
17753$as_echo "$OPENSSL_RPATH" >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010017754
17755
Christian Heimes892d66e2018-01-29 14:10:18 +010017756# ssl module default cipher suite string
17757
17758
17759
Christian Heimes39258d32021-04-17 11:36:35 +020017760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17761$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017762
17763# Check whether --with-ssl-default-suites was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017764if test "${with_ssl_default_suites+set}" = set; then :
Christian Heimes892d66e2018-01-29 14:10:18 +010017765 withval=$with_ssl_default_suites;
Christian Heimes39258d32021-04-17 11:36:35 +020017766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17767$as_echo "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017768case "$withval" in
17769 python)
Christian Heimes39258d32021-04-17 11:36:35 +020017770 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017771
17772 ;;
17773 openssl)
Christian Heimes39258d32021-04-17 11:36:35 +020017774 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017775
17776 ;;
17777 *)
Christian Heimes39258d32021-04-17 11:36:35 +020017778 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017779
Christian Heimes39258d32021-04-17 11:36:35 +020017780 cat >>confdefs.h <<_ACEOF
17781#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17782_ACEOF
Christian Heimes892d66e2018-01-29 14:10:18 +010017783
17784 ;;
17785esac
17786
Christian Heimes39258d32021-04-17 11:36:35 +020017787else
Christian Heimes892d66e2018-01-29 14:10:18 +010017788
Christian Heimes39258d32021-04-17 11:36:35 +020017789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17790$as_echo "python" >&6; }
17791$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017792
17793
17794fi
17795
17796
Christian Heimes9b60e552020-05-15 23:54:53 +020017797# builtin hash modules
17798default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17799
Christian Heimes39258d32021-04-17 11:36:35 +020017800$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020017801
Christian Heimes39258d32021-04-17 11:36:35 +020017802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17803$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020017804
17805# Check whether --with-builtin-hashlib-hashes was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017806if test "${with_builtin_hashlib_hashes+set}" = set; then :
Christian Heimes9b60e552020-05-15 23:54:53 +020017807 withval=$with_builtin_hashlib_hashes;
17808case "$withval" in
17809 yes)
17810 withval=$default_hashlib_hashes
17811 ;;
17812 no)
17813 withval=""
17814 ;;
17815esac
Christian Heimes39258d32021-04-17 11:36:35 +020017816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17817$as_echo "$withval" >&6; }
17818cat >>confdefs.h <<_ACEOF
17819#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17820_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017821
17822
Christian Heimes39258d32021-04-17 11:36:35 +020017823else
Christian Heimes9b60e552020-05-15 23:54:53 +020017824
Christian Heimes39258d32021-04-17 11:36:35 +020017825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17826$as_echo "$default_hashlib_hashes" >&6; };
17827cat >>confdefs.h <<_ACEOF
17828#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17829_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017830
17831
17832fi
17833
17834
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017835# --with-experimental-isolated-subinterpreters
17836
Christian Heimes39258d32021-04-17 11:36:35 +020017837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17838$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017839
17840# Check whether --with-experimental-isolated-subinterpreters was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017841if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017842 withval=$with_experimental_isolated_subinterpreters;
17843if test "$withval" != no
17844then
Christian Heimes39258d32021-04-17 11:36:35 +020017845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17846$as_echo "yes" >&6; };
17847 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017848
17849else
Christian Heimes39258d32021-04-17 11:36:35 +020017850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17851$as_echo "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017852fi
Christian Heimes39258d32021-04-17 11:36:35 +020017853else
17854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17855$as_echo "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017856fi
17857
17858
Victor Stinner801bb0b2021-02-17 11:14:42 +010017859# --with-static-libpython
17860STATIC_LIBPYTHON=1
Christian Heimes39258d32021-04-17 11:36:35 +020017861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
17862$as_echo_n "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017863
17864# Check whether --with-static-libpython was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017865if test "${with_static_libpython+set}" = set; then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010017866 withval=$with_static_libpython;
17867if test "$withval" = no
17868then
Christian Heimes39258d32021-04-17 11:36:35 +020017869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17870$as_echo "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017871 STATIC_LIBPYTHON=0
17872else
Christian Heimes39258d32021-04-17 11:36:35 +020017873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17874$as_echo "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017875fi
Christian Heimes39258d32021-04-17 11:36:35 +020017876else
17877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17878$as_echo "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017879fi
17880
17881LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050017882if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010017883 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
17884 if test "$STATIC_LIBPYTHON" = 1; then
17885 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17886 fi
17887else
17888 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17889fi
17890
17891
17892
pxinwr277ce302020-12-30 20:50:39 +080017893# Check whether to disable test modules. Once set, setup.py will not build
17894# test extension modules and "make install" will not install test suites.
Christian Heimes39258d32021-04-17 11:36:35 +020017895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17896$as_echo_n "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017897# Check whether --enable-test-modules was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017898if test "${enable_test_modules+set}" = set; then :
pxinwr277ce302020-12-30 20:50:39 +080017899 enableval=$enable_test_modules;
17900fi
17901
17902if test "$enable_test_modules" = no; then
17903 TEST_MODULES=no
Christian Heimes39258d32021-04-17 11:36:35 +020017904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17905$as_echo "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017906else
17907 TEST_MODULES=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17909$as_echo "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017910fi
17911
17912
Christian Heimes892d66e2018-01-29 14:10:18 +010017913
Guido van Rossum627b2d71993-12-24 10:39:16 +000017914# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017915ac_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 +000017916
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017917ac_config_files="$ac_config_files Modules/ld_so_aix"
17918
Martin v. Löwis11437992002-04-12 09:54:03 +000017919cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017920# This file is a shell script that caches the results of configure
17921# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017922# scripts and configure runs, see configure's option --config-cache.
17923# It is not useful on other systems. If it contains results you don't
17924# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017925#
Martin v. Löwis11437992002-04-12 09:54:03 +000017926# config.status only pays attention to the cache file if you give it
17927# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017928#
Skip Montanaro6dead952003-09-25 14:50:04 +000017929# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017930# loading this file, other *unset* `ac_cv_foo' will be assigned the
17931# following values.
17932
17933_ACEOF
17934
Guido van Rossumf78abae1997-01-21 22:02:36 +000017935# The following way of writing the cache mishandles newlines in values,
17936# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017938# Ultrix sh set writes to stderr and can't be redirected directly,
17939# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017940(
17941 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17942 eval ac_val=\$$ac_var
17943 case $ac_val in #(
17944 *${as_nl}*)
17945 case $ac_var in #(
Christian Heimes39258d32021-04-17 11:36:35 +020017946 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17947$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948 esac
17949 case $ac_var in #(
17950 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017951 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17952 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017953 esac ;;
17954 esac
17955 done
17956
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17959 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017960 # `set' does not quote correctly, so add quotes: double-quote
17961 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017963 "s/'/'\\\\''/g;
17964 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 *)
17967 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017968 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970 esac |
17971 sort
17972) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017973 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017974 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017975 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976 :clear
Christian Heimes39258d32021-04-17 11:36:35 +020017977 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000017978 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17980 :end' >>confcache
17981if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17982 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017983 if test "x$cache_file" != "x/dev/null"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017984 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17985$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017986 if test ! -f "$cache_file" || test -h "$cache_file"; then
17987 cat confcache >"$cache_file"
17988 else
17989 case $cache_file in #(
17990 */* | ?:*)
17991 mv -f confcache "$cache_file"$$ &&
17992 mv -f "$cache_file"$$ "$cache_file" ;; #(
17993 *)
17994 mv -f confcache "$cache_file" ;;
17995 esac
17996 fi
17997 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017998 else
Christian Heimes39258d32021-04-17 11:36:35 +020017999 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18000$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018001 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018002fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018003rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018004
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018005test "x$prefix" = xNONE && prefix=$ac_default_prefix
18006# Let make expand exec_prefix.
18007test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018008
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018009DEFS=-DHAVE_CONFIG_H
18010
Skip Montanaro6dead952003-09-25 14:50:04 +000018011ac_libobjs=
18012ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018013U=
Skip Montanaro6dead952003-09-25 14:50:04 +000018014for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18015 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Christian Heimes39258d32021-04-17 11:36:35 +020018017 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18019 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000018020 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18021 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000018022done
18023LIBOBJS=$ac_libobjs
18024
18025LTLIBOBJS=$ac_ltlibobjs
18026
18027
Martin v. Löwis11437992002-04-12 09:54:03 +000018028
Matthias Kloseb9621712010-04-24 17:59:49 +000018029
Victor Stinnere0be4232011-10-25 13:06:09 +020018030: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000018031ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000018032ac_clean_files_save=$ac_clean_files
18033ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Christian Heimes39258d32021-04-17 11:36:35 +020018034{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18035$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000018036as_write_fail=0
18037cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018038#! $SHELL
18039# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018040# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018041# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018042# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018043
Martin v. Löwis11437992002-04-12 09:54:03 +000018044debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018045ac_cs_recheck=false
18046ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000018047
Matthias Kloseb9621712010-04-24 17:59:49 +000018048SHELL=\${CONFIG_SHELL-$SHELL}
18049export SHELL
18050_ASEOF
18051cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18052## -------------------- ##
18053## M4sh Initialization. ##
18054## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056# Be more Bourne compatible
18057DUALCASE=1; export DUALCASE # for MKS sh
Christian Heimes39258d32021-04-17 11:36:35 +020018058if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000018059 emulate sh
18060 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000018061 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000018062 # is contrary to our usage. Disable this feature.
18063 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064 setopt NO_GLOB_SUBST
Christian Heimes39258d32021-04-17 11:36:35 +020018065else
Matthias Kloseb9621712010-04-24 17:59:49 +000018066 case `(set -o) 2>/dev/null` in #(
18067 *posix*) :
18068 set -o posix ;; #(
18069 *) :
18070 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071esac
Michael W. Hudson54241132001-12-07 15:38:26 +000018072fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000018073
18074
Matthias Kloseb9621712010-04-24 17:59:49 +000018075as_nl='
18076'
18077export as_nl
Christian Heimes39258d32021-04-17 11:36:35 +020018078# Printing a long string crashes Solaris 7 /usr/bin/printf.
18079as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18080as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18081as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18082# Prefer a ksh shell builtin over an external printf program on Solaris,
18083# but without wasting forks for bash or zsh.
18084if test -z "$BASH_VERSION$ZSH_VERSION" \
18085 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18086 as_echo='print -r --'
18087 as_echo_n='print -rn --'
18088elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18089 as_echo='printf %s\n'
18090 as_echo_n='printf %s'
18091else
18092 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18093 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18094 as_echo_n='/usr/ucb/echo -n'
18095 else
18096 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18097 as_echo_n_body='eval
18098 arg=$1;
18099 case $arg in #(
18100 *"$as_nl"*)
18101 expr "X$arg" : "X\\(.*\\)$as_nl";
18102 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18103 esac;
18104 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18105 '
18106 export as_echo_n_body
18107 as_echo_n='sh -c $as_echo_n_body as_echo'
18108 fi
18109 export as_echo_body
18110 as_echo='sh -c $as_echo_body as_echo'
18111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018112
18113# The user is always right.
Christian Heimes39258d32021-04-17 11:36:35 +020018114if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018115 PATH_SEPARATOR=:
18116 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18117 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18118 PATH_SEPARATOR=';'
18119 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122
Christian Heimes39258d32021-04-17 11:36:35 +020018123# IFS
18124# We need space, tab and new line, in precisely that order. Quoting is
18125# there to prevent editors from complaining about space-tab.
18126# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18127# splitting by setting IFS to empty value.)
18128IFS=" "" $as_nl"
18129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020018131as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000018132case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133 *[\\/]* ) as_myself=$0 ;;
18134 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018135for as_dir in $PATH
18136do
18137 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020018138 test -z "$as_dir" && as_dir=.
18139 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000018140 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143 ;;
18144esac
18145# We did not find ourselves, most probably we were run as `sh COMMAND'
18146# in which case we are not to be found in the path.
18147if test "x$as_myself" = x; then
18148 as_myself=$0
18149fi
18150if test ! -f "$as_myself"; then
Christian Heimes39258d32021-04-17 11:36:35 +020018151 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018152 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153fi
18154
Christian Heimes39258d32021-04-17 11:36:35 +020018155# Unset variables that we do not need and which cause bugs (e.g. in
18156# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18157# suppresses any "Segmentation fault" message there. '((' could
18158# trigger a bug in pdksh 5.2.14.
18159for as_var in BASH_ENV ENV MAIL MAILPATH
18160do eval test x\${$as_var+set} = xset \
18161 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18162done
18163PS1='$ '
18164PS2='> '
18165PS4='+ '
18166
18167# NLS nuisances.
18168LC_ALL=C
18169export LC_ALL
18170LANGUAGE=C
18171export LANGUAGE
18172
18173# CDPATH.
18174(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Matthias Kloseb9621712010-04-24 17:59:49 +000018175
18176
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018177# as_fn_error STATUS ERROR [LINENO LOG_FD]
18178# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018179# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18180# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018181# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018182as_fn_error ()
18183{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018184 as_status=$1; test $as_status -eq 0 && as_status=1
18185 if test "$4"; then
18186 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +020018187 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018188 fi
Christian Heimes39258d32021-04-17 11:36:35 +020018189 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018190 as_fn_exit $as_status
18191} # as_fn_error
18192
18193
18194# as_fn_set_status STATUS
18195# -----------------------
18196# Set $? to STATUS, without forking.
18197as_fn_set_status ()
18198{
18199 return $1
18200} # as_fn_set_status
18201
18202# as_fn_exit STATUS
18203# -----------------
18204# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18205as_fn_exit ()
18206{
18207 set +e
18208 as_fn_set_status $1
18209 exit $1
18210} # as_fn_exit
18211
18212# as_fn_unset VAR
18213# ---------------
18214# Portably unset VAR.
18215as_fn_unset ()
18216{
18217 { eval $1=; unset $1;}
18218}
18219as_unset=as_fn_unset
18220# as_fn_append VAR VALUE
18221# ----------------------
18222# Append the text in VALUE to the end of the definition contained in VAR. Take
18223# advantage of any shell optimizations that allow amortized linear growth over
18224# repeated appends, instead of the typical quadratic growth present in naive
18225# implementations.
Christian Heimes39258d32021-04-17 11:36:35 +020018226if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018227 eval 'as_fn_append ()
18228 {
18229 eval $1+=\$2
18230 }'
Christian Heimes39258d32021-04-17 11:36:35 +020018231else
Matthias Kloseb9621712010-04-24 17:59:49 +000018232 as_fn_append ()
18233 {
18234 eval $1=\$$1\$2
18235 }
18236fi # as_fn_append
18237
18238# as_fn_arith ARG...
18239# ------------------
18240# Perform arithmetic evaluation on the ARGs, and store the result in the
18241# global $as_val. Take advantage of shells that can avoid forks. The arguments
18242# must be portable across $(()) and expr.
Christian Heimes39258d32021-04-17 11:36:35 +020018243if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018244 eval 'as_fn_arith ()
18245 {
18246 as_val=$(( $* ))
18247 }'
Christian Heimes39258d32021-04-17 11:36:35 +020018248else
Matthias Kloseb9621712010-04-24 17:59:49 +000018249 as_fn_arith ()
18250 {
18251 as_val=`expr "$@" || test $? -eq 1`
18252 }
18253fi # as_fn_arith
18254
18255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256if expr a : '\(a\)' >/dev/null 2>&1 &&
18257 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18258 as_expr=expr
18259else
18260 as_expr=false
18261fi
18262
18263if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18264 as_basename=basename
18265else
18266 as_basename=false
18267fi
18268
Matthias Kloseb9621712010-04-24 17:59:49 +000018269if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18270 as_dirname=dirname
18271else
18272 as_dirname=false
18273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018275as_me=`$as_basename -- "$0" ||
18276$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18277 X"$0" : 'X\(//\)$' \| \
18278 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020018279$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280 sed '/^.*\/\([^/][^/]*\)\/*$/{
18281 s//\1/
18282 q
18283 }
18284 /^X\/\(\/\/\)$/{
18285 s//\1/
18286 q
18287 }
18288 /^X\/\(\/\).*/{
18289 s//\1/
18290 q
18291 }
18292 s/.*/./; q'`
18293
Matthias Kloseb9621712010-04-24 17:59:49 +000018294# Avoid depending upon Character Ranges.
18295as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18296as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18297as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18298as_cr_digits='0123456789'
18299as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018300
18301ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018302case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018303-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018304 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018306 xy) ECHO_C='\c';;
18307 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18308 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309 esac;;
18310*)
18311 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018312esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018313
Martin v. Löwis11437992002-04-12 09:54:03 +000018314rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018315if test -d conf$$.dir; then
18316 rm -f conf$$.dir/conf$$.file
18317else
18318 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018319 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018321if (echo >conf$$.file) 2>/dev/null; then
18322 if ln -s conf$$.file conf$$ 2>/dev/null; then
18323 as_ln_s='ln -s'
18324 # ... but there are two gotchas:
18325 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18326 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018327 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018328 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018329 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018330 elif ln conf$$.file conf$$ 2>/dev/null; then
18331 as_ln_s=ln
18332 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018333 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018335else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018336 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018338rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18339rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018340
Matthias Kloseb9621712010-04-24 17:59:49 +000018341
18342# as_fn_mkdir_p
18343# -------------
18344# Create "$as_dir" as a directory, including parents if necessary.
18345as_fn_mkdir_p ()
18346{
18347
18348 case $as_dir in #(
18349 -*) as_dir=./$as_dir;;
18350 esac
18351 test -d "$as_dir" || eval $as_mkdir_p || {
18352 as_dirs=
18353 while :; do
18354 case $as_dir in #(
Christian Heimes39258d32021-04-17 11:36:35 +020018355 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000018356 *) as_qdir=$as_dir;;
18357 esac
18358 as_dirs="'$as_qdir' $as_dirs"
18359 as_dir=`$as_dirname -- "$as_dir" ||
18360$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18361 X"$as_dir" : 'X\(//\)[^/]' \| \
18362 X"$as_dir" : 'X\(//\)$' \| \
18363 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020018364$as_echo X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018365 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18366 s//\1/
18367 q
18368 }
18369 /^X\(\/\/\)[^/].*/{
18370 s//\1/
18371 q
18372 }
18373 /^X\(\/\/\)$/{
18374 s//\1/
18375 q
18376 }
18377 /^X\(\/\).*/{
18378 s//\1/
18379 q
18380 }
18381 s/.*/./; q'`
18382 test -d "$as_dir" && break
18383 done
18384 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018385 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018386
18387
18388} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018389if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018390 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018391else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018392 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018393 as_mkdir_p=false
18394fi
18395
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018396
18397# as_fn_executable_p FILE
18398# -----------------------
18399# Test if FILE is an executable regular file.
18400as_fn_executable_p ()
18401{
18402 test -f "$1" && test -x "$1"
18403} # as_fn_executable_p
18404as_test_x='test -x'
18405as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018406
18407# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018408as_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 +000018409
18410# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018411as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018412
18413
Martin v. Löwis11437992002-04-12 09:54:03 +000018414exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018415## ----------------------------------- ##
18416## Main body of $CONFIG_STATUS script. ##
18417## ----------------------------------- ##
18418_ASEOF
18419test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018420
Matthias Kloseb9621712010-04-24 17:59:49 +000018421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18422# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018423# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018424# values after options handling.
18425ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018426This file was extended by python $as_me 3.10, which was
Christian Heimes39258d32021-04-17 11:36:35 +020018427generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018428
18429 CONFIG_FILES = $CONFIG_FILES
18430 CONFIG_HEADERS = $CONFIG_HEADERS
18431 CONFIG_LINKS = $CONFIG_LINKS
18432 CONFIG_COMMANDS = $CONFIG_COMMANDS
18433 $ $0 $@
18434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435on `(hostname || uname -n) 2>/dev/null | sed 1q`
18436"
18437
Martin v. Löwis11437992002-04-12 09:54:03 +000018438_ACEOF
18439
Matthias Kloseb9621712010-04-24 17:59:49 +000018440case $ac_config_files in *"
18441"*) set x $ac_config_files; shift; ac_config_files=$*;;
18442esac
18443
18444case $ac_config_headers in *"
18445"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18446esac
18447
18448
18449cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018450# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018451config_files="$ac_config_files"
18452config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018455
Matthias Kloseb9621712010-04-24 17:59:49 +000018456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018457ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018458\`$as_me' instantiates files and other configuration actions
18459from templates according to the current configuration. Unless the files
18460and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018461
Matthias Kloseb9621712010-04-24 17:59:49 +000018462Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018463
18464 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018466 --config print configuration, then exit
18467 -q, --quiet, --silent
18468 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 -d, --debug don't remove temporary files
18470 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018471 --file=FILE[:TEMPLATE]
18472 instantiate the configuration file FILE
18473 --header=FILE[:TEMPLATE]
18474 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018475
18476Configuration files:
18477$config_files
18478
18479Configuration headers:
18480$config_headers
18481
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018482Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018485cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Christian Heimes39258d32021-04-17 11:36:35 +020018486ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018487ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018488python config.status 3.10
Christian Heimes39258d32021-04-17 11:36:35 +020018489configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018490 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018491
Christian Heimes39258d32021-04-17 11:36:35 +020018492Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018493This config.status script is free software; the Free Software Foundation
18494gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495
18496ac_pwd='$ac_pwd'
18497srcdir='$srcdir'
18498INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018499MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018500test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018501_ACEOF
18502
Matthias Kloseb9621712010-04-24 17:59:49 +000018503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18504# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018505ac_need_defaults=:
18506while test $# != 0
18507do
18508 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018509 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18511 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018512 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018513 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018514 --*=)
18515 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18516 ac_optarg=
18517 ac_shift=:
18518 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018519 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018520 ac_option=$1
18521 ac_optarg=$2
18522 ac_shift=shift
18523 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 esac
18525
Skip Montanaro6dead952003-09-25 14:50:04 +000018526 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018528 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18529 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Christian Heimes39258d32021-04-17 11:36:35 +020018531 $as_echo "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018532 --config | --confi | --conf | --con | --co | --c )
Christian Heimes39258d32021-04-17 11:36:35 +020018533 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018535 debug=: ;;
18536 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018537 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018538 case $ac_optarg in
Christian Heimes39258d32021-04-17 11:36:35 +020018539 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018540 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018541 esac
18542 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018543 ac_need_defaults=false;;
18544 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018545 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018546 case $ac_optarg in
Christian Heimes39258d32021-04-17 11:36:35 +020018547 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018548 esac
18549 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018550 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018551 --he | --h)
18552 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018553 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018554Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555 --help | --hel | -h )
Christian Heimes39258d32021-04-17 11:36:35 +020018556 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018557 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18558 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18559 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018560
18561 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018562 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018563Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018564
Matthias Kloseb9621712010-04-24 17:59:49 +000018565 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018567
18568 esac
18569 shift
18570done
18571
Skip Montanaro6dead952003-09-25 14:50:04 +000018572ac_configure_extra_args=
18573
18574if $ac_cs_silent; then
18575 exec 6>/dev/null
18576 ac_configure_extra_args="$ac_configure_extra_args --silent"
18577fi
18578
18579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018580cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018581if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018582 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018583 shift
Christian Heimes39258d32021-04-17 11:36:35 +020018584 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000018585 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018586 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018587 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018588fi
18589
Martin v. Löwis11437992002-04-12 09:54:03 +000018590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592exec 5>>config.log
18593{
18594 echo
18595 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18596## Running $as_me. ##
18597_ASBOX
Christian Heimes39258d32021-04-17 11:36:35 +020018598 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018602cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018603_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018604
Matthias Kloseb9621712010-04-24 17:59:49 +000018605cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018606
18607# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018608for ac_config_target in $ac_config_targets
18609do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018610 case $ac_config_target in
18611 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18612 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18613 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018614 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18615 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018616 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018617 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018618 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018619 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018620 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621
Victor Stinnere0be4232011-10-25 13:06:09 +020018622 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 esac
18624done
18625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018626
Martin v. Löwis11437992002-04-12 09:54:03 +000018627# If the user did not use the arguments to specify the items to instantiate,
18628# then the envvar interface is used. Set only those that are not.
18629# We use the long form for the default assignment because of an extremely
18630# bizarre bug on SunOS 4.1.3.
18631if $ac_need_defaults; then
Christian Heimes39258d32021-04-17 11:36:35 +020018632 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18633 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000018634fi
18635
Skip Montanaro6dead952003-09-25 14:50:04 +000018636# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018637# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018638# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018639# Hook for its removal unless debugging.
18640# Note that there is a small window in which the directory will not be cleaned:
18641# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018642$debug ||
18643{
Victor Stinnere0be4232011-10-25 13:06:09 +020018644 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018646 : "${ac_tmp:=$tmp}"
18647 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018648' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018649 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018650}
Martin v. Löwis11437992002-04-12 09:54:03 +000018651# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018652
Martin v. Löwis11437992002-04-12 09:54:03 +000018653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018654 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018655 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018656} ||
18657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018658 tmp=./conf$$-$RANDOM
18659 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018660} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018661ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018662
Matthias Kloseb9621712010-04-24 17:59:49 +000018663# Set up the scripts for CONFIG_FILES section.
18664# No need to generate them if there are no CONFIG_FILES.
18665# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018666if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018667
Matthias Kloseb9621712010-04-24 17:59:49 +000018668
18669ac_cr=`echo X | tr X '\015'`
18670# On cygwin, bash can eat \r inside `` if the user requested igncr.
18671# But we know of no other shell where ac_cr would be empty at this
18672# point, so we can use a bashism as a fallback.
18673if test "x$ac_cr" = x; then
18674 eval ac_cr=\$\'\\r\'
18675fi
18676ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18677if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018678 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018679else
18680 ac_cs_awk_cr=$ac_cr
18681fi
18682
Victor Stinnere0be4232011-10-25 13:06:09 +020018683echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018684_ACEOF
18685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018686
Matthias Kloseb9621712010-04-24 17:59:49 +000018687{
18688 echo "cat >conf$$subs.awk <<_ACEOF" &&
18689 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18690 echo "_ACEOF"
18691} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018692 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18693ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018694ac_delim='%!_!# '
18695for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018696 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018697 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018698
Matthias Kloseb9621712010-04-24 17:59:49 +000018699 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18700 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018701 break
18702 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018703 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018704 else
18705 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018706 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018707done
Matthias Kloseb9621712010-04-24 17:59:49 +000018708rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018709
Matthias Kloseb9621712010-04-24 17:59:49 +000018710cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018711cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018713sed -n '
18714h
18715s/^/S["/; s/!.*/"]=/
18716p
18717g
18718s/^[^!]*!//
18719:repl
18720t repl
18721s/'"$ac_delim"'$//
18722t delim
18723:nl
18724h
18725s/\(.\{148\}\)..*/\1/
18726t more1
18727s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18728p
18729n
18730b repl
18731:more1
18732s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18733p
18734g
18735s/.\{148\}//
18736t nl
18737:delim
18738h
18739s/\(.\{148\}\)..*/\1/
18740t more2
18741s/["\\]/\\&/g; s/^/"/; s/$/"/
18742p
18743b
18744:more2
18745s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18746p
18747g
18748s/.\{148\}//
18749t delim
18750' <conf$$subs.awk | sed '
18751/^[^""]/{
18752 N
18753 s/\n//
18754}
18755' >>$CONFIG_STATUS || ac_write_fail=1
18756rm -f conf$$subs.awk
18757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18758_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018759cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018760 for (key in S) S_is_set[key] = 1
18761 FS = ""
18762
18763}
18764{
18765 line = $ 0
18766 nfields = split(line, field, "@")
18767 substed = 0
18768 len = length(field[1])
18769 for (i = 2; i < nfields; i++) {
18770 key = field[i]
18771 keylen = length(key)
18772 if (S_is_set[key]) {
18773 value = S[key]
18774 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18775 len += length(value) + length(field[++i])
18776 substed = 1
18777 } else
18778 len += 1 + keylen
18779 }
18780
18781 print line
18782}
18783
18784_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18787if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18788 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18789else
18790 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018791fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018792 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018793_ACEOF
18794
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018795# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18796# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797# trailing colons and then remove the whole line if VPATH becomes empty
18798# (actually we leave an empty line to preserve line numbers).
18799if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018800 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18801h
18802s///
18803s/^/:/
18804s/[ ]*$/:/
18805s/:\$(srcdir):/:/g
18806s/:\${srcdir}:/:/g
18807s/:@srcdir@:/:/g
18808s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018809s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018810x
18811s/\(=[ ]*\).*/\1/
18812G
18813s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018814s/^[^=]*=[ ]*$//
18815}'
18816fi
18817
Matthias Kloseb9621712010-04-24 17:59:49 +000018818cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018819fi # test -n "$CONFIG_FILES"
18820
Matthias Kloseb9621712010-04-24 17:59:49 +000018821# Set up the scripts for CONFIG_HEADERS section.
18822# No need to generate them if there are no CONFIG_HEADERS.
18823# This happens for instance with `./config.status Makefile'.
18824if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018825cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018826BEGIN {
18827_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018828
Matthias Kloseb9621712010-04-24 17:59:49 +000018829# Transform confdefs.h into an awk script `defines.awk', embedded as
18830# here-document in config.status, that substitutes the proper values into
18831# config.h.in to produce config.h.
18832
18833# Create a delimiter string that does not exist in confdefs.h, to ease
18834# handling of long lines.
18835ac_delim='%!_!# '
18836for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018837 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18838 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018839 break
18840 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018841 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018842 else
18843 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18844 fi
18845done
18846
18847# For the awk script, D is an array of macro values keyed by name,
18848# likewise P contains macro parameters if any. Preserve backslash
18849# newline sequences.
18850
18851ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18852sed -n '
18853s/.\{148\}/&'"$ac_delim"'/g
18854t rset
18855:rset
18856s/^[ ]*#[ ]*define[ ][ ]*/ /
18857t def
18858d
18859:def
18860s/\\$//
18861t bsnl
18862s/["\\]/\\&/g
18863s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18864D["\1"]=" \3"/p
18865s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18866d
18867:bsnl
18868s/["\\]/\\&/g
18869s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18870D["\1"]=" \3\\\\\\n"\\/p
18871t cont
18872s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18873t cont
18874d
18875:cont
18876n
18877s/.\{148\}/&'"$ac_delim"'/g
18878t clear
18879:clear
18880s/\\$//
18881t bsnlc
18882s/["\\]/\\&/g; s/^/"/; s/$/"/p
18883d
18884:bsnlc
18885s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18886b cont
18887' <confdefs.h | sed '
18888s/'"$ac_delim"'/"\\\
18889"/g' >>$CONFIG_STATUS || ac_write_fail=1
18890
18891cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18892 for (key in D) D_is_set[key] = 1
18893 FS = ""
18894}
18895/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18896 line = \$ 0
18897 split(line, arg, " ")
18898 if (arg[1] == "#") {
18899 defundef = arg[2]
18900 mac1 = arg[3]
18901 } else {
18902 defundef = substr(arg[1], 2)
18903 mac1 = arg[2]
18904 }
18905 split(mac1, mac2, "(") #)
18906 macro = mac2[1]
18907 prefix = substr(line, 1, index(line, defundef) - 1)
18908 if (D_is_set[macro]) {
18909 # Preserve the white space surrounding the "#".
18910 print prefix "define", macro P[macro] D[macro]
18911 next
18912 } else {
18913 # Replace #undef with comments. This is necessary, for example,
18914 # in the case of _POSIX_SOURCE, which is predefined and required
18915 # on some systems where configure will not decide to define it.
18916 if (defundef == "undef") {
18917 print "/*", prefix defundef, macro, "*/"
18918 next
18919 }
18920 }
18921}
18922{ print }
18923_ACAWK
18924_ACEOF
18925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018926 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018927fi # test -n "$CONFIG_HEADERS"
18928
18929
18930eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18931shift
18932for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018933do
18934 case $ac_tag in
18935 :[FHLC]) ac_mode=$ac_tag; continue;;
18936 esac
18937 case $ac_mode$ac_tag in
18938 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018939 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018940 :[FH]-) ac_tag=-:-;;
18941 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18942 esac
18943 ac_save_IFS=$IFS
18944 IFS=:
18945 set x $ac_tag
18946 IFS=$ac_save_IFS
18947 shift
18948 ac_file=$1
18949 shift
18950
18951 case $ac_mode in
18952 :L) ac_source=$1;;
18953 :[FH])
18954 ac_file_inputs=
18955 for ac_f
18956 do
18957 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018958 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018959 *) # Look for the file first in the build tree, then in the source tree
18960 # (if the path is not absolute). The absolute path cannot be DOS-style,
18961 # because $ac_f cannot contain `:'.
18962 test -f "$ac_f" ||
18963 case $ac_f in
18964 [\\/$]*) false;;
18965 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18966 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018967 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018968 esac
Christian Heimes39258d32021-04-17 11:36:35 +020018969 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018970 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018971 done
18972
18973 # Let's still pretend it is `configure' which instantiates (i.e., don't
18974 # use $as_me), people would be surprised to read:
18975 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018976 configure_input='Generated from '`
Christian Heimes39258d32021-04-17 11:36:35 +020018977 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000018978 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018979 if test x"$ac_file" != x-; then
18980 configure_input="$ac_file. $configure_input"
Christian Heimes39258d32021-04-17 11:36:35 +020018981 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18982$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018983 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018984 # Neutralize special characters interpreted by sed in replacement strings.
18985 case $configure_input in #(
18986 *\&* | *\|* | *\\* )
Christian Heimes39258d32021-04-17 11:36:35 +020018987 ac_sed_conf_input=`$as_echo "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018988 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18989 *) ac_sed_conf_input=$configure_input;;
18990 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018991
18992 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018993 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18994 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018995 esac
18996 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018997 esac
18998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019000$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019001 X"$ac_file" : 'X\(//\)[^/]' \| \
19002 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019003 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020019004$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019005 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19006 s//\1/
19007 q
19008 }
19009 /^X\(\/\/\)[^/].*/{
19010 s//\1/
19011 q
19012 }
19013 /^X\(\/\/\)$/{
19014 s//\1/
19015 q
19016 }
19017 /^X\(\/\).*/{
19018 s//\1/
19019 q
19020 }
19021 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000019022 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000019023 ac_builddir=.
19024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025case "$ac_dir" in
19026.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19027*)
Christian Heimes39258d32021-04-17 11:36:35 +020019028 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019029 # A ".." for each directory in $ac_dir_suffix.
Christian Heimes39258d32021-04-17 11:36:35 +020019030 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019031 case $ac_top_builddir_sub in
19032 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19033 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19034 esac ;;
19035esac
19036ac_abs_top_builddir=$ac_pwd
19037ac_abs_builddir=$ac_pwd$ac_dir_suffix
19038# for backward compatibility:
19039ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000019040
19041case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019042 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000019043 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019044 ac_top_srcdir=$ac_top_builddir_sub
19045 ac_abs_top_srcdir=$ac_pwd ;;
19046 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000019047 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019048 ac_top_srcdir=$srcdir
19049 ac_abs_top_srcdir=$srcdir ;;
19050 *) # Relative name.
19051 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19052 ac_top_srcdir=$ac_top_build_prefix$srcdir
19053 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019054esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019055ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000019056
Martin v. Löwis11437992002-04-12 09:54:03 +000019057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019058 case $ac_mode in
19059 :F)
19060 #
19061 # CONFIG_FILE
19062 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019063
19064 case $INSTALL in
19065 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019066 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019067 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010019068 ac_MKDIR_P=$MKDIR_P
19069 case $MKDIR_P in
19070 [\\/$]* | ?:[\\/]* ) ;;
19071 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19072 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000019073_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019074
Matthias Kloseb9621712010-04-24 17:59:49 +000019075cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019076# If the template does not know about datarootdir, expand it.
19077# FIXME: This hack should be removed a few years after 2.60.
19078ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000019079ac_sed_dataroot='
19080/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019081 p
19082 q
19083}
19084/@datadir@/p
19085/@docdir@/p
19086/@infodir@/p
19087/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000019088/@mandir@/p'
19089case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019090*datarootdir*) ac_datarootdir_seen=yes;;
19091*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Christian Heimes39258d32021-04-17 11:36:35 +020019092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19093$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019095cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019096 ac_datarootdir_hack='
19097 s&@datadir@&$datadir&g
19098 s&@docdir@&$docdir&g
19099 s&@infodir@&$infodir&g
19100 s&@localedir@&$localedir&g
19101 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000019102 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019103esac
19104_ACEOF
19105
19106# Neutralize VPATH when `$srcdir' = `.'.
19107# Shell code in configure.ac might set extrasub.
19108# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000019109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19110ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000019111$extrasub
19112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019113cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000019114:t
19115/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000019116s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019117s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000019118s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019119s&@srcdir@&$ac_srcdir&;t t
19120s&@abs_srcdir@&$ac_abs_srcdir&;t t
19121s&@top_srcdir@&$ac_top_srcdir&;t t
19122s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19123s&@builddir@&$ac_builddir&;t t
19124s&@abs_builddir@&$ac_abs_builddir&;t t
19125s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19126s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010019127s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019128$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000019129"
Victor Stinnere0be4232011-10-25 13:06:09 +020019130eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19131 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019133test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019134 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19135 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19136 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Christian Heimes39258d32021-04-17 11:36:35 +020019137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019138which seems to be undefined. Please make sure it is defined" >&5
Christian Heimes39258d32021-04-17 11:36:35 +020019139$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019140which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019141
Victor Stinnere0be4232011-10-25 13:06:09 +020019142 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019143 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019144 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19145 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019146 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019147 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019148 ;;
19149 :H)
19150 #
19151 # CONFIG_HEADER
19152 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019153 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019154 {
Christian Heimes39258d32021-04-17 11:36:35 +020019155 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019156 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19157 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019158 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019159 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Christian Heimes39258d32021-04-17 11:36:35 +020019160 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19161$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019162 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019163 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019164 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019165 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019166 fi
19167 else
Christian Heimes39258d32021-04-17 11:36:35 +020019168 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019169 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019170 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019171 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019172 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019174
19175 esac
19176
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019177
19178 case $ac_file$ac_mode in
19179 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19180
19181 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019182done # for ac_tag
19183
Guido van Rossum627b2d71993-12-24 10:39:16 +000019184
Matthias Kloseb9621712010-04-24 17:59:49 +000019185as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019186_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019187ac_clean_files=$ac_clean_files_save
19188
Matthias Kloseb9621712010-04-24 17:59:49 +000019189test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019190 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019191
Martin v. Löwis11437992002-04-12 09:54:03 +000019192
19193# configure is writing to config.log, and then calls config.status.
19194# config.status does its own redirection, appending to config.log.
19195# Unfortunately, on DOS this fails, as config.log is still kept open
19196# by configure, so config.status won't be able to write to it; its
19197# output is simply discarded. So we exec the FD to /dev/null,
19198# effectively closing config.log, so it can be properly (re)opened and
19199# appended to by config.status. When coming back to configure, we
19200# need to make the FD available again.
19201if test "$no_create" != yes; then
19202 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019203 ac_config_status_args=
19204 test "$silent" = yes &&
19205 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019206 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019207 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019208 exec 5>>config.log
19209 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19210 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019211 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019212fi
19213if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Christian Heimes39258d32021-04-17 11:36:35 +020019214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19215$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019216fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019217
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019218
Christian Heimes75ed8902013-11-20 01:11:18 +010019219echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019220if test ! -f Modules/Setup.local
19221then
19222 echo "# Edit this file for local setup changes" >Modules/Setup.local
19223fi
19224
Christian Heimes75ed8902013-11-20 01:11:18 +010019225echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019226$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019227 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019228 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019229mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019230
19231if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19232 echo "" >&6
19233 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019234 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 +000019235 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019236 echo "" >&6
19237 echo "" >&6
19238fi